Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade services #516

Merged
merged 15 commits into from
Feb 15, 2017
Merged

Upgrade services #516

merged 15 commits into from
Feb 15, 2017

Conversation

rahushen
Copy link
Contributor

Summary:

  • Added API 'image_version' that returns the version number of an image 7.0(3)I2(5). If no image is provided to the API it returns the version of the image the device is booted up with. All tests were done with the image present on the bootflash: (media).

  • Added API to upgrade/downgrade the NXOS System using the 'install all nxos' command. The installation image has to be present on the bootflash: media. Installation over other sources such as tftp: and scp: are not supported at the moment.

-Added APIs to verify if device upgraded, clear previous install log and to delete images from the box.

Tested on: n3k, n9k

@mikewiebe mikewiebe self-assigned this Feb 14, 2017
@@ -57,7 +57,7 @@ def config_get(feature, property, *args)
return ref.default_value if ref.default_value? && !ref.getter?

get_args, ref = massage_structured(ref.getter(*args).clone, ref)
data = get(command: ref.get_command,
data = get(command: get_args[:command],
Copy link
Contributor

@mikewiebe mikewiebe Feb 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to make sure we run a full minitest and beaker test with this change just be be on the safe side.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After discussion, will not be running the entire suite.

@@ -0,0 +1,80 @@
# October 2016, Michael G Wiebe
#
# Copyright (c) 2016 Cisco and/or its affiliates.
Copy link
Contributor

@mikewiebe mikewiebe Feb 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the Copyright's here: Copyright (c) 2016-2017

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -0,0 +1,52 @@
# Copyright (c) 2016 Cisco and/or its affiliates.
Copy link
Contributor

@mikewiebe mikewiebe Feb 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the Copyright's here: Copyright (c) 2016-2017

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

# limitations under the License.

require_relative 'node_util'
require 'pry'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove require 'pry'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

raise e
end

# Deletes the image that the device is currently booted up with
Copy link
Contributor

@mikewiebe mikewiebe Feb 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: # Deletes currently booted image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

def self.image_version(image='', media='bootflash:')
# If no image is passed in check the version of the image which is
# booted up on the switch.
if image == ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: # Returns version of currently booted image by default

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


def self.save_config
config_set('service', 'save_config')
end
Copy link
Contributor

@mikewiebe mikewiebe Feb 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably need a rescue for save_config.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


upgraded:
kind: boolean
get_command: 'show install all status'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does 'show install all status' return after the reboot is complete? I think it would be best to return status information after the reboot to indicate the upgrade is complete.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

show install all status returns - a detailed log message of all steps done to upgrade/downgrade the device including but not limited to checking image version, md5 and saving config etc. If there are errors, it has logs to the step the image passed. If an image is acceptable and the device can upgrade the last message is ''Finishing the upgrade, switch will reboot". In any case NX-API returns 200. Maybe we can leave this API as is, and add another one that returns the log ? Let me know your thoughts

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. Let's leave this for now.


require_relative 'ciscotest'
require_relative '../lib/cisco_node_utils/service'
require 'pp'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove require 'pp'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


def test_clear_status
Service.clear_status
assert_equal(Service.upgraded?, false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

assert_equal(Service.upgraded?, false)
end

def test_delete
Copy link
Contributor

@mikewiebe mikewiebe Feb 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple thoughts on test_delete and test_delete_boot.

  • Instead of commenting these out, see my comment below on using a yaml file to drive the tests.
  • We should add tests to verify that we get a Cisco::CliError for self.delete when the images or media indexes to a non-existent image.

Copy link
Contributor

@mikewiebe mikewiebe Feb 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking more. We could verify test_delete by creating a fake file, verify it's present on bootflash, delete it and verify it's absent. Less destructive but still verifies the logic.

  • Update: Use the yaml file for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a negative testcase for self.delete and commented out test_delete_boot

end

# Returns version of the 'image'
def self.image_version(image='', media='bootflash:')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think i would be better to make initialize both args to nil and re-write the method as follows:

def self.image_version(image=nil, media=nil)
  if image && media
    config_get('service', 'image_version', image: image, media: media)
  else
    config_get('show_version', 'version').split(' ')[0]
  end
end

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

end

def test_image_version
assert_equal(Service.image_version('nxos.7.0.3.I2.1.bin'), '7.0(3)I2(1)')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now let's just test the 'show version' aspect of image_version since it does not require a specific image to be present.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

end

def test_upgrade
sleep 30
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to sleep 30?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to remove the order dependency from the tests. In the event test_clear_status runs before test_upgrade , I wanted to avoid the backend processing error we've been getting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. I would prefer we catch the error in the test and retry instead of sleep.


def test_upgrade
sleep 30
Service.upgrade('nxos.7.0.3.I2.5.bin')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so instead of commenting out these tests which will break our develop branch if these images are not present, let's drive the test via a yaml file. If the yaml file is present then the test runs with the values from the yaml file. If not, the test is skipped. Here is an example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Service.upgrade('nxos.7.0.3.I2.5.bin')
# Wait for device to reboot
sleep 250
assert_equal(Service.upgraded?, true)
Copy link
Contributor

@mikewiebe mikewiebe Feb 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert(Service.upgraded?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use a retry loop to verify the upgrade is successful instead of using a sleep statement so we don't have to adjust it later and takes the minimum amount of time possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@mikewiebe
Copy link
Contributor

@rahushen Done with this round of reviews. Let me know if you have any questions.

assert(Service.upgraded?)
rescue
tries ||= 1
retry unless (tries += 1) > 3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not set the tries value to something large like 30 or 50 and then just sleep for 1 second inside the rescue block? That way our total sleep interval is as small as possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sleep is not in the retry block. The device waits 10 seconds after install all to reboot. The sleep just makes sure we run 'install all status' after the device reboots. The Service.upgrade? shouldn't require more than 3 tries. It fails the first time because of a timeout when the device is reloading and NX-API can't get a handle to the device

@mikewiebe
Copy link
Contributor

Make sure to add an entry to the CHANGELOG.

https://github.com/cisco/cisco-network-node-utils/blob/develop/CHANGELOG.md

assert_match(/^\d.\d\(\d\)\S+\(\d+\)$/, version)
end

def test_upgrade
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rahushen Just realized that this test will fail if you run it and try to upgrade with the image that is currently booted. The install all command will still go through a series of checks but then indicate that the install was successful.

Here is the sample output.

n9k-109# sh install all status 
There is an on-going installation...
Enter Ctrl-C to go back to the prompt.


Verifying image bootflash:/nxos.7.0.3.I5.0.231.CSCvb69953.bin for boot variable "nxos".
 -- SUCCESS

Verifying image type.
 -- SUCCESS

Preparing "bios" version info using image bootflash:/nxos.7.0.3.I5.0.231.CSCvb69953.bin.
 -- SUCCESS

Preparing "nxos" version info using image bootflash:/nxos.7.0.3.I5.0.231.CSCvb69953.bin.
 -- SUCCESS

Performing module support checks.
 -- SUCCESS

Notifying services about system upgrade.
 -- SUCCESS



Compatibility check is done:
Module  bootable          Impact  Install-type  Reason
------  --------  --------------  ------------  ------
     1       yes  non-disruptive          none  
    22       yes  non-disruptive          none  
    24       yes  non-disruptive          none  
    26       yes  non-disruptive          none  
    28       yes  non-disruptive          none  
    29       yes  non-disruptive          none  
    30       yes  non-disruptive          none  



Images will be upgraded according to following table:
Module       Image                  Running-Version(pri:alt)           New-Version  Upg-Required
------  ----------  ----------------------------------------  --------------------  ------------
     1       lcn9k                               7.0(3)I5(1)           7.0(3)I5(1)            no
     1        bios                       v01.48(00:v01.40(00             v01.48(00            no
    22       lcn9k                               7.0(3)I5(1)           7.0(3)I5(1)            no
    22        bios                       v01.48(00:v01.42(00             v01.48(00            no
    24       lcn9k                               7.0(3)I5(1)           7.0(3)I5(1)            no
    24        bios                       v01.48(00:v01.42(00             v01.48(00            no
    26       lcn9k                               7.0(3)I5(1)           7.0(3)I5(1)            no
    26        bios                       v01.48(00:v01.42(00             v01.48(00            no
    28        nxos                               7.0(3)I5(1)           7.0(3)I5(1)            no
    28        bios     v08.32(10/18/2016):v08.06(09/10/2014)    v08.31(08/26/2016)            no
    29       lcn9k                               7.0(3)I5(1)           7.0(3)I5(1)            no
    29        bios                       v01.48(00:v01.42(00             v01.48(00            no
    30       lcn9k                               7.0(3)I5(1)           7.0(3)I5(1)            no
    30        bios                       v01.48(00:v01.42(00             v01.48(00            no



Install is in progress, please wait.

Performing runtime checks.
 -- SUCCESS

Setting boot variables.
 -- SUCCESS

Performing configuration copy.
 -- SUCCESS

Module 1: Refreshing compact flash and upgrading bios/loader/bootrom.
Warning: please do not remove or power off the module at this time.
 -- SUCCESS

Module 22: Refreshing compact flash and upgrading bios/loader/bootrom.
Warning: please do not remove or power off the module at this time.
 -- SUCCESS

Module 24: Refreshing compact flash and upgrading bios/loader/bootrom.
Warning: please do not remove or power off the module at this time.
 -- SUCCESS

Module 26: Refreshing compact flash and upgrading bios/loader/bootrom.
Warning: please do not remove or power off the module at this time.
 -- SUCCESS

Module 28: Refreshing compact flash and upgrading bios/loader/bootrom.
Warning: please do not remove or power off the module at this time.
 -- SUCCESS

Module 29: Refreshing compact flash and upgrading bios/loader/bootrom.
Warning: please do not remove or power off the module at this time.
 -- SUCCESS

Module 30: Refreshing compact flash and upgrading bios/loader/bootrom.
Warning: please do not remove or power off the module at this time.
 -- SUCCESS

Install has been successful.
n9k-109# 

We probably need to update the yaml file to look for both of the following.
get_value: '/Finishing the upgrade, switch will reboot|Install has been successful/'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made this change and added a test.

@mikewiebe
Copy link
Contributor

👍

@mikewiebe mikewiebe merged commit d82ffbc into develop Feb 15, 2017
mikewiebe added a commit that referenced this pull request Mar 14, 2017
* Modification of tacacs_server for tacacs_global

* Add README-pre-1.3.0.md

Save this for now since it has 8k/XR info.

* Add 8K to BGP wait_for_process_initialized()

* Add 8K to OSPF wait_for_process_initialized()

* ios xr implementation of snmpserver

snmp_server for IOS_XR, contact and location

* feature vfd

* changelog

* First commit

* remove new files

* first commit

* first commit

* test

* Review comments

* Fix few things

* testing

* fabricpath

* Collapse release_1.3.1 to develop

* more tests

* tested on platforms

* minitest complete

* remove exclude for echo_interface

* bfd_global

* Fix error in init

* review comments

* EXR support for snmp_community

* loopback added to echo intf

* implementing snmp_notification_receiver for XR

* bfd_global: Add remaining properties (#418)

* errors fixed

* interval array change

* missing ipv6 default

* remove name

* add exclude for interval

* Add comments

* Review comment fixes

* Bfd for bgp_neighbor (#419)

* errors fixed

* interval array change

* missing ipv6 default

* remove name

* add exclude for interval

* Add comments

* Review comment fixes

* bfd prop added to bgp_neighbor

* CHANGELOG

* review comment

* rview comments

* Update CHANGELOG.md

* version may be absent on 'snmp-server host' (#420)

* Ospf Area (#422)

* partial code commit, no test yet

* partial testing

* range added

*  fix range

* fix default cost

* Added comments

* other method add

* review comments

* partial review comments fixed

* partial review comments fixed

* fix auth and stub

* All review comments fixed

* bug ID added

* Switchport trunk allowed vlan now accepts 'vlan add' lines (#423)

* Fix regexp to only accept vlan ranges

* Trunk allowed vlan now handles 'vlan add' lines

* Condense vlan configuration and fix teardown error (#426)

* test_aaa*: shorten class & testcase names

* test_interface*: short class & testcase names

* modify/delete some repetitive tests

* tested on n9-i4

* Add feature ospf enable (#428)

* test_pim_group_list: class/testcase renaming

* Tested on n9-i4

* test_snmpcommunity: short class/testcase names

* snmpuser: dummy_user var does not exist

* YANG JSON support for gRPC client (#425)

* Added support for setting/getting YANG config

* revert

* skip all tests on nexus

* cleanup

* method name change

* fixed rubocop errors

* Changes based on feedback

* removed blank line

* test_snmpuser: shorten testcase names

* test_tacacs_server_host: class/testcase name changes

* minitest: shorten class / testcase names

* Added IOS XR support for snmp_user

* Refactored snmp_user

* Updated test_snmpuser.rb

* Fixed NXOS issue with snmp_user

* Updated test_snmpuser.rb for NXOS

* Update docs for XR + small fix (#431)

* Resurrected XR doc. Fixed constant reference.

* split line that was too long

* removed whitespace

* Fixed 6.0.0 version number.

* changes based on review

* Refactor test_snmpserver (#430)

* Refactor test_snmpcommunity

* Shortened class/testcase names
* Removed redundancy by combining several test sections into a single test
* Added validate_property checks

* Tested on n9-i4

* remove comment line

* implement tacacs_global to match radius_global (#429)

* Add nssa support to ospf_area (#432)

This PR is for router_ospf_area provider which includes nssa properties.
All tests pass on on platforms except on n8k.
On n8k, commands like "area nssa default-information-originate" and "area nssa default-information-originate route-map " are not getting configured properly after we reset nssa and due to this the relevant tests failed. Bug is filed on nxos platform and skipping these tests only on n8k.

* partial code commit, no test yet

* partial testing

* range added

*  fix range

* fix default cost

* Added comments

* other method add

* review comments

* partial review comments fixed

* partial review comments fixed

* fix auth and stub

* All review comments fixed

* bug ID added

* nssa translate added

* nssa properties added

* comments added

* route-map default is empty

* skip few tests for n8k due to bugs

* Review comments

* Added support for retrieving operational data via gRPC/YANG (#433)

* Added show_running_yang utility.  Allow retrieval of operational yang data.

* Added show_running_yang utility.  Allow retrieval of operational yang data.

* Updated changelog.  Fixed comment.

* Fixed rubocop error

* Removed extra space.

* ospf_area: Fix hash in nssa_set (#434)

This PR is for changing the nssa_set method in the ospf_area NU due to the review comments on the puppet side. This simplifies the previous version.

Also changed authentication 'clear_text' to 'cleartext' to keep consistency among all the other providers.
Chris has the context about this PR and so it is better if he reviews this.

* Add feature ospf enable

* review comments

* Add ospf_area_vlink (#436)

* partial code commit, no test yet

* partial testing

* range added

*  fix range

* fix default cost

* Added comments

* other method add

* review comments

* partial review comments fixed

* partial review comments fixed

* fix auth and stub

* All review comments fixed

* bug ID added

* nssa translate added

* nssa properties added

* comments added

* route-map default is empty

* skip few tests for n8k due to bugs

* Review comments

* first commit

* test code for vls

* test code for vls

* add more tests

* auth added

* cleartext added

* authentication_key_pw added

* message_digest_key added

* default for key_id

* comments add

* CHANGELOG fixed

* comment added

* review coments

* fixes to tacacs_global (#437)

* Rubocop fixes for PR 435 (#438)

* Fixed various XR minitest errors/failures.

* Rubocop fix for PR435

* pvlan_mapping fix for n8k (#439)

* partial code commit, no test yet

* partial testing

* range added

*  fix range

* fix default cost

* Added comments

* other method add

* review comments

* partial review comments fixed

* partial review comments fixed

* fix auth and stub

* All review comments fixed

* bug ID added

* nssa translate added

* nssa properties added

* comments added

* route-map default is empty

* skip few tests for n8k due to bugs

* Review comments

* first commit

* test code for vls

* test code for vls

* add more tests

* auth added

* cleartext added

* authentication_key_pw added

* message_digest_key added

* default for key_id

* comments add

* CHANGELOG fixed

* comment added

* review coments

* fix for pvlan_mapping for n8k

* interface_ospf NU fixes (#440)

* Add feature ospf enable

* review comments

* Fix interface_ospf

* test_evpn_vni:route_target_both: I2 vs I3,I4,I4+ (#442)

Badcodefix: #287

* The previous fix should have limited route_target_both testing to just I2 images; instead it did the reverse.

* Tested on n9-i2,n9-i3,n9-i4,n9-i4+

* New default for vxlan_vtep: holddown (#448)

* Tested on n9k-e_dev
  * Minitest passes
  * Beaker passes

* Merge release_1.3.1 --> develop (#454)

* Add 8K to BGP wait_for_process_initialized()

* Add 8K to OSPF wait_for_process_initialized()

* Fix for n8k vrf context

* fix comment

* Remove skip for CSCuz44696

* fix vni for all supported platforms

* Fix minitest for aaa feature

* yaml fix

* Update version.rb

* Utils.normalize_range_array

* The motivation for this change was finding yet another array normalizer in the private vlan code so these changes are initially meant to address fixes there. IMO our range summarize methods were getting a bit long and difficult to maintain; these new methods will hopefully simplify things somewhat.

* The main problem these methods are trying to solve is reconciling manifest inputs with getter results when there are overlapping ranges; e.g.:
  * '2-5, 9, 4-6'     needs to be ['2-6', '9']
  * ['2', '3', '4-6'] needs to be ['2-6']
  * ['2', '3', '4']   needs to be ['2-4']

* It's fairly easy to merge the ranges if they are actual ruby ranges instead of the dash-syntax ranges, so the new methods just convert to ruby ranges, merge, and convert back.

* There's also a method that breaks the ranges down into individual elements so that delta_add_remove can add or remove specific elements on the switch.

* I have a related commit for Puppet on the way.

* Tested on n9k

* Property mapped_vni fix for n5|6k

* private_vlan_association minitest fix

* Updated result values to reflect that API now uses Utils.normalize_range_array, which summarizes the ranges.

* The rest is just cleanup, ie removed the else clause since the if block does a return.

* Tested on n3,n5,n6,n7,n8,n9-I3

* comment updates only

* Refactor yaml to use default_only

* Error condition for l2vpn added

* Minor test code cleanups

* Add basic filter to Interface.filter

* Get rid of interfaces_id method

* shorten test method names in test_interface_private_vlan

* tested on n9

* Simplified yaml entry

* process_initialized is included for n8k

* Fix negotiate auto invalid skips (#404)

* Condense negoitate test code and fix invalid skips

* Remove debug code

* Update aaa_authentication_login_service.rb

* interface: private_vlan refactor

* There were a few errors with the original implementation. As I worked through this I found that it made sense to rewrite many of the methods to use the new range conversion utilities, and with so many functional changes we decided to take the opportunity to shorten the property names. Since the original code was already released with 1.3.0 we decided to just deprecate them.

* Created `DEPRECATED.yaml` and `interface_DEPRECATED.rb` for the original code. The setters will raise a warning if used, which includes the name of the new property to use. I ran the original test_interface_private_vlan tests against the deprecated code and they still pass, but then updated the test file to use the new methods. This means that going forward the deprecated methods will not have any tests run, and any issues found will not be fixed.

* Related puppet fixes are in the works.

* Tested on n3-I4,n5,n6,n7,n8,n9-I2,n9-I3

* switchport_pvlan_mapping_trunk needs to be a multiple

* My first pass at this code missed that this property supported multiple occurrences
  * Added a delta_hash method for trunk
  * Changed `pvlan_range_delta` to a single-caller method for `switchport_pvlan_mapping` since it's no longer shared with the trunk method
  * Fixed the minitest

* Passes on n3-I4,n5,n6,n7,n8,n9-I2,n9-I3

* Move svi pvlan test into test_interface_svi.rb

* Tests pass on all NX platforms

* Move deprecated keys into own hash

* This is just a minor cleanup to make this simpler to remove later on

* Update comments in DEPRECATED.yaml

* change private_vlan to pvlan

* changelog

* fix for context

* Change deprecation warning msg

* Change deprecation warning msg

* pvlan_mapping should always return array

* This property allows input as string or array. The getter was returning default as [] and non-default as String - which forces special handling in puppet's insync? method - so I changed it to always return an array. This way we don't need to override insync? at all.

* Also moved the pvlan_mapping test out of the svi file. While it does only apply to svi interfaces it seems to fit better with the other interface-related private-vlan tests.

* Tested on n5,n7,n9-I3

* Add requires for DEPRECATED providers

* Symptom: Noticed a corner case where changing a deprecated file on the device but not changing the inheriting file (I updated interface_DEPRECATED.rb but not interface.rb) caused the following error:

```
Linux# puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Facter: error while resolving custom fact "cisco_node_utils": uninitialized constant Cisco::NodeUtil
/opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/cisco_node_utils-1.3.1/lib/cisco_node_utils/interface_DEPRECATED.rb:29: warning: already initialized constant Cisco::PVLAN_PROPERTY
/opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/cisco_node_utils-1.3.1/lib/cisco_node_utils/interface_DEPRECATED.rb:29: warning: previous definition of PVLAN_PROPERTY was here
```

* Analysis: Looks like facter caches the provider files. I found that making a whitespace change in interface.rb was enough to trigger the cache clear for that file and it avoided the error. But the real problem is that the deprecated providers do not have a require for 'node_utils', so just needed to add those to avoid this problem.

* Also moved PVLAN_PROPERTY hash within the class to avoid the re-definition warning. This is probably not necessary but it's cleaner.

* Also found that `set_value` didn't get included for `switchport_mode_private_vlan_trunk_promiscuous` when I copied the file contents over to DEPRECATED.yaml, so it's there now.

* Tested on n9k-i3

* Update interface_DEPRECATED.rb

* Update vlan_DEPRECATED.rb

* virtual_service and system_image yaml fix

* Fix yaml validation error

* Addressed PR comments

* Remove hardcoded tacacs server reference

* Interface shutdown property fix

* Update test_interface.rb

* switchport disable is broken

* Broken by #406

* Tested on n9-i3

* test_interface_private_vlan.rb: /private_vlan/pvlan/

* The vlan object still referenced the old names

* Tested on n9-I3

* test_interface* minor cleanups

* method name changes only for the most part

* tested on n3-I4

* yum package manager fixes

* Removed debug

* Remove trailing whitespace

* Do not track tacacs server info

* Add full relative path to tacacs server info

* Test if tacacs server is valid

* Add relative path of yaml file

* Refined the error message for invalid server

* Pim.pims fix for feature disabled

* The global nature of the pim resource means that an object will be created for each vrf regardless of state; however, this meant that objects were getting created even when feature pim was disabled, causing puppet agent/resource to to raise an error whenever the getter was called.

* Tested on n7

* Add N8k references

* Handle no virtual-services installed case

* vxlan and pvlan fix

* Remove delta check for cpu utilization (#421)

* Add 8k support to CHANGELOG

* Switchport trunk allowed vlan now accepts 'vlan add' lines (#423) (#441)

* Fix regexp to only accept vlan ranges

* Trunk allowed vlan now handles 'vlan add' lines

* test_evpn_vni:route_target_both: I2 vs I3,I4,I4+ (#442)

Badcodefix: #287

* The previous fix should have limited route_target_both testing to just I2 images; instead it did the reverse.

* Tested on n9-i2,n9-i3,n9-i4,n9-i4+

* Fix error due to time zone difference (#443)

* Fix suppress-fib-pending lib and test code (#445)

* Remove testing of vrf context and fix default test

* Fix broken yaml

* Merge default test code into main testcase

* Snmp packet_size fixes (#446)

* Snmp packet_size fixes

* Add n8k

* Fix last_reset check for platform (#444)

* Fix cannot disable local issue (#447)

* New default for vxlan_vtep: holddown (#448)

* Tested on n9k-e_dev
  * Minitest passes
  * Beaker passes

* Fix auth method local cleanup (#449)

* Refactor aaa local auth removal (#450)

* Refactor aaa local auth removal

* Remove whitespace

* Remove unneeded test steps (#452)

* New overlay_global behaviors (#451)

* DME changes for l2rib properties resulted in removal of the 'default' keyword from the cli:

    `l2rib dup-host-mac-detection default`

* Prior to this change, 'default' was the only way to reset the host_moves & timeout properties back to default; there was/is no 'no' command, so the only way to reset it now is to re-enter the command with the default values.

* This change necessitates changes to the setter, minitest, and beaker. I also changed the default values to actual integer values instead of empty strings.

* Tested minitest & beaker for: n9-edev,n9-I4,n5,n6. Skips for n3 (normal) and n7 (requires F3 card).

* Prevent removal of method local on unsupported platforms (#453)

* Missed merge conflict

* Add noop test for CI dev use

* Munge 'no event-history events' to size_disable (#456)

Due to recent platform changes, the CLI for `event_history events
size disable` now results in the config `no event-history events`

This change munges the `no event-history events` to `size_disable`
in order to handle behavior changes between different nxos releases.
This code change should be backwards compatible.

* Remove broken xr snmpuser support (#459)

* Remove broken xr snmpuser support

* test_snmpuser: shorten testcase names

* Ospf bfd for interfaces (#457)

* Add feature ospf enable

* review comments

* Fix interface_ospf

* add bfd to router ospf

* add p2p type to int ospf

* ad bfd to interface_ospf

* test file fix

* test file fix

* clean code

* bfd per_link added to int po

* bfd echo added to interface

* bfd echo added to interface

*  fix p2p

* test code enhanced

* changelog

* review comments

* Update CHANGELOG.md

* convert symbol to string

* bfd_echo similar to vtp

* review comment

* review comment

* Scrub XR references from doc. (#458)

* Scrub XR references from doc.

* Scrub XR references from doc.

* Ospf parameters for interfaces (#460)

* Add feature ospf enable

* review comments

* Fix interface_ospf

* added pri, tx delay, shut and mtu to int ospf

* changelog

* test_vpc needs rescue for incompat intf

* test_vpc needs rescue for incompat intf (#461)

* Minitest bug fixes (#462)

* Add feature ospf enable

* review comments

* Fix interface_ospf

* added pri, tx delay, shut and mtu to int ospf

* changelog

* bug fixes

* remove test_last_reset

* Fix remove aaa local on n3k (#464)

*  Minitest: Handle N7k F3-features w/o compat LCs (#463)

* test_vpc needs rescue for incompat intf

* Handle N7k F3-features w/o compat LCs

* The vrf_af route_target tests were failing because feature nv overlay failed - because our n7k does not have an F3 linecard:

```
 1) There are some features that refuse to load unless the VDC is
    limited to F3 only, but they will actually load if the config is
    present, despite the fact that there are no physical F3s.
 2) We have some tests that need these features but don't need interfaces.
```

* Solution: Enable the vdc config for F3 but don't fail if the physical LC is not present
  * Prior to this solution I had created a couple of methods to find an appropriate interface based on the feature-to-LC requirements. This works but is only useful for features that also require an interface (unlike the vrf_af test). Eventually I would like to remove the other one-off methods (e.g. `fabricpath_testenv_setup`, `vxlan_linecard?`, etc) that do similar functions and convert the callers to use this common one instead. Since there are no current callers for it I just commented it out.

* Tested on n7k (no F3 card) and N9K.

* /if-else/case/

* MT: Fix snmpuser teardown loop (#465)

* test_vpc needs rescue for incompat intf

* MT: Fix snmpuser teardown loop

* MT: portchannel: n3k_in_n3k bad pattern

* Fix half/full in test_duplex

* For some 3k, need to munge 'half/full' into csv-style 'half,full' to play nice with interface_capabilities

* Tested on n3048

* Fix half/full in test_duplex (#466)

* For some 3k, need to munge 'half/full' into csv-style 'half,full' to play nice with interface_capabilities

* Tested on n3048

* minitest fixes for vtp and resilient mode (#467)

* Add feature ospf enable

* review comments

* Fix interface_ospf

* bug fix for vtp

* bug fix for resilient mode

* version number fix

* review comment

* fix for symmetry not supported on n3k (#468)

* Add feature ospf enable

* review comments

* Fix interface_ospf

* bug fix for vtp

* bug fix for resilient mode

* version number fix

* review comment

* Fix for symmetry not supported

* review comments

* review comment

* test_interface_sw: check for fex compatibility (#469)

* f3 fix for test_feature

* Refactor yum patch test (#470)

* Refactor yum patch test

* Update failure message

* Update failure message

* Addressed review comment

* Rubocop fixes

* f3 after_tests for test_overlay_global

* Revert "f3 after_tests for test_overlay_global"

This reverts commit 612514e.

Bad codefix

* ciscotest: first_or_last_teardown (#471)

* f3 setup/teardown on N7k's can be very time consuming (60+ seconds) so it's expensive to do this for every testcase

* This hack limits the vdc teardowns to the first and last testcase (f3 setup is ignored if it's already set to f3)
  * We have to check for first because a test may use -n to limit the run to a single test

* Minitest.after_run is not really an option for this: it's designed to run at the end of an entire test suite and actually runs at_exit, at which point we no longer have access to our ciscotest methods.

* better teardown for test_feature

* f3 setup/teardown for test_vxlan_vtep_vni

* f3 setup/teardown test_bridge_domain_vni

* f3 setup/teardown for test_vxlan_vtep (#472)

* Also added a rescue/retry for vdc limit-resource

* setup/teardown cleanups for test_vlan

* narrowed the interfaces method in ciscotest to exclude dot1q sub-ints

* moved the mt-full test from test_vlan_mt_full.rb into vlan.rb and removed entire test file

* Tested on n5, n7, n9

* f3 setup/teardown test_encapsulation

* n7k f3 fix for test_router_bgp/route_distinguisher

* setup/teardown fix test_vlan_private

* test_yum: skip for no pkginfo filename

* assert for test_yang

* noop.rb: change skip to assert

* Rel140/refactor yum (#473)

* Refactor yum to cleanup patches properly

* Enable additional releases

* Add retry loop for Yum.remove

* Modify regexp

* Reduce tries from 50 to 20

* Refactor retry loop

* Unpdate n9k to allow local auth removal

* snmpuser minitest fix (#475)

* Add feature ospf enable

* review comments

* Fix interface_ospf

* bug fix for vtp

* bug fix for resilient mode

* version number fix

* review comment

* Fix for symmetry not supported

* review comments

* review comment

* changelog

* revert Changelog

* fix for snmpuser 8 char limit

* test_fabricpath_global cleanup fixes

* Tested on n5,n7,n9-i2,n9-i5,n3

* test_vxlan* cleanup fixes

* tested on n3,n5,n7,n9-I2,n9-I5

* test_interface_switchport test cleanup

* test_interface_switchport test cleanups

* test_aaa_authentication_login cleanups

* Failing when stale configs present on testbed; this change should remove any leftovers

* Tested on n3-I2,n5,n7,n9-I5

* Add storm_control and dhcp relay props for interface (#474)

* Add feature ospf enable

* review comments

* Fix interface_ospf

* bug fix for vtp

* bug fix for resilient mode

* version number fix

* review comment

* Fix for symmetry not supported

* review comments

* review comment

* storm-control and dhcp relay for intf

* exclude 2 storm control props on n7k due to hw limitation

* comments added

* changelog

* typo correct

* cleanup unsupported tests

* review comments

* remove features added during the minitest

* Add tacacs-server key cleanup

* removing vlan name negative tests and fix dhcp relay munge (#476)

* removing vlan name negative tests

* munging issue fixed

* Add defect/image check to minitest (#477)

* Add defect/image check to minitest

* Bails out of testcase if image matches pattern; no skip, no assert
* Prints 'NOOP' message and any add'l helpful text, e.g.:

```
Node under test:
  - name  - n5k-136
  - type  - N5K-C56128P
  - image - bootflash:///n6000-uk9.7.3.0.N1.1.bin

TestVrf#test_name_zero_length = 4.88 s = .
TestVrf#test_route_distinguisher = 11.79 s = .
TestVrf#test_remote_route_filtering = 2.01 s = .
TestVrf#test_name_too_long = 1.93 s = .
TestVrf#test_vpn_id = 2.07 s = .
TestVrf#test_vni = 2.85 s = S
TestVrf#test_mhost = 1.96 s = .

TestVrf#test_description -> NOOP <- [CSCuy36637: Cannot remove description]
TestVrf#test_description = 2.91 s = .
TestVrf#test_collection_default = 1.01 s = .
TestVrf#test_create_and_destroy = 2.89 s = .
TestVrf#test_name_type_invalid = 1.05 s = .
TestVrf#test_shutdown = 26.73 s = .

Finished in 62.072465s, 0.1933 runs/s, 0.4189 assertions/s.
12 runs, 26 assertions, 0 failures, 0 errors, 1 skips
```

* /puts/Cisco::Logger/

* Remove timestamp noise from logger

* Enable nv_overlay_evpn fix (#478)

* skip_legacy_defect method

* Rework previous `defect?` method to do skip instead of return

* Tested on n3-I2, n5

* skip_legacy_defect for vtp

* Dhcp Relay Global (#481)

* removing vlan name negative tests

* munging issue fixed

* add dhcp relay global props

* added a new prop and cleaned up names of props

* add destroy method

* doc

* review comments

* test code cleanup

* skip_legacy_defect for snmpserver

* Dhcp Relay Global (#482)

* removing vlan name negative tests

* munging issue fixed

* add dhcp relay global props

* added a new prop and cleaned up names of props

* add destroy method

* doc

* review comments

* test code cleanup

* stop enabling dhcp feature

* Refactor test_snmpuser teardown

* portchannel_global n3k minitest fix (#483)

* removing vlan name negative tests

* munging issue fixed

* add dhcp relay global props

* added a new prop and cleaned up names of props

* add destroy method

* doc

* review comments

* test code cleanup

* stop enabling dhcp feature

* Fix minitest error

* Use valid type6 tacacs password

* Add skip_legacy_defect? for aaa, snmp and vlxan

* bgp event_history (#484)

* removing vlan name negative tests

* munging issue fixed

* add dhcp relay global props

* added a new prop and cleaned up names of props

* add destroy method

* doc

* review comments

* test code cleanup

* stop enabling dhcp feature

* Fix minitest error

* bgp event-history fixes

* review comments

* more review comments

* Remove require pry in test_snmpuser.rb

* Separate ace ipv4 and ipv6 ttl tests

* Update sample patch names for I5 images.

* bgp event_history (#486)

* bgp event-history

* fix event-history props

* doc

* Update expected error class in yum test

* bgp send-community fix (#487)

* fix for send_community

* fix bfd echo intermittent failure

* review comments

* review comment

* fail api raises RuntimeError, update test

* Initial upgrade services

* Remove white space

* fix for send-community (#488)

* Fix test_lacp_suspend_individual to address behavior change (#489)

* Fix test_lacp_suspend_individual to address behavior change

* Remove pry debug

* Rel141/lacp suspend (#490)

* Fix test_lacp_suspend_individual to address behavior change

* Remove pry debug

* Refactor lacp_suspend_individual setter

* Addressed PR comments

* Update comment to be more accurate

* Update version from 1.4.0 to 1.4.1

* Fix/command config issue (#491)

* Fix 'no' commands won't apply if defaults don't nvgen

* Add 'nvgen' key to scale test hash

* Add ability to define setup config in test yaml file

* Add setup yaml test key support

* Update all tests to use scalar designation

* Initial refactor N8k --> N9k-F (#493)

* (POC) product_id qualifier for 8k rebrand

* This is just a POC diff for adding add'l checks to determine the product_id. Do not merge this code.

* The requirement here is to create a unique product_id for switches that share the same product_id but have a fundamental difference; e.g.
  * 8k may only be differentiated by the presense of 8k fabric modules
  * n3k-in-n9k-mode will have the same product_id as a "regular" n3k

* N9K-F enablement

* hsrp_global and interface_hsrp providers (#492)

* hsrp global provider

* traling space removed

* interface_hsrp

* fix args issue

* hsrp group partial

* fix auth

* more props for hsrp group

* exclude interface_hsrp_group

* changelog

* review comments

* changelog

* travis fix

* change n8k to n9k-f

* fix for event history on n9k-f (#495)

* Remove unsupported n9k-f feature

* Fix node test for fretta

* Fix test_platform regex

* Fix n9k fretta regexp

* Enable yum patching for fretta_camden

* Enable I6 release patching

* interface hsrp group (#496)

* hsrp global provider

* traling space removed

* interface_hsrp

* fix args issue

* hsrp group partial

* fix auth

* more props for hsrp group

* exclude interface_hsrp_group

* changelog

* review comments

* changelog

* travis fix

* change n8k to n9k-f

* hsrp group ip

* fix hsrp ip

* fix hsrp_groups

* fix name

* fix ipv4_enable

* fix priority

* fix auth

* fix ipv6 autoconfig

* documentation

* fix auth

* fix auth password

* review comments

* fix timers with regex

* Update platform_to_filter api for n9k (#497)

Update to correctly match fretta or non-fretta based n9k platforms but not both.

* Add short tag test api (#499)

* Update CHANGELOG.md

* fretta changes for event history bgp (#498)

* hsrp global provider

* traling space removed

* interface_hsrp

* fix args issue

* hsrp group partial

* fix auth

* more props for hsrp group

* exclude interface_hsrp_group

* changelog

* review comments

* changelog

* travis fix

* change n8k to n9k-f

* hsrp group ip

* fix hsrp ip

* fix hsrp_groups

* fix name

* fix ipv4_enable

* fix priority

* fix auth

* fix ipv6 autoconfig

* documentation

* fix auth

* fix auth password

* review comments

* fix timers with regex

* fix version check for fretta

* Fix fretta for event history using product_id

* Rel150/atherton fretta fixes (#500)

* Fix vrf delete in progress issue for domain_name

* Fix fabricpath loadbalance yaml entries

* Disable switchport on portchannel test for bfd echo

* Add missing n9k fretta exclude

* Raise deterministic error for yum install failures

* Update error class test

* pim bfd (#501)

* pim bfd

* fix pim ssm range tests

* review comment

* Rel150/atherton fretta fixes (#502)

* Fix vrf delete in progress issue for domain_name

* Fix fabricpath loadbalance yaml entries

* Disable switchport on portchannel test for bfd echo

* Add missing n9k fretta exclude

* Raise deterministic error for yum install failures

* Update error class test

* Fixes for atherton nxapi double quote behavior

* Enable bgp af properties for atherton

* atherton event-history skips (#503)

* pim bfd

* fix pim ssm range tests

* review comment

* n7k atherton event-history

* Update CHANGELOG.md

* n7k atherton hsrp (#504)

* pim bfd

* fix pim ssm range tests

* review comment

* n7k atherton event-history

* fix hsrp for n7k atherton

* New nxapi_structured infra features (#505)

* Initial vlan long name POC

* Update find logic

* Add nxapi structured yaml feature support

* Change get_value schema from string to any

* Update inventory.yaml entries to use new nxapi_structured infra

* Update README_YAML.md

Add new nxapi_structured features.

* Simplify inventory.yaml file

* Bug fix

* Fix rubocop failure

* Bug fix in drill_down_structured method

* Update test to check for Cisco::CliError

* Move validate_installed method inside begin_rescue block

* Remove debug code and cache_flush

* Add vrf vni support for fretta

* Flush cache for nxapi_structured get_config calls

* Delete README-pre-1.3.0.md

* route_map (#507)

* pim bfd

* fix pim ssm range tests

* review comment

* n7k atherton event-history

* fix hsrp for n7k atherton

* first commit for route map

* add match ip multicast

* Add match ipv6

* add match metric

* add route_map

* add vlan, length, mac_list

* evpn route type add

* fix platform specific excludes

* fix route-type multiple

* add some set properties

* add set metric

* add some set commands

* set intf, set aspath

* doc

* add set ip prorperties partially

* add set ip prorperties

* set community added

* set extcommunity partial

* set extcommunity cost

* fix some platform diff issues

* fix some platform diff issues

* fix some platform diff issues

* doc and rubocop

* skips for bugs

* changelog

* exclude for ospf_area added

* fix CHANGELOG

* minor error in load-share fixed

* maps nil check

* fix review comments and combine some properties

* match ip addr access fix

* quotes for arrays

* SNMP Community - Symbols Cause Churn (#508)

* Only flush cache for structured table data

* Fix typo

* Escape special characters in key_substitutor method

* Fix debug statementwq

* Revert "Fix debug statementwq"

This reverts commit 16a73a4.

* Revert "Escape special characters in key_substitutor method"

This reverts commit 0fbbe19.

* Refactor snmp community group to use structured output

* Refactor snmp community to use structured output for n3|9k

* Addressed PR comments

* fix itd ingress intf issue (#510)

* Add support for 7_0_3_I5_2 sample patches.

* Rel160/bug fix (#512)

* Fix infra bug

* Infra fix

* route_map test skip for dplus images (#513)

* fix itd ingress intf issue

* skip for 2 tests failing on dplus images

* Allow configuration of local nxapi session cookie (#514)

* Allow explicit nxapi session cookie config

* Refactor cookie code

* Update client.rb

* Update validate_cookie method

* Remove debug statements

* Update README.md

* Update cisco_node_utils.yaml.example

* Remove whitespace

* Replace Utils.add_quotes calls with asser_match

* Remove unused add_quotes method

* Add logic to handle EOFError (#515)

* Catch EOFError and retry

* Drop try count from 5 -> 2

* Fix install fex minitest

* Remove puts statement.

* Allows tokens to be passed to get_command

* Add tests and procs for install all nxos

* Update DOC to highlight that get_command can be tokenized

* Add YAML to specify params for upgrade

* Adding error handling and cleaning up code

* Reworked some TCs + Add new TCs

* Handle case when upgrade is run with booted image

* Add test_upgrade_boot_image

* Add Service to CHANGELOG.md

* Add TODO to upgrade scenario

* Update CHANGELOG.md

* Upgrade services (#516)

* Initial upgrade services

* Remove white space

* Allows tokens to be passed to get_command

* Add tests and procs for install all nxos

* Update DOC to highlight that get_command can be tokenized

* Add YAML to specify params for upgrade

* Adding error handling and cleaning up code

* Reworked some TCs + Add new TCs

* Handle case when upgrade is run with booted image

* Add test_upgrade_boot_image

* Add Service to CHANGELOG.md

* Add TODO to upgrade scenario

* Update CHANGELOG.md

* Add load-interval properties to interface (#517)

* Add load-interval properties to interface

* review comments

* added test cases for loopback and subintf

* remove test for n9k (#518)

* fix for double quotes errors for passwords (#519)

* remove test for n9k

* double quote string cleanup

* review comments

* Add command for upgrade_force

* Update upgrade to handle delete_boot and force upgrade

* Upgrade services (#520)

* Initial upgrade services

* Remove white space

* Allows tokens to be passed to get_command

* Add tests and procs for install all nxos

* Update DOC to highlight that get_command can be tokenized

* Add YAML to specify params for upgrade

* Adding error handling and cleaning up code

* Reworked some TCs + Add new TCs

* Handle case when upgrade is run with booted image

* Add test_upgrade_boot_image

* Add Service to CHANGELOG.md

* Add TODO to upgrade scenario

* Update CHANGELOG.md

* Add command for upgrade_force

* Update upgrade to handle delete_boot and force upgrade

* Add latest Camden and Dplus MR sample patches

* Remove whitespace (#521)

* Fix test_image_version

* Add is_box_online

* Enhancements to service.rb

Function box_online? added.
Modified upgraded? to check for config ready.
Add version check to 'upgrade'.
Handle 500 - Backend processing Error

* Enchancements added to test_service.rb

Added test for box_online?
Modified calls to Service.upgrade to include version
Increases retry to 5 in test_upgrade
Made test_upgrade_boot_image skippable in absence of yaml file

* Renaming files from service to upgrade

* Updating references of service to upgrade

* Renaming Service to Upgrade

* Updating CHANGELOG.md

* fix 1.6.0 issues (#523)

* Incorporated @mikewiebe PR comments.

- updated references of 'media' to 'uri'
- fail upgrade if uri is not bootflash
- replace shell_command with config to handle OAC

* Fix Rubocop error

* Upgrade services (#524)

* Initial upgrade services

* Remove white space

* Allows tokens to be passed to get_command

* Add tests and procs for install all nxos

* Update DOC to highlight that get_command can be tokenized

* Add YAML to specify params for upgrade

* Adding error handling and cleaning up code

* Reworked some TCs + Add new TCs

* Handle case when upgrade is run with booted image

* Add test_upgrade_boot_image

* Add Service to CHANGELOG.md

* Add TODO to upgrade scenario

* Update CHANGELOG.md

* Add command for upgrade_force

* Update upgrade to handle delete_boot and force upgrade

* Fix test_image_version

* Add is_box_online

* Enhancements to service.rb

Function box_online? added.
Modified upgraded? to check for config ready.
Add version check to 'upgrade'.
Handle 500 - Backend processing Error

* Enchancements added to test_service.rb

Added test for box_online?
Modified calls to Service.upgrade to include version
Increases retry to 5 in test_upgrade
Made test_upgrade_boot_image skippable in absence of yaml file

* Renaming files from service to upgrade

* Updating references of service to upgrade

* Renaming Service to Upgrade

* Updating CHANGELOG.md

* Incorporated @mikewiebe PR comments.

- updated references of 'media' to 'uri'
- fail upgrade if uri is not bootflash
- replace shell_command with config to handle OAC

* Fix Rubocop error

* Add debug logging and exclude unsupported platforms

* Remove merge conflicts

* Remove dublin yum package support

* Add missing commit step to yum workflow (#526)

* Increase dns domain create try counter

* Skip test_sys_def_svi_autostate in Atherton

* Remove pointless test test_name_long

* Add back test_name_long but remote error check step

* fix hsrp+bfd and pim_bfd (#527)

* remove all route maps after testing (#528)

* Update CHANGELOG.md

* Update version -> 1.6.0

* Revert recent cisco yum provider changes
mikewiebe pushed a commit that referenced this pull request May 31, 2017
* Update CHANGELOG.md

* version may be absent on 'snmp-server host' (#420)

* Ospf Area (#422)

* partial code commit, no test yet

* partial testing

* range added

*  fix range

* fix default cost

* Added comments

* other method add

* review comments

* partial review comments fixed

* partial review comments fixed

* fix auth and stub

* All review comments fixed

* bug ID added

* Switchport trunk allowed vlan now accepts 'vlan add' lines (#423)

* Fix regexp to only accept vlan ranges

* Trunk allowed vlan now handles 'vlan add' lines

* Condense vlan configuration and fix teardown error (#426)

* test_aaa*: shorten class & testcase names

* test_interface*: short class & testcase names

* modify/delete some repetitive tests

* tested on n9-i4

* Add feature ospf enable (#428)

* test_pim_group_list: class/testcase renaming

* Tested on n9-i4

* test_snmpcommunity: short class/testcase names

* snmpuser: dummy_user var does not exist

* YANG JSON support for gRPC client (#425)

* Added support for setting/getting YANG config

* revert

* skip all tests on nexus

* cleanup

* method name change

* fixed rubocop errors

* Changes based on feedback

* removed blank line

* test_snmpuser: shorten testcase names

* test_tacacs_server_host: class/testcase name changes

* minitest: shorten class / testcase names

* Added IOS XR support for snmp_user

* Refactored snmp_user

* Updated test_snmpuser.rb

* Fixed NXOS issue with snmp_user

* Updated test_snmpuser.rb for NXOS

* Update docs for XR + small fix (#431)

* Resurrected XR doc. Fixed constant reference.

* split line that was too long

* removed whitespace

* Fixed 6.0.0 version number.

* changes based on review

* Refactor test_snmpserver (#430)

* Refactor test_snmpcommunity

* Shortened class/testcase names
* Removed redundancy by combining several test sections into a single test
* Added validate_property checks

* Tested on n9-i4

* remove comment line

* implement tacacs_global to match radius_global (#429)

* Add nssa support to ospf_area (#432)

This PR is for router_ospf_area provider which includes nssa properties.
All tests pass on on platforms except on n8k.
On n8k, commands like "area nssa default-information-originate" and "area nssa default-information-originate route-map " are not getting configured properly after we reset nssa and due to this the relevant tests failed. Bug is filed on nxos platform and skipping these tests only on n8k.

* partial code commit, no test yet

* partial testing

* range added

*  fix range

* fix default cost

* Added comments

* other method add

* review comments

* partial review comments fixed

* partial review comments fixed

* fix auth and stub

* All review comments fixed

* bug ID added

* nssa translate added

* nssa properties added

* comments added

* route-map default is empty

* skip few tests for n8k due to bugs

* Review comments

* Added support for retrieving operational data via gRPC/YANG (#433)

* Added show_running_yang utility.  Allow retrieval of operational yang data.

* Added show_running_yang utility.  Allow retrieval of operational yang data.

* Updated changelog.  Fixed comment.

* Fixed rubocop error

* Removed extra space.

* ospf_area: Fix hash in nssa_set (#434)

This PR is for changing the nssa_set method in the ospf_area NU due to the review comments on the puppet side. This simplifies the previous version.

Also changed authentication 'clear_text' to 'cleartext' to keep consistency among all the other providers.
Chris has the context about this PR and so it is better if he reviews this.

* Add feature ospf enable

* review comments

* Add ospf_area_vlink (#436)

* partial code commit, no test yet

* partial testing

* range added

*  fix range

* fix default cost

* Added comments

* other method add

* review comments

* partial review comments fixed

* partial review comments fixed

* fix auth and stub

* All review comments fixed

* bug ID added

* nssa translate added

* nssa properties added

* comments added

* route-map default is empty

* skip few tests for n8k due to bugs

* Review comments

* first commit

* test code for vls

* test code for vls

* add more tests

* auth added

* cleartext added

* authentication_key_pw added

* message_digest_key added

* default for key_id

* comments add

* CHANGELOG fixed

* comment added

* review coments

* fixes to tacacs_global (#437)

* Rubocop fixes for PR 435 (#438)

* Fixed various XR minitest errors/failures.

* Rubocop fix for PR435

* pvlan_mapping fix for n8k (#439)

* partial code commit, no test yet

* partial testing

* range added

*  fix range

* fix default cost

* Added comments

* other method add

* review comments

* partial review comments fixed

* partial review comments fixed

* fix auth and stub

* All review comments fixed

* bug ID added

* nssa translate added

* nssa properties added

* comments added

* route-map default is empty

* skip few tests for n8k due to bugs

* Review comments

* first commit

* test code for vls

* test code for vls

* add more tests

* auth added

* cleartext added

* authentication_key_pw added

* message_digest_key added

* default for key_id

* comments add

* CHANGELOG fixed

* comment added

* review coments

* fix for pvlan_mapping for n8k

* interface_ospf NU fixes (#440)

* Add feature ospf enable

* review comments

* Fix interface_ospf

* test_evpn_vni:route_target_both: I2 vs I3,I4,I4+ (#442)

Badcodefix: #287

* The previous fix should have limited route_target_both testing to just I2 images; instead it did the reverse.

* Tested on n9-i2,n9-i3,n9-i4,n9-i4+

* New default for vxlan_vtep: holddown (#448)

* Tested on n9k-e_dev
  * Minitest passes
  * Beaker passes

* Merge release_1.3.1 --> develop (#454)

* Add 8K to BGP wait_for_process_initialized()

* Add 8K to OSPF wait_for_process_initialized()

* Fix for n8k vrf context

* fix comment

* Remove skip for CSCuz44696

* fix vni for all supported platforms

* Fix minitest for aaa feature

* yaml fix

* Update version.rb

* Utils.normalize_range_array

* The motivation for this change was finding yet another array normalizer in the private vlan code so these changes are initially meant to address fixes there. IMO our range summarize methods were getting a bit long and difficult to maintain; these new methods will hopefully simplify things somewhat.

* The main problem these methods are trying to solve is reconciling manifest inputs with getter results when there are overlapping ranges; e.g.:
  * '2-5, 9, 4-6'     needs to be ['2-6', '9']
  * ['2', '3', '4-6'] needs to be ['2-6']
  * ['2', '3', '4']   needs to be ['2-4']

* It's fairly easy to merge the ranges if they are actual ruby ranges instead of the dash-syntax ranges, so the new methods just convert to ruby ranges, merge, and convert back.

* There's also a method that breaks the ranges down into individual elements so that delta_add_remove can add or remove specific elements on the switch.

* I have a related commit for Puppet on the way.

* Tested on n9k

* Property mapped_vni fix for n5|6k

* private_vlan_association minitest fix

* Updated result values to reflect that API now uses Utils.normalize_range_array, which summarizes the ranges.

* The rest is just cleanup, ie removed the else clause since the if block does a return.

* Tested on n3,n5,n6,n7,n8,n9-I3

* comment updates only

* Refactor yaml to use default_only

* Error condition for l2vpn added

* Minor test code cleanups

* Add basic filter to Interface.filter

* Get rid of interfaces_id method

* shorten test method names in test_interface_private_vlan

* tested on n9

* Simplified yaml entry

* process_initialized is included for n8k

* Fix negotiate auto invalid skips (#404)

* Condense negoitate test code and fix invalid skips

* Remove debug code

* Update aaa_authentication_login_service.rb

* interface: private_vlan refactor

* There were a few errors with the original implementation. As I worked through this I found that it made sense to rewrite many of the methods to use the new range conversion utilities, and with so many functional changes we decided to take the opportunity to shorten the property names. Since the original code was already released with 1.3.0 we decided to just deprecate them.

* Created `DEPRECATED.yaml` and `interface_DEPRECATED.rb` for the original code. The setters will raise a warning if used, which includes the name of the new property to use. I ran the original test_interface_private_vlan tests against the deprecated code and they still pass, but then updated the test file to use the new methods. This means that going forward the deprecated methods will not have any tests run, and any issues found will not be fixed.

* Related puppet fixes are in the works.

* Tested on n3-I4,n5,n6,n7,n8,n9-I2,n9-I3

* switchport_pvlan_mapping_trunk needs to be a multiple

* My first pass at this code missed that this property supported multiple occurrences
  * Added a delta_hash method for trunk
  * Changed `pvlan_range_delta` to a single-caller method for `switchport_pvlan_mapping` since it's no longer shared with the trunk method
  * Fixed the minitest

* Passes on n3-I4,n5,n6,n7,n8,n9-I2,n9-I3

* Move svi pvlan test into test_interface_svi.rb

* Tests pass on all NX platforms

* Move deprecated keys into own hash

* This is just a minor cleanup to make this simpler to remove later on

* Update comments in DEPRECATED.yaml

* change private_vlan to pvlan

* changelog

* fix for context

* Change deprecation warning msg

* Change deprecation warning msg

* pvlan_mapping should always return array

* This property allows input as string or array. The getter was returning default as [] and non-default as String - which forces special handling in puppet's insync? method - so I changed it to always return an array. This way we don't need to override insync? at all.

* Also moved the pvlan_mapping test out of the svi file. While it does only apply to svi interfaces it seems to fit better with the other interface-related private-vlan tests.

* Tested on n5,n7,n9-I3

* Add requires for DEPRECATED providers

* Symptom: Noticed a corner case where changing a deprecated file on the device but not changing the inheriting file (I updated interface_DEPRECATED.rb but not interface.rb) caused the following error:

```
Linux# puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Facter: error while resolving custom fact "cisco_node_utils": uninitialized constant Cisco::NodeUtil
/opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/cisco_node_utils-1.3.1/lib/cisco_node_utils/interface_DEPRECATED.rb:29: warning: already initialized constant Cisco::PVLAN_PROPERTY
/opt/puppetlabs/puppet/lib/ruby/gems/2.1.0/gems/cisco_node_utils-1.3.1/lib/cisco_node_utils/interface_DEPRECATED.rb:29: warning: previous definition of PVLAN_PROPERTY was here
```

* Analysis: Looks like facter caches the provider files. I found that making a whitespace change in interface.rb was enough to trigger the cache clear for that file and it avoided the error. But the real problem is that the deprecated providers do not have a require for 'node_utils', so just needed to add those to avoid this problem.

* Also moved PVLAN_PROPERTY hash within the class to avoid the re-definition warning. This is probably not necessary but it's cleaner.

* Also found that `set_value` didn't get included for `switchport_mode_private_vlan_trunk_promiscuous` when I copied the file contents over to DEPRECATED.yaml, so it's there now.

* Tested on n9k-i3

* Update interface_DEPRECATED.rb

* Update vlan_DEPRECATED.rb

* virtual_service and system_image yaml fix

* Fix yaml validation error

* Addressed PR comments

* Remove hardcoded tacacs server reference

* Interface shutdown property fix

* Update test_interface.rb

* switchport disable is broken

* Broken by #406

* Tested on n9-i3

* test_interface_private_vlan.rb: /private_vlan/pvlan/

* The vlan object still referenced the old names

* Tested on n9-I3

* test_interface* minor cleanups

* method name changes only for the most part

* tested on n3-I4

* yum package manager fixes

* Removed debug

* Remove trailing whitespace

* Do not track tacacs server info

* Add full relative path to tacacs server info

* Test if tacacs server is valid

* Add relative path of yaml file

* Refined the error message for invalid server

* Pim.pims fix for feature disabled

* The global nature of the pim resource means that an object will be created for each vrf regardless of state; however, this meant that objects were getting created even when feature pim was disabled, causing puppet agent/resource to to raise an error whenever the getter was called.

* Tested on n7

* Add N8k references

* Handle no virtual-services installed case

* vxlan and pvlan fix

* Remove delta check for cpu utilization (#421)

* Add 8k support to CHANGELOG

* Switchport trunk allowed vlan now accepts 'vlan add' lines (#423) (#441)

* Fix regexp to only accept vlan ranges

* Trunk allowed vlan now handles 'vlan add' lines

* test_evpn_vni:route_target_both: I2 vs I3,I4,I4+ (#442)

Badcodefix: #287

* The previous fix should have limited route_target_both testing to just I2 images; instead it did the reverse.

* Tested on n9-i2,n9-i3,n9-i4,n9-i4+

* Fix error due to time zone difference (#443)

* Fix suppress-fib-pending lib and test code (#445)

* Remove testing of vrf context and fix default test

* Fix broken yaml

* Merge default test code into main testcase

* Snmp packet_size fixes (#446)

* Snmp packet_size fixes

* Add n8k

* Fix last_reset check for platform (#444)

* Fix cannot disable local issue (#447)

* New default for vxlan_vtep: holddown (#448)

* Tested on n9k-e_dev
  * Minitest passes
  * Beaker passes

* Fix auth method local cleanup (#449)

* Refactor aaa local auth removal (#450)

* Refactor aaa local auth removal

* Remove whitespace

* Remove unneeded test steps (#452)

* New overlay_global behaviors (#451)

* DME changes for l2rib properties resulted in removal of the 'default' keyword from the cli:

    `l2rib dup-host-mac-detection default`

* Prior to this change, 'default' was the only way to reset the host_moves & timeout properties back to default; there was/is no 'no' command, so the only way to reset it now is to re-enter the command with the default values.

* This change necessitates changes to the setter, minitest, and beaker. I also changed the default values to actual integer values instead of empty strings.

* Tested minitest & beaker for: n9-edev,n9-I4,n5,n6. Skips for n3 (normal) and n7 (requires F3 card).

* Prevent removal of method local on unsupported platforms (#453)

* Missed merge conflict

* Add noop test for CI dev use

* Munge 'no event-history events' to size_disable (#456)

Due to recent platform changes, the CLI for `event_history events
size disable` now results in the config `no event-history events`

This change munges the `no event-history events` to `size_disable`
in order to handle behavior changes between different nxos releases.
This code change should be backwards compatible.

* Remove broken xr snmpuser support (#459)

* Remove broken xr snmpuser support

* test_snmpuser: shorten testcase names

* Ospf bfd for interfaces (#457)

* Add feature ospf enable

* review comments

* Fix interface_ospf

* add bfd to router ospf

* add p2p type to int ospf

* ad bfd to interface_ospf

* test file fix

* test file fix

* clean code

* bfd per_link added to int po

* bfd echo added to interface

* bfd echo added to interface

*  fix p2p

* test code enhanced

* changelog

* review comments

* Update CHANGELOG.md

* convert symbol to string

* bfd_echo similar to vtp

* review comment

* review comment

* Scrub XR references from doc. (#458)

* Scrub XR references from doc.

* Scrub XR references from doc.

* Ospf parameters for interfaces (#460)

* Add feature ospf enable

* review comments

* Fix interface_ospf

* added pri, tx delay, shut and mtu to int ospf

* changelog

* test_vpc needs rescue for incompat intf

* test_vpc needs rescue for incompat intf (#461)

* Minitest bug fixes (#462)

* Add feature ospf enable

* review comments

* Fix interface_ospf

* added pri, tx delay, shut and mtu to int ospf

* changelog

* bug fixes

* remove test_last_reset

* Fix remove aaa local on n3k (#464)

*  Minitest: Handle N7k F3-features w/o compat LCs (#463)

* test_vpc needs rescue for incompat intf

* Handle N7k F3-features w/o compat LCs

* The vrf_af route_target tests were failing because feature nv overlay failed - because our n7k does not have an F3 linecard:

```
 1) There are some features that refuse to load unless the VDC is
    limited to F3 only, but they will actually load if the config is
    present, despite the fact that there are no physical F3s.
 2) We have some tests that need these features but don't need interfaces.
```

* Solution: Enable the vdc config for F3 but don't fail if the physical LC is not present
  * Prior to this solution I had created a couple of methods to find an appropriate interface based on the feature-to-LC requirements. This works but is only useful for features that also require an interface (unlike the vrf_af test). Eventually I would like to remove the other one-off methods (e.g. `fabricpath_testenv_setup`, `vxlan_linecard?`, etc) that do similar functions and convert the callers to use this common one instead. Since there are no current callers for it I just commented it out.

* Tested on n7k (no F3 card) and N9K.

* /if-else/case/

* MT: Fix snmpuser teardown loop (#465)

* test_vpc needs rescue for incompat intf

* MT: Fix snmpuser teardown loop

* MT: portchannel: n3k_in_n3k bad pattern

* Fix half/full in test_duplex

* For some 3k, need to munge 'half/full' into csv-style 'half,full' to play nice with interface_capabilities

* Tested on n3048

* Fix half/full in test_duplex (#466)

* For some 3k, need to munge 'half/full' into csv-style 'half,full' to play nice with interface_capabilities

* Tested on n3048

* minitest fixes for vtp and resilient mode (#467)

* Add feature ospf enable

* review comments

* Fix interface_ospf

* bug fix for vtp

* bug fix for resilient mode

* version number fix

* review comment

* fix for symmetry not supported on n3k (#468)

* Add feature ospf enable

* review comments

* Fix interface_ospf

* bug fix for vtp

* bug fix for resilient mode

* version number fix

* review comment

* Fix for symmetry not supported

* review comments

* review comment

* test_interface_sw: check for fex compatibility (#469)

* f3 fix for test_feature

* Refactor yum patch test (#470)

* Refactor yum patch test

* Update failure message

* Update failure message

* Addressed review comment

* Rubocop fixes

* f3 after_tests for test_overlay_global

* Revert "f3 after_tests for test_overlay_global"

This reverts commit 612514e.

Bad codefix

* ciscotest: first_or_last_teardown (#471)

* f3 setup/teardown on N7k's can be very time consuming (60+ seconds) so it's expensive to do this for every testcase

* This hack limits the vdc teardowns to the first and last testcase (f3 setup is ignored if it's already set to f3)
  * We have to check for first because a test may use -n to limit the run to a single test

* Minitest.after_run is not really an option for this: it's designed to run at the end of an entire test suite and actually runs at_exit, at which point we no longer have access to our ciscotest methods.

* better teardown for test_feature

* f3 setup/teardown for test_vxlan_vtep_vni

* f3 setup/teardown test_bridge_domain_vni

* f3 setup/teardown for test_vxlan_vtep (#472)

* Also added a rescue/retry for vdc limit-resource

* setup/teardown cleanups for test_vlan

* narrowed the interfaces method in ciscotest to exclude dot1q sub-ints

* moved the mt-full test from test_vlan_mt_full.rb into vlan.rb and removed entire test file

* Tested on n5, n7, n9

* f3 setup/teardown test_encapsulation

* n7k f3 fix for test_router_bgp/route_distinguisher

* setup/teardown fix test_vlan_private

* test_yum: skip for no pkginfo filename

* assert for test_yang

* noop.rb: change skip to assert

* Rel140/refactor yum (#473)

* Refactor yum to cleanup patches properly

* Enable additional releases

* Add retry loop for Yum.remove

* Modify regexp

* Reduce tries from 50 to 20

* Refactor retry loop

* Unpdate n9k to allow local auth removal

* snmpuser minitest fix (#475)

* Add feature ospf enable

* review comments

* Fix interface_ospf

* bug fix for vtp

* bug fix for resilient mode

* version number fix

* review comment

* Fix for symmetry not supported

* review comments

* review comment

* changelog

* revert Changelog

* fix for snmpuser 8 char limit

* test_fabricpath_global cleanup fixes

* Tested on n5,n7,n9-i2,n9-i5,n3

* test_vxlan* cleanup fixes

* tested on n3,n5,n7,n9-I2,n9-I5

* test_interface_switchport test cleanup

* test_interface_switchport test cleanups

* test_aaa_authentication_login cleanups

* Failing when stale configs present on testbed; this change should remove any leftovers

* Tested on n3-I2,n5,n7,n9-I5

* Add storm_control and dhcp relay props for interface (#474)

* Add feature ospf enable

* review comments

* Fix interface_ospf

* bug fix for vtp

* bug fix for resilient mode

* version number fix

* review comment

* Fix for symmetry not supported

* review comments

* review comment

* storm-control and dhcp relay for intf

* exclude 2 storm control props on n7k due to hw limitation

* comments added

* changelog

* typo correct

* cleanup unsupported tests

* review comments

* remove features added during the minitest

* Add tacacs-server key cleanup

* removing vlan name negative tests and fix dhcp relay munge (#476)

* removing vlan name negative tests

* munging issue fixed

* Add defect/image check to minitest (#477)

* Add defect/image check to minitest

* Bails out of testcase if image matches pattern; no skip, no assert
* Prints 'NOOP' message and any add'l helpful text, e.g.:

```
Node under test:
  - name  - n5k-136
  - type  - N5K-C56128P
  - image - bootflash:///n6000-uk9.7.3.0.N1.1.bin

TestVrf#test_name_zero_length = 4.88 s = .
TestVrf#test_route_distinguisher = 11.79 s = .
TestVrf#test_remote_route_filtering = 2.01 s = .
TestVrf#test_name_too_long = 1.93 s = .
TestVrf#test_vpn_id = 2.07 s = .
TestVrf#test_vni = 2.85 s = S
TestVrf#test_mhost = 1.96 s = .

TestVrf#test_description -> NOOP <- [CSCuy36637: Cannot remove description]
TestVrf#test_description = 2.91 s = .
TestVrf#test_collection_default = 1.01 s = .
TestVrf#test_create_and_destroy = 2.89 s = .
TestVrf#test_name_type_invalid = 1.05 s = .
TestVrf#test_shutdown = 26.73 s = .

Finished in 62.072465s, 0.1933 runs/s, 0.4189 assertions/s.
12 runs, 26 assertions, 0 failures, 0 errors, 1 skips
```

* /puts/Cisco::Logger/

* Remove timestamp noise from logger

* Enable nv_overlay_evpn fix (#478)

* skip_legacy_defect method

* Rework previous `defect?` method to do skip instead of return

* Tested on n3-I2, n5

* skip_legacy_defect for vtp

* Dhcp Relay Global (#481)

* removing vlan name negative tests

* munging issue fixed

* add dhcp relay global props

* added a new prop and cleaned up names of props

* add destroy method

* doc

* review comments

* test code cleanup

* skip_legacy_defect for snmpserver

* Dhcp Relay Global (#482)

* removing vlan name negative tests

* munging issue fixed

* add dhcp relay global props

* added a new prop and cleaned up names of props

* add destroy method

* doc

* review comments

* test code cleanup

* stop enabling dhcp feature

* Refactor test_snmpuser teardown

* portchannel_global n3k minitest fix (#483)

* removing vlan name negative tests

* munging issue fixed

* add dhcp relay global props

* added a new prop and cleaned up names of props

* add destroy method

* doc

* review comments

* test code cleanup

* stop enabling dhcp feature

* Fix minitest error

* Use valid type6 tacacs password

* Add skip_legacy_defect? for aaa, snmp and vlxan

* bgp event_history (#484)

* removing vlan name negative tests

* munging issue fixed

* add dhcp relay global props

* added a new prop and cleaned up names of props

* add destroy method

* doc

* review comments

* test code cleanup

* stop enabling dhcp feature

* Fix minitest error

* bgp event-history fixes

* review comments

* more review comments

* Remove require pry in test_snmpuser.rb

* Separate ace ipv4 and ipv6 ttl tests

* Update sample patch names for I5 images.

* bgp event_history (#486)

* bgp event-history

* fix event-history props

* doc

* Update expected error class in yum test

* bgp send-community fix (#487)

* fix for send_community

* fix bfd echo intermittent failure

* review comments

* review comment

* fail api raises RuntimeError, update test

* Initial upgrade services

* Remove white space

* fix for send-community (#488)

* Fix test_lacp_suspend_individual to address behavior change (#489)

* Fix test_lacp_suspend_individual to address behavior change

* Remove pry debug

* Rel141/lacp suspend (#490)

* Fix test_lacp_suspend_individual to address behavior change

* Remove pry debug

* Refactor lacp_suspend_individual setter

* Addressed PR comments

* Update comment to be more accurate

* Update version from 1.4.0 to 1.4.1

* Fix/command config issue (#491)

* Fix 'no' commands won't apply if defaults don't nvgen

* Add 'nvgen' key to scale test hash

* Add ability to define setup config in test yaml file

* Add setup yaml test key support

* Update all tests to use scalar designation

* Initial refactor N8k --> N9k-F (#493)

* (POC) product_id qualifier for 8k rebrand

* This is just a POC diff for adding add'l checks to determine the product_id. Do not merge this code.

* The requirement here is to create a unique product_id for switches that share the same product_id but have a fundamental difference; e.g.
  * 8k may only be differentiated by the presense of 8k fabric modules
  * n3k-in-n9k-mode will have the same product_id as a "regular" n3k

* N9K-F enablement

* hsrp_global and interface_hsrp providers (#492)

* hsrp global provider

* traling space removed

* interface_hsrp

* fix args issue

* hsrp group partial

* fix auth

* more props for hsrp group

* exclude interface_hsrp_group

* changelog

* review comments

* changelog

* travis fix

* change n8k to n9k-f

* fix for event history on n9k-f (#495)

* Remove unsupported n9k-f feature

* Fix node test for fretta

* Fix test_platform regex

* Fix n9k fretta regexp

* Enable yum patching for fretta_camden

* Enable I6 release patching

* interface hsrp group (#496)

* hsrp global provider

* traling space removed

* interface_hsrp

* fix args issue

* hsrp group partial

* fix auth

* more props for hsrp group

* exclude interface_hsrp_group

* changelog

* review comments

* changelog

* travis fix

* change n8k to n9k-f

* hsrp group ip

* fix hsrp ip

* fix hsrp_groups

* fix name

* fix ipv4_enable

* fix priority

* fix auth

* fix ipv6 autoconfig

* documentation

* fix auth

* fix auth password

* review comments

* fix timers with regex

* Update platform_to_filter api for n9k (#497)

Update to correctly match fretta or non-fretta based n9k platforms but not both.

* Add short tag test api (#499)

* Update CHANGELOG.md

* fretta changes for event history bgp (#498)

* hsrp global provider

* traling space removed

* interface_hsrp

* fix args issue

* hsrp group partial

* fix auth

* more props for hsrp group

* exclude interface_hsrp_group

* changelog

* review comments

* changelog

* travis fix

* change n8k to n9k-f

* hsrp group ip

* fix hsrp ip

* fix hsrp_groups

* fix name

* fix ipv4_enable

* fix priority

* fix auth

* fix ipv6 autoconfig

* documentation

* fix auth

* fix auth password

* review comments

* fix timers with regex

* fix version check for fretta

* Fix fretta for event history using product_id

* Rel150/atherton fretta fixes (#500)

* Fix vrf delete in progress issue for domain_name

* Fix fabricpath loadbalance yaml entries

* Disable switchport on portchannel test for bfd echo

* Add missing n9k fretta exclude

* Raise deterministic error for yum install failures

* Update error class test

* pim bfd (#501)

* pim bfd

* fix pim ssm range tests

* review comment

* Rel150/atherton fretta fixes (#502)

* Fix vrf delete in progress issue for domain_name

* Fix fabricpath loadbalance yaml entries

* Disable switchport on portchannel test for bfd echo

* Add missing n9k fretta exclude

* Raise deterministic error for yum install failures

* Update error class test

* Fixes for atherton nxapi double quote behavior

* Enable bgp af properties for atherton

* atherton event-history skips (#503)

* pim bfd

* fix pim ssm range tests

* review comment

* n7k atherton event-history

* Update CHANGELOG.md

* n7k atherton hsrp (#504)

* pim bfd

* fix pim ssm range tests

* review comment

* n7k atherton event-history

* fix hsrp for n7k atherton

* New nxapi_structured infra features (#505)

* Initial vlan long name POC

* Update find logic

* Add nxapi structured yaml feature support

* Change get_value schema from string to any

* Update inventory.yaml entries to use new nxapi_structured infra

* Update README_YAML.md

Add new nxapi_structured features.

* Simplify inventory.yaml file

* Bug fix

* Fix rubocop failure

* Bug fix in drill_down_structured method

* Update test to check for Cisco::CliError

* Move validate_installed method inside begin_rescue block

* Remove debug code and cache_flush

* Add vrf vni support for fretta

* Flush cache for nxapi_structured get_config calls

* Delete README-pre-1.3.0.md

* route_map (#507)

* pim bfd

* fix pim ssm range tests

* review comment

* n7k atherton event-history

* fix hsrp for n7k atherton

* first commit for route map

* add match ip multicast

* Add match ipv6

* add match metric

* add route_map

* add vlan, length, mac_list

* evpn route type add

* fix platform specific excludes

* fix route-type multiple

* add some set properties

* add set metric

* add some set commands

* set intf, set aspath

* doc

* add set ip prorperties partially

* add set ip prorperties

* set community added

* set extcommunity partial

* set extcommunity cost

* fix some platform diff issues

* fix some platform diff issues

* fix some platform diff issues

* doc and rubocop

* skips for bugs

* changelog

* exclude for ospf_area added

* fix CHANGELOG

* minor error in load-share fixed

* maps nil check

* fix review comments and combine some properties

* match ip addr access fix

* quotes for arrays

* SNMP Community - Symbols Cause Churn (#508)

* Only flush cache for structured table data

* Fix typo

* Escape special characters in key_substitutor method

* Fix debug statementwq

* Revert "Fix debug statementwq"

This reverts commit 16a73a4.

* Revert "Escape special characters in key_substitutor method"

This reverts commit 0fbbe19.

* Refactor snmp community group to use structured output

* Refactor snmp community to use structured output for n3|9k

* Addressed PR comments

* fix itd ingress intf issue (#510)

* Add support for 7_0_3_I5_2 sample patches.

* Rel160/bug fix (#512)

* Fix infra bug

* Infra fix

* route_map test skip for dplus images (#513)

* fix itd ingress intf issue

* skip for 2 tests failing on dplus images

* Allow configuration of local nxapi session cookie (#514)

* Allow explicit nxapi session cookie config

* Refactor cookie code

* Update client.rb

* Update validate_cookie method

* Remove debug statements

* Update README.md

* Update cisco_node_utils.yaml.example

* Remove whitespace

* Replace Utils.add_quotes calls with asser_match

* Remove unused add_quotes method

* Add logic to handle EOFError (#515)

* Catch EOFError and retry

* Drop try count from 5 -> 2

* Fix install fex minitest

* Remove puts statement.

* Allows tokens to be passed to get_command

* Add tests and procs for install all nxos

* Update DOC to highlight that get_command can be tokenized

* Add YAML to specify params for upgrade

* Adding error handling and cleaning up code

* Reworked some TCs + Add new TCs

* Handle case when upgrade is run with booted image

* Add test_upgrade_boot_image

* Add Service to CHANGELOG.md

* Add TODO to upgrade scenario

* Update CHANGELOG.md

* Upgrade services (#516)

* Initial upgrade services

* Remove white space

* Allows tokens to be passed to get_command

* Add tests and procs for install all nxos

* Update DOC to highlight that get_command can be tokenized

* Add YAML to specify params for upgrade

* Adding error handling and cleaning up code

* Reworked some TCs + Add new TCs

* Handle case when upgrade is run with booted image

* Add test_upgrade_boot_image

* Add Service to CHANGELOG.md

* Add TODO to upgrade scenario

* Update CHANGELOG.md

* Add load-interval properties to interface (#517)

* Add load-interval properties to interface

* review comments

* added test cases for loopback and subintf

* remove test for n9k (#518)

* fix for double quotes errors for passwords (#519)

* remove test for n9k

* double quote string cleanup

* review comments

* Add command for upgrade_force

* Update upgrade to handle delete_boot and force upgrade

* Upgrade services (#520)

* Initial upgrade services

* Remove white space

* Allows tokens to be passed to get_command

* Add tests and procs for install all nxos

* Update DOC to highlight that get_command can be tokenized

* Add YAML to specify params for upgrade

* Adding error handling and cleaning up code

* Reworked some TCs + Add new TCs

* Handle case when upgrade is run with booted image

* Add test_upgrade_boot_image

* Add Service to CHANGELOG.md

* Add TODO to upgrade scenario

* Update CHANGELOG.md

* Add command for upgrade_force

* Update upgrade to handle delete_boot and force upgrade

* Add latest Camden and Dplus MR sample patches

* Remove whitespace (#521)

* Fix test_image_version

* Add is_box_online

* Enhancements to service.rb

Function box_online? added.
Modified upgraded? to check for config ready.
Add version check to 'upgrade'.
Handle 500 - Backend processing Error

* Enchancements added to test_service.rb

Added test for box_online?
Modified calls to Service.upgrade to include version
Increases retry to 5 in test_upgrade
Made test_upgrade_boot_image skippable in absence of yaml file

* Renaming files from service to upgrade

* Updating references of service to upgrade

* Renaming Service to Upgrade

* Updating CHANGELOG.md

* fix 1.6.0 issues (#523)

* Incorporated @mikewiebe PR comments.

- updated references of 'media' to 'uri'
- fail upgrade if uri is not bootflash
- replace shell_command with config to handle OAC

* Fix Rubocop error

* Upgrade services (#524)

* Initial upgrade services

* Remove white space

* Allows tokens to be passed to get_command

* Add tests and procs for install all nxos

* Update DOC to highlight that get_command can be tokenized

* Add YAML to specify params for upgrade

* Adding error handling and cleaning up code

* Reworked some TCs + Add new TCs

* Handle case when upgrade is run with booted image

* Add test_upgrade_boot_image

* Add Service to CHANGELOG.md

* Add TODO to upgrade scenario

* Update CHANGELOG.md

* Add command for upgrade_force

* Update upgrade to handle delete_boot and force upgrade

* Fix test_image_version

* Add is_box_online

* Enhancements to service.rb

Function box_online? added.
Modified upgraded? to check for config ready.
Add version check to 'upgrade'.
Handle 500 - Backend processing Error

* Enchancements added to test_service.rb

Added test for box_online?
Modified calls to Service.upgrade to include version
Increases retry to 5 in test_upgrade
Made test_upgrade_boot_image skippable in absence of yaml file

* Renaming files from service to upgrade

* Updating references of service to upgrade

* Renaming Service to Upgrade

* Updating CHANGELOG.md

* Incorporated @mikewiebe PR comments.

- updated references of 'media' to 'uri'
- fail upgrade if uri is not bootflash
- replace shell_command with config to handle OAC

* Fix Rubocop error

* Add debug logging and exclude unsupported platforms

* Remove merge conflicts

* Remove dublin yum package support

* Add missing commit step to yum workflow (#526)

* Increase dns domain create try counter

* Skip test_sys_def_svi_autostate in Atherton

* Remove pointless test test_name_long

* Add back test_name_long but remote error check step

* fix hsrp+bfd and pim_bfd (#527)

* remove all route maps after testing (#528)

* Update CHANGELOG.md

* Update CHANGELOG.md

* fix bgp neighbor & af issue with remote_as (#522)

* Fix similar vlan id issue (#530)

* Inital commit

* Update vlan.yaml

* Add similar id test and escape special characters

* Update copyright date

* Add LACP mode to interface_channel_group (#529)

* Add LACP support to interface_channel_group

* add new "mode" property
* add lacp feature enablement, copied from Cisco::Interface

* resolve rubocop offenses

* rubocop complaining about alignment for rescue block

* redundant begin

* rubocop not liking the rescue placement

* last fix for the rescue

* rubocop warnings preventing push, comment out offenses for now

* Fix regex for channel_group#, version change, etc

* regex getter for channel_group was incorrect and not matching the
group ID
* make channel_mode getter pull out the mode properly and ignore the
group ID
* change version to 1.5.2 so switch can differentiate versions (likely
this needs to be changed back by Cisco team)

* Rename prop to channel_group_mode, kept old cmds

* fix two style issues for quotes & line length

* Integrate refactoring as per pull/529

* much cleaner methods for get/set for the new mode property
* checks & balances put in place to remove and re-add the configuration
in the setter
* switch default mode of "on" integrated now as well
* @mikewiebe added minitest to confirm functionality; tested against n9k
@ 7.0(3)I4(2)

* Add lacp to feature, true-up regex for new modes

* kept the specific functions as they are and fixed up the regex for the
channel_group_mode. It now catches both static portchannels and
LACP-enabled modes via optionals in regex
* moved LACP feature enablement under existing Feature obj + cmd_ref

* Revert version.rb back to 1.5.0

* Feature to enable LACP not called correctly

* Tweak channel_group get

* uncomment out lines from test_snmpserver

* Handle version difference for development builds (#532)

* Handle version difference for development builds

* remove unnecessary split()

* Update copyright

* fixes for freeport issues (#533)

* fixes for freeport issues

* review comment

* fix review comments

* Rel160/yum (#534)

* Yum refactor

* More refactoring

* Add rescue for behavioral differnces

* Streamline try operations

* Update yum.rb

* fix deactivate commit

* fix yum package for dublin (#535)

* Patch fixes (#536)

* fix yum package for dublin

* fix remove method for yum

* skip yum tests for I2 and I3

* Update README.md

* Update LICENSE

* Update yum_package.yaml

* remove debug messages from yum (#537)

* eth int default (#538)

* eth int default

* changelog

* review comments

* Add missing vpc_domain boolean features (#540)

* Add two new bool props for vpc_domain provider

* Add ND synchronize prop for IPv6 VPCs

* Update changelog

* Update copyrights.

* Interface channel group (#541)

* fix channel_group mode

* fix mode

* changelog

* remove feature_lacp from yaml

* fix minitest errors (#543)

* Upgrade services (#544)

* Handle version difference for development builds

* remove unnecessary split()

* Update upgrade API and add 'package' API

Removing version check from upgrade API as the version property will be
deprecated.

Adding ‘package’ API which returns the nxos image installed on the
device.

* Modifying tests to handle new upgrade API

* Improving Error Handling for install command failure

* Update Documentation

* Move package api to get full path

* Exclude (#545)

* add version checks in yaml

* exclude clause check for new version

* fix ciscotest for regexp

* add doc

* return if val is same

* nv overlay remove for n3k

* vrf_af modify

* fix minor test case error

* fix white space issue in yaml

* add skip for default case

* add schema for os_version

* minor issue with interval fixed

* review comments

* (NETDEV-29) Enhance netdev NTP types (#542)

This commit enhances the existing ntp_config and ntp_server methods
and adds ntp_auth_key

ntp_config
 - authenticate
 - trusted_key

ntp_server
 - key
 - maxpoll
 - minpoll
 - source_interface
 - vrf

This commit adds ntp_auth_key

ntp_auth_key
  - key
  - algorithm
  - mode
  - password

* SPAN session provider (#539)

* Add new obj for SPAN session management

* starting with the test first; span_sesion.rb is incomplete at the
moment

* Add shutdown prop

* Addl tests + getter/setters for span_session

* Use has_key method for validating interface str

* Fix syntax error in span_session

* Fix failing test in lib/span_session.rb

* Fix failing check in test_span_session.rb

* Fix hash align offences

* Remove extraneous blank line

* Various updates/changes from PR feedback

* Update CHANGELOG, fix non-functioning test

* Add key-val to create & destroy

* Remove type in create cmd_ref

* Fix incorrect cmd_ref vars, correct setter calls in test

* Fix refute for removal test

* Add template to cmd_ref, fixes, revised test

* Add missing state key to destination set

* Attempt to fix failing interface-related tests

* Fix input validation for sources + helper method

* source_interface/vlan not iterating properly
* add valid_direction? helper method to validate span source directions (in/out/both)

* Fix span_session type getter

* Span session fixes:

* Bgp af aa (#547)

* first commit

* reset before set

* fix initialize

* minor bug fixes

* doc

* common methods moved to utils

* add comments

* comment clean

* review comments

* Addressed review comments and fixed a bug

* Add I5 MR3 Support

* update release process checklist

* Remove whitespace

* Remove git-flow setup info.

* version changed

* fix source_interface prop parent

* remove source interface as it is already there in previous releases

* skip for I4_6 and switchmode disabled for load_intervals

* adding skips for versions with issues

* release version numbering

* missing compare added in docs

* clean up the previous commit

* Fix grpc gem version to '1.2.5'

* add dplu6 for patch

* Update author list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants