opendaylight 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +32 -25
- data/lib/opendaylight.rb +5 -0
- data/lib/opendaylight/version.rb +1 -1
- 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: 7e2d624170dbdd964a78f9546ca6692a906d5607
|
4
|
+
data.tar.gz: 396c07c1a48f4069d73b78cb8164b862ff129730
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c606f387afb2887ce8c028a9807f6e41d921da2ef00a9f0b5f69120b266e21363fb3edc7df83e23eed2ad55cd0f4f4afe1040c12fce8a0e1a450e9cc22a4439b
|
7
|
+
data.tar.gz: de7ec0e996a6875814a75437c230d338f624330d703f1186406f395128021aa0b1b3b89d95bcea390a775a4c1d1310862190530a3fb33d789002e0410f030564
|
data/README.md
CHANGED
@@ -32,6 +32,10 @@ For example:
|
|
32
32
|
|
33
33
|
Opendaylight::API.makeflow(id: "00:00:00:00:00:00:00:02", name: "flow1", actions: "DROP")
|
34
34
|
|
35
|
+
API.deleteflow works exactly the same way, except you do not need to specify an action:
|
36
|
+
|
37
|
+
Opendaylight::API.deleteflow(id: "00:00:00:00:00:00:00:02", name: "flow1")
|
38
|
+
|
35
39
|
Here are the possible arguments for makeflow. All the arguments default to nil unless otherwise specified:
|
36
40
|
|
37
41
|
#Server information
|
@@ -64,30 +68,31 @@ Here are the possible arguments for makeflow. All the arguments default to nil u
|
|
64
68
|
|
65
69
|
|
66
70
|
## OpenDaylight Actions for the actions field
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
71
|
+
|
72
|
+
CONTROLLER # Send to controller
|
73
|
+
DROP # Drop Packet
|
74
|
+
ENQUEUE # Enqueue Packet
|
75
|
+
FLOOD # Flood packet
|
76
|
+
FLOOD_ALL # Flood to all available ports
|
77
|
+
HW_PATH # Take hardware path
|
78
|
+
INTERFACE
|
79
|
+
LOOPBACK
|
80
|
+
OUTPUT # Set output port
|
81
|
+
POP_VLAN # Remove VLAN Header
|
82
|
+
PUSH _VLAN # Add VLAN Header
|
83
|
+
SET_DL_DST # Set MAC destination
|
84
|
+
SET_DL_SRC # Set MAC Source
|
85
|
+
SET_DL_TYPE
|
86
|
+
SET_NEXT_HOP # Set static hop
|
87
|
+
SET_NW_DST # Set IP Destination
|
88
|
+
SET_NW_SRC # Set IP Source
|
89
|
+
SET_NW_TOS # Set Type Of Service
|
90
|
+
SET_TP_DST # Set TCP Destination Port
|
91
|
+
SET_TP_SRC # Set TCP Source Port
|
92
|
+
SET_VLAN_CFI
|
93
|
+
SET_VLAN_ID # Set VLAN ID
|
94
|
+
SET_VLAN_PCP
|
95
|
+
SW_PATH # Take software path
|
91
96
|
|
92
97
|
##Topology
|
93
98
|
|
@@ -153,9 +158,11 @@ For statistics, use statistics:
|
|
153
158
|
Defaults to flow statistics.
|
154
159
|
|
155
160
|
TODO:
|
156
|
-
DRY up code by adding "options" and "auth" methods.
|
157
161
|
Make the code prettier by splitting into files.
|
158
162
|
Finish covering the API.
|
163
|
+
Build a better sample app.
|
164
|
+
|
165
|
+
For the current working sample app, check out [Faizi](https://github.com/rickpr/faizi)
|
159
166
|
|
160
167
|
## Contributing
|
161
168
|
|
data/lib/opendaylight.rb
CHANGED
@@ -27,6 +27,11 @@ module Opendaylight
|
|
27
27
|
HTTParty.put("#{options[:url]}controller/nb/v2/flowprogrammer/#{options[:containerName]}/node/#{options[:type]}/#{options[:id]}/staticFlow/#{options[:name]}",options[:request])
|
28
28
|
end
|
29
29
|
|
30
|
+
def self.deleteflow **params
|
31
|
+
options = build_options params
|
32
|
+
HTTParty.delete("#{options[:url]}controller/nb/v2/flowprogrammer/#{options[:containerName]}/node/#{options[:type]}/#{options[:id]}/staticFlow/#{options[:name]}",options[:request])
|
33
|
+
end
|
34
|
+
|
30
35
|
def self.topology(username: Opendaylight.configuration.username, password: Opendaylight.configuration.password, url: Opendaylight.configuration.url, containerName: "default")
|
31
36
|
auth = {username: username, password: password}
|
32
37
|
HTTParty.get("#{url}controller/nb/v2/topology/#{containerName}", basic_auth: auth)
|
data/lib/opendaylight/version.rb
CHANGED