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 +4 -4
- data/README.md +10 -1
- data/lib/opendaylight.rb +9 -0
- data/lib/opendaylight/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f44cd9094f7a592beaf63267991fff549ca6bb3a
|
4
|
+
data.tar.gz: b2d79e707881276d4058441a69888d29160c86f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eabd13d50d3e6798b5eb569ecc134f3c2eb16d055d8f5a690a2a04b8c286d50d3c6e9c1591c9ab38317d3c8aa8e73220afebbf766120061745b7fa26626fd07b
|
7
|
+
data.tar.gz: 52b661dab62f61abc1ee4515941feb2b1ccffb0083ced955b14a08a7a9aaeb0775559e17fa95b85811e609682edf0a7f7604d878cf134b1b1d9a45d20ca3145d
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Opendaylight
|
2
2
|
|
3
|
-
|
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
|
data/lib/opendaylight.rb
CHANGED
@@ -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,
|
data/lib/opendaylight/version.rb
CHANGED
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.
|
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:
|
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.
|
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:
|