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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 542700d95226acf495a0bbc6f2b5f311f3b566c7
4
- data.tar.gz: efa31a0355fb5cf466402b600c62aacf4e8c57fd
3
+ metadata.gz: 7e2d624170dbdd964a78f9546ca6692a906d5607
4
+ data.tar.gz: 396c07c1a48f4069d73b78cb8164b862ff129730
5
5
  SHA512:
6
- metadata.gz: 2f3a90902dcc3c582908fd52a047e0615dd92493b48faf94eaf9e0e3d9af86693b05b2e56225645214f2b76dfd9e543eb96c8bb4cabccc421c0e166fdd831843
7
- data.tar.gz: 7faec067f7c28bf7a1a875768c15fb763495c335b5ee8935472c862377cca2b42203cf3d6d163e5a3d0dff6e40b3ee6d1d933c1ccaf08ae47aac6b812e9717f9
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
- CONTROLLER
68
- DROP
69
- ENQUEUE
70
- FLOOD
71
- FLOOD_ALL
72
- HW_PATH
73
- INTERFACE
74
- LOOPBACK
75
- OUTPUT
76
- POP_VLAN
77
- PUSH_VLAN
78
- SET_DL_DST
79
- SET_DL_SRC
80
- SET_DL_TYPE
81
- SET_NEXT_HOP
82
- SET_NW_DST
83
- SET_NW_SRC
84
- SET_NW_TOS
85
- SET_TP_DST
86
- SET_TP_SRC
87
- SET_VLAN_CFI
88
- SET_VLAN_ID
89
- SET_VLAN_PCP
90
- SW_PATH
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
 
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Opendaylight
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  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.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - rickpr