You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by de...@apache.org on 2018/05/14 13:49:15 UTC

[incubator-trafficcontrol] branch master updated (0d39343 -> d22f85d)

This is an automated email from the ASF dual-hosted git repository.

dewrich pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git.


    from 0d39343  Update traffic_router_api.rst
     new e25ca72  Add more documentation about the TO Client SDK
     new cd91c6e  Updated language to be more clear
     new d22f85d  Add better syntax highlighting

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/source/api/traffic_ops_api.rst |  4 +++
 traffic_control/clients/README.md   | 18 +++++++++++++
 traffic_ops/client/README.md        | 54 +++++++++++++++++++++++++++++++++++++
 traffic_ops/client/v13/README.md    | 53 ++++++++++++++++++++++++++++++++++++
 4 files changed, 129 insertions(+)
 create mode 100644 traffic_control/clients/README.md
 create mode 100644 traffic_ops/client/README.md
 create mode 100644 traffic_ops/client/v13/README.md

-- 
To stop receiving notification emails like this one, please contact
dewrich@apache.org.

[incubator-trafficcontrol] 02/03: Updated language to be more clear

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dewrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git

commit cd91c6e8966d148bff22bb9f5f1454caadc589c7
Author: Jonathan Gray <Jo...@comcast.com>
AuthorDate: Sun May 13 22:36:08 2018 -0600

    Updated language to be more clear
---
 docs/source/api/traffic_ops_api.rst | 6 +++---
 traffic_control/clients/README.md   | 4 ++--
 traffic_ops/client/README.md        | 6 +++---
 traffic_ops/client/v13/README.md    | 4 ++--
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/docs/source/api/traffic_ops_api.rst b/docs/source/api/traffic_ops_api.rst
index a288915..0ced0ae 100644
--- a/docs/source/api/traffic_ops_api.rst
+++ b/docs/source/api/traffic_ops_api.rst
@@ -190,7 +190,7 @@ The 3 most common errors returned by Traffic Ops are:
 
   The rest of the API documentation will only document the ``200 OK`` case, where no errors have occured.
 
-TrafficOps Client SDK
----------------------
+TrafficOps Native Client Libraries
+----------------------------------
 
-TrafficOps client SDK are available in both Golang and Python.  You can read more about them at https://github.com/apache/incubator-trafficcontrol/tree/master/traffic_control/clients
+TrafficOps client libraries are available in both Golang and Python.  You can read more about them at https://github.com/apache/incubator-trafficcontrol/tree/master/traffic_control/clients
diff --git a/traffic_control/clients/README.md b/traffic_control/clients/README.md
index 7c017b1..ec091b4 100644
--- a/traffic_control/clients/README.md
+++ b/traffic_control/clients/README.md
@@ -1,6 +1,6 @@
-#Traffic Control Client SDK
+#TrafficOps Native Client Libraries
 
-There are two client SDK supported:
+There are two client libraries supported:
 
 ##Python
 * Supported TO API Versions
diff --git a/traffic_ops/client/README.md b/traffic_ops/client/README.md
index e35d63e..e99759b 100644
--- a/traffic_ops/client/README.md
+++ b/traffic_ops/client/README.md
@@ -1,8 +1,8 @@
-#TO Client SDK Golang
-_This version of the SDK is deprecated in favor of the newer [TO API v1.3 SDK](https://github.com/apache/incubator-trafficcontrol/tree/master/traffic_ops/client/v13)_
+#TO Client Library Golang
+_This version of the SDK is deprecated in favor of the newer [TO API v1.3 Client Library](https://github.com/apache/incubator-trafficcontrol/tree/master/traffic_ops/client/v13)_
 
 ##Getting Started
-1. Obtain the latest version of the SDK
+1. Obtain the latest version of the library
 
 `go get github.com/apache/incubator-trafficcontrol/traffic_ops/client`
 
diff --git a/traffic_ops/client/v13/README.md b/traffic_ops/client/v13/README.md
index 831b7e0..5723402 100644
--- a/traffic_ops/client/v13/README.md
+++ b/traffic_ops/client/v13/README.md
@@ -1,7 +1,7 @@
-#TO Client SDK Golang
+#TO Client Library Golang
 
 ##Getting Started
-1. Obtain the latest version of the SDK
+1. Obtain the latest version of the library
 
 `go get github.com/apache/incubator-trafficcontrol/traffic_ops/client/v13`
 

-- 
To stop receiving notification emails like this one, please contact
dewrich@apache.org.

[incubator-trafficcontrol] 01/03: Add more documentation about the TO Client SDK

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dewrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git

commit e25ca72d620167e3805586581b7d686316fae055
Author: Jonathan Gray <Jo...@comcast.com>
AuthorDate: Sun May 13 22:13:39 2018 -0600

    Add more documentation about the TO Client SDK
---
 docs/source/api/traffic_ops_api.rst |  4 +++
 traffic_control/clients/README.md   | 18 +++++++++++++
 traffic_ops/client/README.md        | 54 +++++++++++++++++++++++++++++++++++++
 traffic_ops/client/v13/README.md    | 53 ++++++++++++++++++++++++++++++++++++
 4 files changed, 129 insertions(+)

diff --git a/docs/source/api/traffic_ops_api.rst b/docs/source/api/traffic_ops_api.rst
index 2ae61d3..a288915 100644
--- a/docs/source/api/traffic_ops_api.rst
+++ b/docs/source/api/traffic_ops_api.rst
@@ -190,3 +190,7 @@ The 3 most common errors returned by Traffic Ops are:
 
   The rest of the API documentation will only document the ``200 OK`` case, where no errors have occured.
 
+TrafficOps Client SDK
+---------------------
+
+TrafficOps client SDK are available in both Golang and Python.  You can read more about them at https://github.com/apache/incubator-trafficcontrol/tree/master/traffic_control/clients
diff --git a/traffic_control/clients/README.md b/traffic_control/clients/README.md
new file mode 100644
index 0000000..7c017b1
--- /dev/null
+++ b/traffic_control/clients/README.md
@@ -0,0 +1,18 @@
+#Traffic Control Client SDK
+
+There are two client SDK supported:
+
+##Python
+* Supported TO API Versions
+  * 1.1
+  * 1.2
+* Documentation
+  * https://github.com/apache/incubator-trafficcontrol/tree/master/traffic_control/clients/python/trafficops
+
+##Golang
+###TO API v1.2 _(Deprecated)_
+* Documentation
+  * https://github.com/apache/incubator-trafficcontrol/tree/master/traffic_ops/client
+###TO API v1.3
+* Documentation
+  * https://github.com/apache/incubator-trafficcontrol/tree/master/traffic_ops/client/v13
diff --git a/traffic_ops/client/README.md b/traffic_ops/client/README.md
new file mode 100644
index 0000000..e35d63e
--- /dev/null
+++ b/traffic_ops/client/README.md
@@ -0,0 +1,54 @@
+#TO Client SDK Golang
+_This version of the SDK is deprecated in favor of the newer [TO API v1.3 SDK](https://github.com/apache/incubator-trafficcontrol/tree/master/traffic_ops/client/v13)_
+
+##Getting Started
+1. Obtain the latest version of the SDK
+
+`go get github.com/apache/incubator-trafficcontrol/traffic_ops/client`
+
+2. Get a basic TO session started and fetch a list of CDNs
+```
+package main
+
+import (
+	"fmt"
+	"os"
+	"time"
+
+	"github.com/apache/incubator-trafficcontrol/lib/go-tc/v13"
+	toclient "github.com/apache/incubator-trafficcontrol/traffic_ops/client"
+)
+
+const TOURL = "http://localhost"
+const TOUser = "user"
+const TOPassword = "password"
+const AllowInsecureConnections = true
+const UserAgent = "MySampleApp"
+const UseClientCache = false
+const TrafficOpsRequestTimeout = time.Second * time.Duration(10)
+
+func main() {
+	session, remoteaddr, err := toclient.LoginWithAgent(
+		TOURL,
+		TOUser,
+		TOPassword,
+		AllowInsecureConnections,
+		UserAgent,
+		UseClientCache,
+		TrafficOpsRequestTimeout)
+	if err != nil {
+		fmt.Printf("An error occurred while logging in:\n\t%v\n", err)
+		os.Exit(1)
+	}
+	fmt.Println("Connected to: " + remoteaddr.String())
+	var cdns []v13.CDN
+	cdns, _, err = session.GetCDNs()
+	if err != nil {
+		fmt.Printf("An error occurred while getting cdns:\n\t%v\n", err)
+		os.Exit(1)
+	}
+	for _, cdn := range cdns {
+		fmt.Println(cdn.Name)
+	}
+}
+```
diff --git a/traffic_ops/client/v13/README.md b/traffic_ops/client/v13/README.md
new file mode 100644
index 0000000..831b7e0
--- /dev/null
+++ b/traffic_ops/client/v13/README.md
@@ -0,0 +1,53 @@
+#TO Client SDK Golang
+
+##Getting Started
+1. Obtain the latest version of the SDK
+
+`go get github.com/apache/incubator-trafficcontrol/traffic_ops/client/v13`
+
+2. Get a basic TO session started and fetch a list of CDNs
+```
+package main
+
+import (
+	"fmt"
+	"os"
+	"time"
+
+	"github.com/apache/incubator-trafficcontrol/lib/go-tc/v13"
+	toclient "github.com/apache/incubator-trafficcontrol/traffic_ops/client/v13"
+)
+
+const TOURL = "http://localhost"
+const TOUser = "user"
+const TOPassword = "password"
+const AllowInsecureConnections = true
+const UserAgent = "MySampleApp"
+const UseClientCache = false
+const TrafficOpsRequestTimeout = time.Second * time.Duration(10)
+
+func main() {
+	session, remoteaddr, err := toclient.LoginWithAgent(
+		TOURL,
+		TOUser,
+		TOPassword,
+		AllowInsecureConnections,
+		UserAgent,
+		UseClientCache,
+		TrafficOpsRequestTimeout)
+	if err != nil {
+		fmt.Printf("An error occurred while logging in:\n\t%v\n", err)
+		os.Exit(1)
+	}
+	fmt.Println("Connected to: " + remoteaddr.String())
+	var cdns []v13.CDN
+	cdns, _, err = session.GetCDNs()
+	if err != nil {
+		fmt.Printf("An error occurred while getting cdns:\n\t%v\n", err)
+		os.Exit(1)
+	}
+	for _, cdn := range cdns {
+		fmt.Println(cdn.Name)
+	}
+}
+```

-- 
To stop receiving notification emails like this one, please contact
dewrich@apache.org.

[incubator-trafficcontrol] 03/03: Add better syntax highlighting

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dewrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git

commit d22f85d732dd75a179a57fa81704ad01c09c143b
Author: Jonathan Gray <Jo...@comcast.com>
AuthorDate: Sun May 13 22:47:00 2018 -0600

    Add better syntax highlighting
---
 traffic_ops/client/README.md     | 2 +-
 traffic_ops/client/v13/README.md | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/traffic_ops/client/README.md b/traffic_ops/client/README.md
index e99759b..8303b1e 100644
--- a/traffic_ops/client/README.md
+++ b/traffic_ops/client/README.md
@@ -7,7 +7,7 @@ _This version of the SDK is deprecated in favor of the newer [TO API v1.3 Client
 `go get github.com/apache/incubator-trafficcontrol/traffic_ops/client`
 
 2. Get a basic TO session started and fetch a list of CDNs
-```
+```go
 package main
 
 import (
diff --git a/traffic_ops/client/v13/README.md b/traffic_ops/client/v13/README.md
index 5723402..ea2e147 100644
--- a/traffic_ops/client/v13/README.md
+++ b/traffic_ops/client/v13/README.md
@@ -6,7 +6,7 @@
 `go get github.com/apache/incubator-trafficcontrol/traffic_ops/client/v13`
 
 2. Get a basic TO session started and fetch a list of CDNs
-```
+```go
 package main
 
 import (

-- 
To stop receiving notification emails like this one, please contact
dewrich@apache.org.