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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c299eb6bc65f3cb639a65617faacaa7bf293eb71
4
- data.tar.gz: 12d74bfb24b1d28dc9b6a816af91a2e00f7de90b
3
+ metadata.gz: b908038bbdc717dfe2983d9d2d3ea6552b7ddc30
4
+ data.tar.gz: 83f67e944d5384f42c2ac0dd3940dd137ba409dd
5
5
  SHA512:
6
- metadata.gz: d36f1d1a1e53fc8a5d5f1d5b3114d904853c9fa3435bee7e34a03720854ea3b40ed9756ae24edbb00bd9edcebbd7b32c26d944b102ad9b3846c182d536d8c80f
7
- data.tar.gz: 448e7ef9036467607022191b6f6e5eb8c848452add04774dceb839732ad21e432becca23ed957079e33933f83a6f4a425e6e2aa0b08eb49342bce3a26eaf2b52
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 Opendaylight.topology:
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"=>[{
@@ -1,3 +1,3 @@
1
1
  module Opendaylight
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opendaylight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - rickpr