Skip to content

Commit 042cb04

Browse files
Merge pull request #21 from cisco/release_1.1.0
Release 1.1.0
2 parents 363ac5a + c9e3700 commit 042cb04

File tree

375 files changed

+38961
-16387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

375 files changed

+38961
-16387
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
.bundle
12
.chef/
23
.vagrant/
34
.kitchen/
45
.kitchen.local.yml
6+
Gemfile.lock
7+
vendor/bundle/

.kitchen.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11
---
22
driver:
33
name: vagrant
4+
provider: virtualbox
5+
vm_hostname: false
6+
provision: true
47

58
provisioner:
69
name: chef_zero
10+
require_chef_omnibus: 12.6.0
11+
command_prefix: sudo ip netns exec management sudo -u vagrant
12+
13+
verifier:
14+
command_prefix: sudo ip netns exec management sudo -u vagrant
715

816
platforms:
9-
- name: packer-wrl-x86_64
10-
driver_config:
11-
box: packer-wrl-x86_64
12-
box_url: /Users/rkailas/packer/packer-wrl.box
17+
- name: nexus
18+
driver:
19+
box: n9kv
20+
vagrantfiles:
21+
- vagrantfiles/nexus.rb
22+
1323
suites:
1424
- name: default
1525
run_list:
16-
- recipe[ciscolib_nxos::cisco_package_test_all]
26+
- recipe[cisco-test::default]
1727
attributes:

.rubocop.yml

Lines changed: 43 additions & 164 deletions
Original file line numberDiff line numberDiff line change
@@ -8,203 +8,82 @@ AllCops:
88
Exclude:
99
- metadata.rb
1010
- files/**/*
11+
- vendor/**/*
1112

12-
# This configuration was generated by `rubocop --auto-gen-config`
13-
# on 2015-08-11 22:43:57 -0500 using RuboCop version 0.32.1.
14-
# The point is for the user to remove these configuration records
15-
# one by one as the offenses are removed from the code base.
16-
# Note that changes in the inspected code, or installation of new
17-
# versions of RuboCop, may require this file to be generated again.
18-
19-
# Offense count: 15
13+
# Baseline code complexity metrics - we should try and reduce these over time
2014
Metrics/AbcSize:
21-
Max: 169
15+
Max: 157
2216

23-
# Offense count: 2
24-
# Configuration parameters: CountComments.
2517
Metrics/ClassLength:
26-
Max: 135
18+
Max: 132
2719

28-
# Offense count: 10
2920
Metrics/CyclomaticComplexity:
3021
Max: 31
3122

32-
# Offense count: 64
33-
# Configuration parameters: AllowURI, URISchemes.
3423
Metrics/LineLength:
35-
Max: 158
24+
Max: 118
3625

37-
# Offense count: 16
38-
# Configuration parameters: CountComments.
3926
Metrics/MethodLength:
4027
Max: 110
4128

42-
# Offense count: 11
4329
Metrics/PerceivedComplexity:
4430
Max: 32
4531

46-
# Offense count: 1
47-
Style/AccessorMethodName:
48-
Enabled: false
49-
50-
# Offense count: 32
51-
# Cop supports --auto-correct.
52-
# Configuration parameters: EnforcedStyle, SupportedStyles.
53-
Style/AndOr:
54-
Enabled: false
32+
#
33+
# Team preferences different from Rubocop defaults:
34+
#
5535

56-
# Offense count: 12
57-
# Cop supports --auto-correct.
58-
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
59-
Style/BlockDelimiters:
60-
Enabled: false
36+
# We like table alignment for readability
37+
Style/AlignHash:
38+
EnforcedHashRocketStyle: table
39+
EnforcedColonStyle: table
6140

62-
# Offense count: 4
41+
# Template files have wildcard strings in class names
6342
Style/ClassAndModuleCamelCase:
64-
Enabled: false
65-
66-
# Offense count: 30
67-
# Configuration parameters: EnforcedStyle, SupportedStyles.
68-
Style/ClassAndModuleChildren:
69-
Enabled: false
43+
Exclude:
44+
- docs/*.rb
7045

71-
# Offense count: 1
72-
# Cop supports --auto-correct.
73-
# Configuration parameters: EnforcedStyle, SupportedStyles.
46+
# Use is_a? and kind_of? interchangeably
7447
Style/ClassCheck:
7548
Enabled: false
7649

77-
# Offense count: 12
78-
Style/ClassVars:
79-
Enabled: false
80-
81-
# Offense count: 5
82-
# Cop supports --auto-correct.
83-
Style/ColonMethodCall:
84-
Enabled: false
85-
86-
# Offense count: 32
87-
Style/Documentation:
88-
Enabled: false
50+
# Template files have atypical file names on purpose
51+
Style/FileName:
52+
Exclude:
53+
- docs/*.rb
8954

90-
# Offense count: 20
91-
# Configuration parameters: MinBodyLength.
92-
Style/GuardClause:
93-
Enabled: false
55+
# As a team we like 'sprintf' rather than 'format'
56+
Style/FormatString:
57+
EnforcedStyle: sprintf
9458

95-
# Offense count: 84
96-
# Cop supports --auto-correct.
97-
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues.
59+
# Mixed keys are ugly. Use one or the other as needed
9860
Style/HashSyntax:
99-
Enabled: false
100-
101-
# Offense count: 6
102-
# Cop supports --auto-correct.
103-
# Configuration parameters: MaxLineLength.
104-
Style/IfUnlessModifier:
105-
Enabled: false
106-
107-
# Offense count: 2
108-
# Cop supports --auto-correct.
109-
Style/Lambda:
110-
Enabled: false
61+
EnforcedStyle: ruby19_no_mixed_keys
11162

112-
# Offense count: 49
113-
# Cop supports --auto-correct.
114-
Style/LineEndConcatenation:
115-
Enabled: false
116-
117-
# Offense count: 2
118-
# Configuration parameters: EnforcedStyle, SupportedStyles.
63+
# Template files have wildcard strings in method names
11964
Style/MethodName:
120-
Enabled: false
121-
122-
# Offense count: 10
123-
# Cop supports --auto-correct.
124-
Style/MultilineBlockLayout:
125-
Enabled: false
126-
127-
# Offense count: 3
128-
Style/MultilineTernaryOperator:
129-
Enabled: false
130-
131-
# Offense count: 1
132-
# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
133-
Style/Next:
134-
Enabled: false
135-
136-
# Offense count: 6
137-
# Cop supports --auto-correct.
138-
Style/Not:
139-
Enabled: false
65+
Exclude:
66+
- docs/*.rb
14067

141-
# Offense count: 2
142-
# Cop supports --auto-correct.
68+
# Recipes shouldn't use underscores in numeric literals
14369
Style/NumericLiterals:
144-
MinDigits: 6
145-
146-
# Offense count: 5
147-
# Cop supports --auto-correct.
148-
Style/PerlBackrefs:
149-
Enabled: false
150-
151-
# Offense count: 1
152-
# Configuration parameters: EnforcedStyle, SupportedStyles.
153-
Style/RaiseArgs:
154-
Enabled: false
155-
156-
# Offense count: 1
157-
# Cop supports --auto-correct.
158-
# Configuration parameters: AllowMultipleReturnValues.
159-
Style/RedundantReturn:
160-
Enabled: false
161-
162-
# Offense count: 2
163-
# Cop supports --auto-correct.
164-
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
165-
Style/RegexpLiteral:
166-
Enabled: false
167-
168-
# Offense count: 5
169-
# Cop supports --auto-correct.
170-
# Configuration parameters: AllowAsExpressionSeparator.
171-
Style/Semicolon:
172-
Enabled: false
173-
174-
# Offense count: 1
175-
# Cop supports --auto-correct.
176-
# Configuration parameters: EnforcedStyle, SupportedStyles.
177-
Style/SignalException:
178-
Enabled: false
70+
Exclude:
71+
- recipes/*.rb
17972

180-
# Offense count: 16
181-
# Cop supports --auto-correct.
182-
Style/SpecialGlobalVars:
183-
Enabled: false
73+
# "def foo(bar=baz)" not "def foo(bar = baz)"
74+
Style/SpaceAroundEqualsInParameterDefault:
75+
EnforcedStyle: no_space
18476

185-
# Offense count: 75
186-
# Cop supports --auto-correct.
187-
# Configuration parameters: EnforcedStyle, SupportedStyles.
188-
Style/StringLiterals:
189-
Enabled: false
77+
# Let us use table-style formatting in our recipes
78+
Style/SingleSpaceBeforeFirstArg:
79+
Exclude:
80+
- recipes/*.rb
19081

191-
# Offense count: 2
192-
# Cop supports --auto-correct.
193-
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
82+
# Make it neater to extend multi-line arrays and hashes
19483
Style/TrailingComma:
195-
Enabled: false
196-
197-
# Offense count: 1
198-
Style/UnlessElse:
199-
Enabled: false
84+
EnforcedStyleForMultiline: comma
20085

201-
# Offense count: 3
202-
# Configuration parameters: EnforcedStyle, SupportedStyles.
86+
# Template files have wildcard strings in variable names
20387
Style/VariableName:
204-
Enabled: false
205-
206-
# Offense count: 7
207-
# Cop supports --auto-correct.
208-
# Configuration parameters: WordRegex.
209-
Style/WordArray:
210-
MinSize: 6
88+
Exclude:
89+
- docs/*.rb

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
sudo: false
2+
cache: bundler
3+
language: ruby
4+
bundler_args: --without kitchen_vagrant
5+
rvm:
6+
- 2.0.0
7+
- 2.1.2
8+
script:
9+
- bundle exec rubocop
10+
- bundle exec foodcritic --exclude spec ./
11+
# - bundle exec rspec

Berksfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source 'https://supermarket.chef.io'
2+
3+
metadata
4+
5+
cookbook 'cisco-test', path: 'test/fixtures/cookbooks/cisco-test'
6+

CHANGELOG.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [1.1.0] - 2016-02-12
6+
### Added
7+
- Extended cisco_interface (@robert-w-gries)
8+
- encapsulation dot1q
9+
- mtu
10+
- switchport trunk allowed vlan
11+
- switchport trunk native vlan
12+
- vrf member
13+
- Travis-CI integration, currently running Rubocop and Foodcritic validation (@glennmatthews)
14+
- Documentation workflow map to guide users, developers, and maintainers to the proper docs (@mikewiebe)
15+
- Doc updates for examples, templates, and install instructions (@chrisvanheuveln)
16+
- Test Kitchen integration (@adamleff, @edolnx)
17+
- Serverspec tests (@adamleff)
18+
- Added support for Chef 12.6.0 (@adamleff)
19+
- Updated documentation with platform support for providers and required software versions (@robert-w-gries)
20+
21+
### Fixed
22+
- Code changes to satisfy Rubocop. (@glennmatthews)
23+
- Updated cisco ohai plugin to use correct load path for vendor gems (Alex Hunsberger)
24+
- Cleaned up demo recipes for N5k, N6k, and N7k platforms (@robert-w-gries)
25+
526
## [1.0.1] - 2015-09-21
627
### Fixed
728
- Fixed broken documentation links.
@@ -24,6 +45,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
2445
- Initial release of cisco-cookbook for chef, supporting Cisco NX-OS software release 7.0(3)I2(1) on Cisco Nexus switch platforms: N95xx, N93xx, N30xx and N31xx.
2546
- Please note: 0.9.0 is an EFT pre-release for a limited audience with access to NX-OS 7.0(3)I2(1). Additional code changes may occur in 0.9.x prior to the final 1.0.0 release.
2647

27-
[unreleased]: https://github.com/cisco/cisco-network-chef-cookbook/compare/master...develop
28-
[1.0.0]: https://github.com/cisco/cisco-network-chef-cookbook/compare/v1.0.0...v0.9.0
48+
[1.1.0]: https://github.com/cisco/cisco-network-chef-cookbook/compare/v1.0.1...v1.1.0
49+
[1.0.1]: https://github.com/cisco/cisco-network-chef-cookbook/compare/v1.0.0...v1.0.1
50+
[1.0.0]: https://github.com/cisco/cisco-network-chef-cookbook/compare/v0.9.0...v1.0.0
2951

CONTRIBUTING.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ Cisco Network Elements support a rich set of features to make network robust, ef
44
## Getting Started
55

66
* 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.
7+
* A virtual Nexus N9000/N3000 may be helpful for development and testing. Users with a valid [cisco.com](http://cisco.com) user ID can obtain a copy of a virtual Nexus N9000/N3000 by sending their [cisco.com](http://cisco.com) user ID in an email to <get-n9kv@cisco.com>. If you do not have a [cisco.com](http://cisco.com) user ID please register for one at [https://tools.cisco.com/IDREG/guestRegistration](https://tools.cisco.com/IDREG/guestRegistration)
8+
89

910
## Making Changes
1011

1112
* Fork the repository
1213
* Pull a branch under the "**develop**" branch for your changes.
13-
* Follow all guidelines documented in [README-develop-resources-providers.md](docs/README-develop-resources-providers.md)
14+
* Follow all guidelines documented in [README-develop-resources-providers.md](docs/README-develop-resources-providers.md)
1415
* Make changes in your branch.
1516
* Testing
1617
* Run all the tests to ensure there was no collateral damage to existing code.
@@ -24,6 +25,12 @@ Cisco Network Elements support a rich set of features to make network robust, ef
2425
* Submit a pull request to the repository
2526
* A core team consisting of Cisco and Chef Inc employees will review your pull request and provide feedback.
2627
* 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+
* All code commits must be associated with your github account and email address. Before committing any code use the following commands to update your workspace with your credentials:
29+
30+
```bash
31+
git config --global user.name "John Doe"
32+
git config --global user.email johndoe@example.com
33+
```
2734

2835
# Additional Resources
2936

Gemfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
source 'https://rubygems.org'
2+
3+
group :test do
4+
gem 'foodcritic'
5+
gem 'rake', '~> 10.0'
6+
gem 'rspec'
7+
gem 'rubocop', '= 0.34'
8+
end
9+
10+
gem 'test-kitchen', git: 'https://github.com/test-kitchen/test-kitchen', branch: 'master'
11+
gem 'kitchen-vagrant'
12+
gem 'berkshelf'

0 commit comments

Comments
 (0)