QualiSystems/Cisco-NXOS-Switch-Shell-2G
Fork: 3 Star: 0 (更新于 2024-11-11 19:00:12)
license: 暂无
Language: Python .
CloudShell Networking Cisco NXOS Shell for Switch
最后发布版本: 2.0.2 ( 2020-10-10 20:16:42)
Cisco NXOS Switch 2G Shell
Release date: September 2023
Shell version: 3.0.0
Document version: 1.0
In This Guide
- Overview
- Downloading the Shell
- Importing and Configuring the Shell
- Updating Python Dependencies for Shells
- Typical Workflows
- References
- Release Notes
Overview
A shell integrates a device model, application or other technology with CloudShell. A shell consists of a data model that defines how the device and its properties are modeled in CloudShell, along with automation that enables interaction with the device via CloudShell.
Networking Shells
CloudShell's networking shells provide L2 or L3 connectivity between resources and/or Apps.
Cisco NXOS Switch 2G Shell
The Cisco NXOS Switch 2G shell provides you with connectivity and management capabilities such as device structure discovery and power management for the Cisco NXOS Switch.
For more information on the Cisco NXOS Switch, see the official Cisco product documentation.
Standard version
The Cisco NXOS Switch 2G shell is based on the Networking Shell Standard version 5.0.0.
For detailed information about the shell’s structure and attributes, see the Networking Shell Standard in GitHub.
Requirements
Release: Cisco NXOS Switch 2G Shell
▪ CloudShell version: 2020.2 and above
▪ Cisco OS: Cisco NXOS
▪ Certified models: Nexus 7k
Note: If your CloudShell version does not support this shell, you should consider upgrading to a later version of CloudShell or contact customer support.
Data Model
The shell's data model includes all shell metadata, families, and attributes.
Cisco NXOS Switch 2G Shell Families and Models
The Cisco NXOS Switch families and models are listed in the following table:
Family | Model | Description |
---|---|---|
CS_Switch | Cisco NXOS Switch 2G | Generic Cisco NXOS Switch 2 Generation |
CS_Chassis | Generic Chassis | Default Switch chassis |
CS_Module | Generic Module | Modules located on the chassis |
CS_SubModule | Generic Sub Module | Sub modules |
CS_Port | Generic Port | Interface |
CS_PortChannel | Generic Port Channel | Group of interfaces |
CS_PowerPort | Generic Power Port | Power Supply module |
Cisco NXOS Switch 2G Shell Attributes
The attribute names and types are listed in the following section of the Networking Shell Standard:
Automation
This section describes the automation (drivers) associated with the data model. The shell’s driver is provided as part of the shell package. There are two types of automation processes, Autoload and Resource. Autoload is executed when creating the resource in the Inventory dashboard, while resource commands are run in the sandbox.
The following resource commands are available on the Cisco NXOS Switch:
- Health Check
- Run Custom Command
- Save
- Restore
- Load Firmware
For detailed information on each of the above commands, see the following section of the Networking Shell Standard:
Downloading the Shell
The Cisco NXOS Switch 2G Shell shell is available from the Quali Community Integrations page.
Download the files into a temporary location on your local machine.
The shell comprises:
File name | Description |
---|---|
CiscoNxosSwitchShell2G.zip | Cisco IOS Switch shell package |
cloudshell-networking-cisco-nxos-2-gen-dependencies-package-1.0.X.zip | Shell Python dependencies (for offline deployments only) |
Importing and Configuring the Shell
This section describes how to import the Cisco NXOS Switch 2G Shell 1.0.0 shell and configure and modify the shell’s devices.
Importing the shell into CloudShell
To import the shell into CloudShell:
-
Make sure you have the shell’s zip package. If not, download the shell from the Quali Community's Integrations page.
-
In CloudShell Portal, as Global administrator, open the Manage – Shells page.
-
Click Import.
-
In the dialog box, navigate to the shell's zip package, select it and click Open.
The shell is displayed in the Shells page and can be used by domain administrators in all CloudShell domains to create new inventory resources, as explained in Adding Inventory Resources.
Offline installation of a shell
Note: Offline installation instructions are relevant only if CloudShell Execution Server has no access to PyPi. You can skip this section if your execution server has access to PyPi. For additional information, see the online help topic on offline dependencies.
In offline mode, import the shell into CloudShell and place any dependencies in the appropriate dependencies folder. The dependencies folder may differ, depending on the CloudShell version you are using:
-
For CloudShell version 8.3 and above, see Adding Shell and script packages to the local PyPi Server repository.
-
For CloudShell version 8.2, perform the appropriate procedure: Adding Shell and script packages to the local PyPi Server repository or Setting the python pythonOfflineRepositoryPath configuration key.
-
For CloudShell versions prior to 8.2, see Setting the python pythonOfflineRepositoryPath configuration key.
Adding shell and script packages to the local PyPi Server repository
If your Quali Server and/or execution servers work offline, you will need to copy all required Python packages, including the out-of-the-box ones, to the PyPi Server's repository on the Quali Server computer (by default C:\Program Files (x86)\QualiSystems\CloudShell\Server\Config\Pypi Server Repository).
For more information, see Configuring CloudShell to Execute Python Commands in Offline Mode.
To add Python packages to the local PyPi Server repository:
-
If you haven't created and configured the local PyPi Server repository to work with the execution server, perform the steps in Add Python packages to the local PyPi Server repository (offline mode).
-
For each shell or script you add into CloudShell, do one of the following (from an online computer):
-
Connect to the Internet and download each dependency specified in the requirements.txt file with the following command:
pip download -r requirements.txt
. The shell or script's requirements are downloaded as zip files. -
In the Quali Community's Integrations page, locate the shell and click the shell's Download link. In the page that is displayed, from the Downloads area, extract the dependencies package zip file.
-
-
Place these zip files in the local PyPi Server repository.
Setting the python PythonOfflineRepositoryPath configuration key
Before PyPi Server was introduced as CloudShell’s python package management mechanism, the PythonOfflineRepositoryPath
key was used to set the default offline package repository on the Quali Server machine, and could be used on specific Execution Server machines to set a different folder.
To set the offline python repository:
-
Download the cloudshell-networking-cisco-nxos-2-gen-dependencies-package-1.0.X.zip file, see Downloading the Shell.
-
Unzip it to a local repository. Make sure the execution server has access to this folder.
-
On the Quali Server machine, in the ~\CloudShell\Server\customer.config file, add the following key to specify the path to the default python package folder (for all Execution Servers):
<add key="PythonOfflineRepositoryPath" value="repository full path"/>
-
If you want to override the default folder for a specific Execution Server, on the Execution Server machine, in the ~TestShell\Execution Server\customer.config file, add the following key:
<add key="PythonOfflineRepositoryPath" value="repository full path"/>
-
Restart the Execution Server.
Configuring a new resource
This section explains how to create a new resource from the shell.
In CloudShell, the component that models the device is called a resource. It is based on the shell that models the device and allows the CloudShell user and API to remotely control the device from CloudShell.
You can also modify existing resources, see Managing Resources in the Inventory.
To create a resource for the device:
-
In the CloudShell Portal, in the Inventory dashboard, click Add New.
-
From the list, select CiscoNXOS Switch 2G.
-
Enter the Name and IP address of the Cisco NXOS Switch.
-
Click Create.
-
In the Resource dialog box, enter the device's settings, see Cisco NXOS Switch 2G Shell Attributes. Make sure you enter the device's SNMP version and credentials.
-
Click Continue.
CloudShell validates the device’s settings and updates the new resource with the device’s structure.
Updating Python Dependencies for Shells
This section explains how to update your Python dependencies folder. This is required when you upgrade a shell that uses new/updated dependencies. It applies to both online and offline dependencies.
Updating offline Python dependencies
To update offline Python dependencies:
-
Download the latest Python dependencies package zip file locally.
-
Extract the zip file to the suitable offline package folder(s).
-
Terminate the shell’s instance, as explained here.
Updating online Python dependencies
In online mode, the execution server automatically downloads and extracts the appropriate dependencies file to the online Python dependencies repository every time a new instance of the driver or script is created.
To update online Python dependencies:
- If there is a live instance of the shell's driver or script, terminate the shell’s instance, as explained here. If an instance does not exist, the execution server will download the Python dependencies the next time a command of the driver or script runs.
Typical Workflows
Workflow 1 - Save configuration
-
In CloudShell Portal, add the Cisco NXOS resource to your blueprint and reserve the blueprint.
-
Run the Save resource command.
-
In the command inputs field, enter the following information:
- Folder Path: For example, tftp://ipaddress/shared folder.
- Configuration Type: Startup or Running.
- VRF Management Name: Provide the VRF Management name, if relevant.
-
Click Run.
The Startup or Running configuration is saved to a file named <ResourceName>-<startup/running-config>-
Workflow 2 - Restore configuration
-
In CloudShell Portal, add the Cisco NXOS resource to your blueprint and reserve the blueprint.
-
Run the Restore resource command.
-
In the command inputs field, enter the following information:
- Path: (Mandatory) Enter the full path of the configuration file.
- Restore Method: (Optional) Possible values are Override or Append. If left empty, the Override method is used.
- Configuration Type: (Mandatory) Possible values are Startup or Running.
- VRF Management Name: (Optional) Provide the VRF Management name, if relevant.
-
Click Run.
Workflow 3 - Load firmware
-
In CloudShell Portal, add the Cisco NXOS resource to your blueprint and reserve the blueprint.
-
Run the Load Firmware resource command.
-
In the command inputs field, enter the following information:
- Remote Host (Mandatory). Enter the full path to the firmware file on the remote host, for example: tftp://10.1.1.1/nxos12.SE1-smp-k8.bin
- File Path (Mandatory). Enter the destination filename on the device itself, for example: bootflash:/nxos12.SE1-smp-k8.bin.
-
Click Run.
References
To download and share integrations, see Quali Community's Integrations.
For instructional training and documentation, see Quali University.
To suggest an idea for the product, see Quali's Idea box.
To connect with Quali users and experts from around the world, ask questions and discuss issues, see Quali's Community forums.
Release Notes
Cisco NXOS Switch 2G Shell
What's New
-
Console Session is now supported. You must perform the following steps on the resource:
- Set the Session Concurrency Limit attribute to 1.
- Set the following attributes: Console Server IP Address, Console Port, User, and Password.
-
A new Restore override flow was implemented, requiring a Console Session.
Knowing Issues
- Due to the Physical Entity table design, all ports that are missing a SFP or GBIC transceiver will be skipped during Autoload.
最近版本更新:(数据更新于 2024-10-20 08:50:36)
2020-10-10 20:16:42 2.0.2
2018-01-15 23:41:18 2.0.1
2017-11-10 00:48:13 2.0.0
2017-05-03 19:20:39 1.0.0
QualiSystems/Cisco-NXOS-Switch-Shell-2G同语言 Python最近更新仓库
2024-11-22 19:26:55 ultralytics/ultralytics
2024-11-22 08:12:43 jxxghp/MoviePilot
2024-11-22 06:12:44 dagster-io/dagster
2024-11-22 02:39:01 goauthentik/authentik
2024-11-22 00:15:39 jumpserver/jumpserver
2024-11-22 00:03:47 comfyanonymous/ComfyUI