opendaylight 0.1.2 → 0.1.3

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: f9d7cd9f01d8b0986563112dd9c21bac6f8eaa88
4
- data.tar.gz: d920045d15e72c2f584042ec5799f9d5e028658c
3
+ metadata.gz: f44cd9094f7a592beaf63267991fff549ca6bb3a
4
+ data.tar.gz: b2d79e707881276d4058441a69888d29160c86f1
5
5
  SHA512:
6
- metadata.gz: 08c209a213ec853c00c36aff5ad3981c614924819f139c28f4f4d52414d8efb0a7825b60e817880064dbd896b3e284fd9cf2c935538bf0cfbc420fce792d8f09
7
- data.tar.gz: 2ef50a3e021024e40fd7f9f70e1bc269b4e8755f8a776d50799b8682a3296f5fbd534f68bc7226251f7e87948095a92755442a0ec3940056a960e09246dd3c6e
6
+ metadata.gz: eabd13d50d3e6798b5eb569ecc134f3c2eb16d055d8f5a690a2a04b8c286d50d3c6e9c1591c9ab38317d3c8aa8e73220afebbf766120061745b7fa26626fd07b
7
+ data.tar.gz: 52b661dab62f61abc1ee4515941feb2b1ccffb0083ced955b14a08a7a9aaeb0775559e17fa95b85811e609682edf0a7f7604d878cf134b1b1d9a45d20ca3145d
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Opendaylight
2
2
 
3
- This gem is made as a ruby wrapper for API's FlowProgrammer api
3
+ [![Gem Version](https://badge.fury.io/rb/opendaylight.svg)](http://badge.fury.io/rb/opendaylight)
4
+
5
+ This gem is made as a ruby wrapper for OpenDayligh's FlowProgrammer API
4
6
 
5
7
  ## Installation
6
8
 
@@ -147,6 +149,13 @@ For a list of hosts, use API.hostTracker:
147
149
 
148
150
  Opendaylight::API.hostTracker
149
151
 
152
+ For a list of nodes, use
153
+ [API.nodes](https://developer.cisco.com/media/XNCREST/switchmanager/resource_SwitchNorthbound.html#path__-containerName-_nodes.html):
154
+
155
+ Opendaylight::API.nodes
156
+
157
+ Opendaylight::API.nodes(id: "00:00:00:00:00:00:00:02")
158
+
150
159
  To list all flows, use listFlows:
151
160
 
152
161
  Opendaylight::API.listFlows
@@ -52,6 +52,15 @@ module Opendaylight
52
52
  HTTParty.get("#{url}controller/nb/v2/statistics/#{containerName}/#{stats}", basic_auth: auth)
53
53
  end
54
54
 
55
+ def self.nodes(username: Opendaylight.configuration.username, password: Opendaylight.configuration.password, url: Opendaylight.configuration.url, containerName: "default", id: nil)
56
+ auth = {username: username, password: password}
57
+ if id.nil?
58
+ HTTParty.get("#{url}controller/nb/v2/switchmanager/#{containerName}/nodes", basic_auth: auth)
59
+ else
60
+ HTTParty.get("#{url}controller/nb/v2/switchmanager/#{containerName}/node/OF/#{id}", basic_auth: auth)
61
+ end
62
+ end
63
+
55
64
  def self.build_options(tpSrc: nil, protocol: nil, vlanId: nil, id: nil, type: "OF", vlanPriority: nil, idleTimeout: nil, priority: "500", ingressPort: nil, tosBits: nil, name: nil, hardTimeout: nil, dlDst: nil, installInHW: "true", etherType: "0x800", actions: nil, cookie: nil, dlSrc: nil, nwSrc: nil, nwDst: nil, tpDst: nil, username: Opendaylight.configuration.username, password: Opendaylight.configuration.password, url: Opendaylight.configuration.url, containerName: "default")
56
65
  auth = {username: username, password: password}
57
66
  options = { url: url,
@@ -1,3 +1,3 @@
1
1
  module Opendaylight
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opendaylight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - rickpr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-27 00:00:00.000000000 Z
11
+ date: 2015-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -87,8 +87,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  version: '0'
88
88
  requirements: []
89
89
  rubyforge_project:
90
- rubygems_version: 2.4.5
90
+ rubygems_version: 2.4.8
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: Ruby Wrapper for OpenDaylight
94
94
  test_files: []
95
+ has_rdoc: