Skip to content

Commit

Permalink
Merge pull request #176 from CiscoTestAutomation/release_24.8
Browse files Browse the repository at this point in the history
Release 24.8
  • Loading branch information
domachad authored Sep 4, 2024
2 parents 1f781e0 + e4f68fd commit 1adfa6d
Show file tree
Hide file tree
Showing 175 changed files with 5,513 additions and 878 deletions.
28 changes: 28 additions & 0 deletions pkgs/clean-pkg/changelog/2024/august.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
--------------------------------------------------------------------------------
New
--------------------------------------------------------------------------------

* iosxe
* connect stage
* add password recovery for connect stage.

* clean-pkg
* updated the default keep configuration


--------------------------------------------------------------------------------
Fix
--------------------------------------------------------------------------------

* iosxe
* set controller mode stage
* the stage is now working properly fix the issue with stage and reload stage
* Modified install_image
* Added new flag skip_save_running_config to skip the step to save the the running configuration to the startup config.

* generic
* Modified configure_management
* Added `alias_as_hostname` argument
* Allows user to use the alias as the device hostname


82 changes: 43 additions & 39 deletions pkgs/clean-pkg/sdk_generator/output/github_clean.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkgs/clean-pkg/src/genie/libs/clean/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'''

# metadata
__version__ = '24.7'
__version__ = '24.8'
__author__ = 'Cisco Systems Inc.'
__contact__ = ['asg-genie-support@cisco.com', 'pyats-support-ext@cisco.com']
__copyright__ = 'Copyright (c) 2019, Cisco Systems Inc.'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Enable abstraction using this directory name as the abstraction token
try:
from genie import abstract
abstract.declare_token(platform='asr1k')
except Exception as e:
import warnings
warnings.warn('Could not declare abstraction token: ' + str(e))
71 changes: 71 additions & 0 deletions pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/asr1k/stages.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
"""IOSXE ASR1K specific clean stages"""

# Python
import logging

from genie.metaparser.util.schemaengine import Optional
from genie.libs.clean.stages.stages import VerifyRunningImage as GenericVerifyRunningImage

# Logger
log = logging.getLogger(__name__)


class VerifyRunningImage(GenericVerifyRunningImage):
"""This stage verifies the current running image is the expected image.
The verification can be done by either MD5 hash comparison or by filename
comparison.
Stage Schema
------------
verify_running_image:
images (list): Image(s) that should be running on the device. If not
using verify_md5 then this should be the image path on the device.
If using verify_md5 then this should be the original image location
from the linux server.
ignore_flash (bool, optional): Ignore flash directory names. Default True.
verify_md5 (dict, optional): When this dictionary is defined, the image
verification will by done by comparing the MD5 hashes of the
running image against the expected image.
hostname (str): Linux server that is used to generate the MD5
hashes. This server must exist in the testbed servers block.
timeout (int, optional): Maximum time in seconds allowed for the
hashes to generate. Defaults to 60.
regex_search (bool, optional): Verify image using regular expression. Default False.
Example
-------
verify_running_image:
images:
- test_image.bin
"""

# =================
# Argument Defaults
# =================
IGNORE_FLASH = True
VERIFY_MD5 = False
REGEX_SEARCH = False

# ============
# Stage Schema
# ============
schema = {
'images': list,
Optional('ignore_flash'): bool,
Optional('verify_md5'): {
'hostname': str,
Optional('timeout'): int
},
Optional('regex_search'): bool,
}

def verify_running_image(self, steps, device, images, verify_md5=VERIFY_MD5, ignore_flash=IGNORE_FLASH,
regex_search=REGEX_SEARCH):
super().verify_running_image(steps, device, images, verify_md5=verify_md5, ignore_flash=ignore_flash,
regex_search=regex_search)
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
connect: &connect
preface: |
Trying mock_device ...
Connected to mock_device.
Escape character is ''^]''.
prompt: "%N#"

execute: &execute
show version | include operating mode: ''

verify_running_image:
<<: *connect
commands:
? ''
: new_state: execute1

execute1:
commands:
<<: *execute
show version: |
show version
Cisco IOS XE Software, Version BLD_POLARIS_DEV_LATEST_20240605_033359_V17_16_0_11
Cisco IOS Software [IOSXE], ASR1000 Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Experimental Version 17.16.20240605:040444 [BLD_POLARIS_DEV_LATEST_20240605_033359:/nobackup/mcpre/s2c-build-ws 102]
Copyright (c) 1986-2024 by Cisco Systems, Inc.
Compiled Tue 04-Jun-24 21:05 by mcpre
Cisco IOS-XE software, Copyright (c) 2005-2024 by cisco Systems, Inc.
All rights reserved. Certain components of Cisco IOS-XE software are
licensed under the GNU General Public License ("GPL") Version 2.0. The
software code licensed under GPL Version 2.0 is free software that comes
with ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such
GPL code under the terms of GPL Version 2.0. For more details, see the
documentation or "License Notice" file accompanying the IOS-XE software,
or the applicable URL provided on the flyer accompanying the IOS-XE
software.
ROM: 16.9(4r)
ott-asr1k-43 uptime is 2 minutes
Uptime for this control processor is 4 minutes
System returned to ROM by Reload Command
System image file is "bootflash:/image.SSA.XYZ"
Last reload reason: Reload Command
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
License Type: Smart License is permanent
License Level: ipbase
Next reload license Level: ipbase
The current crypto throughput level is 0 kbps
Smart Licensing Status: Smart Licensing Using Policy
cisco ASR1002-HX (2KH) processor (revision 2KH) with 6401752K/6147K bytes of memory.
Processor board ID FXS2510Q1SK
Router operating mode: Autonomous
Crypto Hardware Module present
8 Gigabit Ethernet interfaces
8 Ten Gigabit Ethernet interfaces
32768K bytes of non-volatile configuration memory.
16777216K bytes of physical memory.
29908991K bytes of eUSB flash at bootflash:.
Configuration register is 0x2102
prompt: "%N#"

do_you_want_to_remove1:
preface:
timing:
- 0:,0,0.05
response: |
install_remove: START Tue May 28 18:23:26 UTC 2024
install_remove: Removing IMG
Cleaning up unnecessary package files
No path specified, will use booted path /bootflash//packages.conf
Cleaning /bootflash
Scanning boot directory for packages ... done.
Preparing packages list to delete ...
[R0]: /bootflash/packages.conf File is in use, will not delete.
The following files will be deleted:
[R0]: /bootflash/image.bin
[R0]: /bootflash/image.bin.conf
prompt: Do you want to remove the above files? [y/n]
commands:
"n":
timing:
- 0:,0,0.05
response: |
[1] R0 Add succeed with reason: User Rejected Deletion
SUCCESS: install_remove Tue May 28 18:23:27 UTC 2024
new_state: execute1
Loading

0 comments on commit 1adfa6d

Please sign in to comment.