brocade_vrouter 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +14 -14
- data/lib/brocade_vrouter/configurator.rb +3 -3
- data/lib/brocade_vrouter/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42dbd45b0ff243821272d6b5f8d9c3adc5381e43
|
4
|
+
data.tar.gz: c4b543d72f2d25340cd02c1d346294ae5124ecdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21a25edac7ea29470fc2961dd170e5fc16d4b0da02a0ebaa3d272b425bc8d4112fa025c5ce28f48d2465ce12130fa60de183d13a9a94a223bc5ee8b57d78b15b
|
7
|
+
data.tar.gz: 5abeaa2b9b492bbb0ecf84d0e39af531dc062953aeacc542643793953d6291f157835c9437e8cac1e251e8e99751124252b9a15d4dcbdbab56541dc86792e83a
|
data/README.md
CHANGED
@@ -41,19 +41,19 @@ router = BrocadeVRouter::Client.new url: 'https://examplerouter.com',
|
|
41
41
|
```ruby
|
42
42
|
router.configure do
|
43
43
|
set security do
|
44
|
-
vpn l2tp
|
45
|
-
username testuser do
|
44
|
+
vpn 'l2tp remote-access authentication local-users' do
|
45
|
+
username 'testuser' do
|
46
46
|
password 'testpass'
|
47
47
|
static_ip '10.0.2.1'
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
-
firewall name
|
52
|
-
default_action drop
|
51
|
+
firewall name: :testfw do
|
52
|
+
default_action :drop
|
53
53
|
rule 100 do
|
54
|
-
action accept
|
55
|
-
source address '10.0.2.1'
|
56
|
-
destination address '10.0.2.0/24'
|
54
|
+
action :accept
|
55
|
+
source address: '10.0.2.1'
|
56
|
+
destination address: '10.0.2.0/24'
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
@@ -66,13 +66,13 @@ CLI equivalent:
|
|
66
66
|
|
67
67
|
```
|
68
68
|
configure
|
69
|
-
set security vpn l2tp remote-access authentication local-users username
|
70
|
-
set security vpn l2tp remote-access authentication local-users username
|
71
|
-
set security firewall name
|
72
|
-
set security firewall name
|
73
|
-
set security firewall name
|
74
|
-
set security firewall name
|
75
|
-
set security firewall name
|
69
|
+
set security vpn l2tp remote-access authentication local-users username testuser password testpass
|
70
|
+
set security vpn l2tp remote-access authentication local-users username testuser static-ip 10.0.2.1
|
71
|
+
set security firewall name testfw
|
72
|
+
set security firewall name testfw default-action drop
|
73
|
+
set security firewall name testfw rule 100 action accept
|
74
|
+
set security firewall name testfw rule 100 source address 10.0.2.1
|
75
|
+
set security firewall name testfw rule 100 destination address 10.0.2.0/24
|
76
76
|
commit
|
77
77
|
```
|
78
78
|
|
@@ -37,8 +37,8 @@ module BrocadeVRouter
|
|
37
37
|
res.size > 1 ? res : res.first
|
38
38
|
end
|
39
39
|
|
40
|
-
def get
|
41
|
-
path =
|
40
|
+
def get(cmd = 'configuration')
|
41
|
+
path = "rest/op/show/#{cmd}"
|
42
42
|
handle_request :post, path
|
43
43
|
resp = handle_response connection.post "/#{path}"
|
44
44
|
|
@@ -48,7 +48,7 @@ module BrocadeVRouter
|
|
48
48
|
handle_request :get, path
|
49
49
|
resp = handle_response connection.get "/#{path}"
|
50
50
|
|
51
|
-
Configuration.new(resp.body).to_h
|
51
|
+
resp.success? && cmd == 'configuration' ? Configuration.new(resp.body).to_h : resp.body
|
52
52
|
end
|
53
53
|
|
54
54
|
def delete(paths = nil, &blk)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brocade_vrouter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Kosmatov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
171
|
rubyforge_project:
|
172
|
-
rubygems_version: 2.5.
|
172
|
+
rubygems_version: 2.5.2
|
173
173
|
signing_key:
|
174
174
|
specification_version: 4
|
175
175
|
summary: Brocade 5600 vRouter client
|