opendaylight 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/lib/opendaylight/version.rb +1 -1
- data/lib/opendaylight.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b908038bbdc717dfe2983d9d2d3ea6552b7ddc30
|
4
|
+
data.tar.gz: 83f67e944d5384f42c2ac0dd3940dd137ba409dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d3962281f11c21c7cd9ecf3e6448c5cc2241fa23b71416e3039a46a06cdaa441b7ee4f5ae11862733d9bb74be9087ba1eb6c29b75652a359c2395dae9718690
|
7
|
+
data.tar.gz: a606847a5f5acd358ad592f4441504e1473cf812a9dc10ceb9b347fc6a4e8f92a441be016d2c62bc1e781f86f1e4478b54604a2a03188b0524c5aff780780051
|
data/README.md
CHANGED
@@ -91,10 +91,14 @@ SW_PATH
|
|
91
91
|
|
92
92
|
##Topology
|
93
93
|
|
94
|
-
To get your topology, use
|
94
|
+
To get your topology, use API.topology:
|
95
95
|
|
96
96
|
Opendaylight::API.topology
|
97
97
|
|
98
|
+
For a list of hosts, use API.hostTracker:
|
99
|
+
|
100
|
+
Opendaylight::API.hostTracker
|
101
|
+
|
98
102
|
This returns a hash of all the edges (links). The hash is organized as follows (I have capitalized things that will come back as variables):
|
99
103
|
|
100
104
|
"edgeProperties"=>[{
|
data/lib/opendaylight/version.rb
CHANGED
data/lib/opendaylight.rb
CHANGED
@@ -57,6 +57,10 @@ module Opendaylight
|
|
57
57
|
auth = {username: username, password: password}
|
58
58
|
HTTParty.get("#{url}controller/nb/v2/topology/#{containerName}", :basic_auth => auth)
|
59
59
|
end
|
60
|
+
def self.hostTracker(username: Opendaylight.configuration.username, password: Opendaylight.configuration.password, url: Opendaylight.configuration.url, containerName: "default")
|
61
|
+
auth = {username: username, password: password}
|
62
|
+
HTTParty.get("#{url}controller/nb/v2/hosttracker/#{containerName}/hosts/active", :basic_auth => auth)
|
63
|
+
end
|
60
64
|
def username
|
61
65
|
Opendaylight.configuration.username
|
62
66
|
end
|