cisco_nxapi 0.9.0 → 1.0.0
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/CHANGELOG.md +9 -0
- data/CONTRIBUTING.md +28 -14
- data/SUPPORT.md +3 -0
- data/lib/cisco_nxapi/cisco_nxapi.rb +8 -0
- data/lib/cisco_nxapi/version.rb +1 -1
- metadata +23 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63d9532b69dca7a3d89222ab55572a22cd3eabac
|
4
|
+
data.tar.gz: e16273c18cbb27992cde626b79d966395edc6f7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efceaaee7cca21224a8a105998b203f7c3f44a08decc02cca3f2b9bac0fafb3e7b2bec923b3e26b84561c53183803060275f72637a623685745310f5726aac41
|
7
|
+
data.tar.gz: 6bbde4135eba7ab19101df8d7c551925f99dfd539d4665ee42e7212de77f46a84c848c0a5185cbaac3281f6e2022406c5de533e775101b8b136d188571738d34
|
data/CHANGELOG.md
CHANGED
data/CONTRIBUTING.md
CHANGED
@@ -1,19 +1,33 @@
|
|
1
|
-
#
|
1
|
+
# How to contribute
|
2
|
+
Cisco Network Elements support a rich set of features to make networks robust, efficient and secure. The GitHub project [cisco-network-puppet-module](https://github.com/cisco/cisco-network-puppet-module) defines a set of Puppet resource types and providers to manage the network element. Similarly, the GitHub project [cisco-network-chef-cookbook](https://github.com/cisco/cisco-network-chef-cookbook) defines a set of Chef resources and providers for network element management. The providers defined in these projects leverage a common set of Ruby API Objects defined in this project. This object set is expected to grow with contributions from Cisco, Cisco-Partners and third-party alike. Contributions to this project are welcome. To ensure code quality, contributors will be requested to follow few guidelines.
|
2
3
|
|
3
|
-
##
|
4
|
+
## Getting Started
|
4
5
|
|
5
|
-
|
6
|
+
* Create a [GitHub account](https://github.com/signup/free)
|
7
|
+
* Create a [cisco.com](http://cisco.com) account if you need access to a Network Simulator to test your code.
|
6
8
|
|
7
|
-
##
|
9
|
+
## Making Changes
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
11
|
+
* Fork the repository
|
12
|
+
* Pull a branch under the "develop" branch for your changes.
|
13
|
+
* Make changes in your branch.
|
14
|
+
* Testing
|
15
|
+
* Create a minitest for new APIs or new functionality
|
16
|
+
* Run all the tests to ensure there was no collateral damage to existing code
|
17
|
+
* Committing
|
18
|
+
* Check for unnecessary whitespace with `git diff --check` before committing.
|
19
|
+
* Run `rubocop --lint` against all changed files. See [https://rubygems.org/gems/rubocop](https://rubygems.org/gems/rubocop)
|
20
|
+
* Make sure your commit messages clearly describe the problem you are trying to solve and the proposed solution.
|
21
|
+
|
22
|
+
## Submitting Changes
|
23
|
+
|
24
|
+
* All contributions you submit to this project are voluntary and subject to the terms of the Apache 2.0 license
|
25
|
+
* Submit a pull request to the repository
|
26
|
+
* A core team consisting of Cisco and Cisco-Partner employees will looks at Pull Request and provide feedback.
|
27
|
+
* After feedback has been given we expect responses within two weeks. After two weeks we may close the pull request if it isn't showing any activity.
|
28
|
+
|
29
|
+
# Additional Resources
|
30
|
+
|
31
|
+
* [General GitHub documentation](http://help.github.com/)
|
32
|
+
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
|
19
33
|
|
data/SUPPORT.md
ADDED
@@ -92,6 +92,11 @@ module CiscoNxapi
|
|
92
92
|
# In this case, a username and password are mandatory
|
93
93
|
fail TypeError if username.nil? || password.nil?
|
94
94
|
end
|
95
|
+
# The default read time out is 60 seconds, which may be too short for
|
96
|
+
# scaled configuration to apply. Change it to 300 seconds, which is
|
97
|
+
# also used as the default config by firefox.
|
98
|
+
@http.read_timeout = 300
|
99
|
+
|
95
100
|
unless username.nil?
|
96
101
|
fail TypeError, 'invalid username' unless username.is_a?(String)
|
97
102
|
fail ArgumentError, 'empty username' unless username.length > 0
|
@@ -299,6 +304,9 @@ module CiscoNxapi
|
|
299
304
|
# Examples: "Invalid input", "Incomplete command", etc.
|
300
305
|
fail CliError.new(command, output['msg'], output['code'],
|
301
306
|
output['clierror'], prev_cmds)
|
307
|
+
elsif output['code'] == '413'
|
308
|
+
# Request too large
|
309
|
+
fail NxapiError.new("Error 413: #{output['msg']}")
|
302
310
|
elsif output['code'] == '501'
|
303
311
|
# if structured output is not supported for this command,
|
304
312
|
# raise an exception so that the calling function can
|
data/lib/cisco_nxapi/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cisco_nxapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Hunsberger
|
@@ -12,88 +12,88 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2015-
|
15
|
+
date: 2015-08-25 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: minitest
|
19
19
|
requirement: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
|
-
- -
|
21
|
+
- - '>='
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 2.5.1
|
24
|
-
- -
|
24
|
+
- - <
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 5.0.0
|
27
27
|
type: :development
|
28
28
|
prerelease: false
|
29
29
|
version_requirements: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 2.5.1
|
34
|
-
- -
|
34
|
+
- - <
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: 5.0.0
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: bundler
|
39
39
|
requirement: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- -
|
41
|
+
- - ~>
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '1.7'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
46
|
version_requirements: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
|
-
- -
|
48
|
+
- - ~>
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: '1.7'
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
52
|
name: rake
|
53
53
|
requirement: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
|
-
- -
|
55
|
+
- - ~>
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '10.0'
|
58
58
|
type: :development
|
59
59
|
prerelease: false
|
60
60
|
version_requirements: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
|
-
- -
|
62
|
+
- - ~>
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: '10.0'
|
65
65
|
- !ruby/object:Gem::Dependency
|
66
66
|
name: rubocop
|
67
67
|
requirement: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
|
-
- -
|
69
|
+
- - '>='
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '0.32'
|
72
72
|
type: :development
|
73
73
|
prerelease: false
|
74
74
|
version_requirements: !ruby/object:Gem::Requirement
|
75
75
|
requirements:
|
76
|
-
- -
|
76
|
+
- - '>='
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '0.32'
|
79
79
|
- !ruby/object:Gem::Dependency
|
80
80
|
name: net_http_unix
|
81
81
|
requirement: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
|
-
- -
|
83
|
+
- - ~>
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0.2'
|
86
|
-
- -
|
86
|
+
- - '>='
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: 0.2.1
|
89
89
|
type: :runtime
|
90
90
|
prerelease: false
|
91
91
|
version_requirements: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
|
-
- -
|
93
|
+
- - ~>
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0.2'
|
96
|
-
- -
|
96
|
+
- - '>='
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: 0.2.1
|
99
99
|
description: |
|
@@ -104,15 +104,16 @@ executables: []
|
|
104
104
|
extensions: []
|
105
105
|
extra_rdoc_files: []
|
106
106
|
files:
|
107
|
-
-
|
108
|
-
-
|
109
|
-
-
|
107
|
+
- .gitignore
|
108
|
+
- .rubocop.yml
|
109
|
+
- .rubocop_todo.yml
|
110
110
|
- CHANGELOG.md
|
111
111
|
- CONTRIBUTING.md
|
112
112
|
- Gemfile
|
113
113
|
- LICENSE
|
114
114
|
- README.md
|
115
115
|
- Rakefile
|
116
|
+
- SUPPORT.md
|
116
117
|
- cisco_nxapi.gemspec
|
117
118
|
- lib/cisco_nxapi.rb
|
118
119
|
- lib/cisco_nxapi/cisco_logger.rb
|
@@ -132,17 +133,17 @@ require_paths:
|
|
132
133
|
- lib
|
133
134
|
required_ruby_version: !ruby/object:Gem::Requirement
|
134
135
|
requirements:
|
135
|
-
- -
|
136
|
+
- - '>='
|
136
137
|
- !ruby/object:Gem::Version
|
137
138
|
version: '0'
|
138
139
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
140
|
requirements:
|
140
|
-
- -
|
141
|
+
- - '>='
|
141
142
|
- !ruby/object:Gem::Version
|
142
143
|
version: '0'
|
143
144
|
requirements: []
|
144
145
|
rubyforge_project:
|
145
|
-
rubygems_version: 2.
|
146
|
+
rubygems_version: 2.1.11
|
146
147
|
signing_key:
|
147
148
|
specification_version: 4
|
148
149
|
summary: Utilities for working with Cisco NX-OS NX-API
|