diff --git a/pkgs/clean-pkg/changelog/2024/april.rst b/pkgs/clean-pkg/changelog/2024/april.rst new file mode 100644 index 000000000..18e1fae87 --- /dev/null +++ b/pkgs/clean-pkg/changelog/2024/april.rst @@ -0,0 +1,16 @@ +-------------------------------------------------------------------------------- + Fix +-------------------------------------------------------------------------------- + +* iosxe + * Change logic for copy_to_device to check for local file size before trying from remote server + + +-------------------------------------------------------------------------------- + New +-------------------------------------------------------------------------------- + +* iosxe + * Added new clean stage `reset_configuration` + + diff --git a/pkgs/clean-pkg/sdk_generator/output/github_clean.json b/pkgs/clean-pkg/sdk_generator/output/github_clean.json index f8fdf22b9..46467f678 100644 --- a/pkgs/clean-pkg/sdk_generator/output/github_clean.json +++ b/pkgs/clean-pkg/sdk_generator/output/github_clean.json @@ -1,713 +1,1177 @@ { "ApplyConfiguration": { - "apic": { - "doc": "This stage executes the REST API against the device.\n\nStage schema\n------------\napply_configuration:\n\n method (str, optional): the REST API method to call (get/put/post/delete).\n Defaults to 'post'.\n\n rest_alias (str, optional): the connection alias for the REST\n connection. Defaults to 'rest'.\n\n rest_via (str, optional): the connection name from the topology.\n Defaults to 'rest'.\n\n kwargs (dict, optional): the keyword arguments to pass to the REST API call.\n Defaults to None.\n\nExample\n-------\napply_configuration:\n method: get\n kwargs:\n dn: api/class/topSystem.json\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "ApplyConfiguration", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/apic/stages.py#L1036" - }, - "com": { - "doc": "Apply configuration on the device, either by providing a file or a\nraw configuration.\n\nStage Schema\n------------\napply_configuration:\n\n configuration (str, optional): String representation of the configuration to\n apply. Defaults to None.\n\n configuration_from_file (str, optional): A file that contains a configuration\n that will be read. The configuration contained will then be applied as\n if a string representation of the config was applied. Defaults to None.\n\n file (str, optional): A saved configuration file that will be used. The file\n will either be used in copy run start or configure replace based on the\n 'configure_replace' argument. Defaults to None.\n\n configure_replace (bool, optional): When 'True' use 'configure replace' instead\n of 'copy run start'. Defaults to False.\n\n config_timeout (int, optional): Max time in seconds allowed for applying the\n configuration. Defaults to 60.\n\n config_stable_time (int, optional): Max time in seconds allowed for the\n configuration to stabilize. Defaults to 10.\n\n copy_vdc_all (bool, optional): If 'True' copy on all VDCs. Defaults to False.\n\n max_time (int, optional): Maximum time in seconds allowed for any\n verifications. Defaults to 300.\n\n check_interval (int, optional): How often in seconds to check. Defaults to 60.\n\n skip_copy_run_start (bool, optional): If 'True' do not copy the running config\n to the startup config. Defaults to False.\n\n copy_directly_to_startup (bool, optional): If 'True' copy the provided\n configuration directly to the startup config. Defaults to False.\n\n error_pattern (list, optional): if error_pattern list is given,\n it will be passed to device.configure() to use the error_pattern\n\nExample\n-------\napply_configuration:\n configuration: |\n interface ethernet2/1\n no shutdown\n config_timeout: 600\n config_stable_time: 10\n copy_vdc_all: True\n max_time: 300\n check_interval: 20\n copy_directly_to_startup: False\n\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "ApplyConfiguration", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L1612" - }, - "iosxe": { - "sdwan": { - "doc": "Apply configuration on the device, either by providing a file or a\nraw configuration.\n\nStage Schema\n------------\napply_configuration:\n\n configuration (str, optional): String representation of the configuration to\n apply. Defaults to None.\n\n configuration_from_file (str, optional): A file that contains a configuration\n that will be read. The configuration contained will then be applied as\n if a string representation of the config was applied. Defaults to None.\n\n file (str, optional): A saved configuration file that will be used. The file\n will either be used in copy run start or configure replace based on the\n 'configure_replace' argument. Defaults to None.\n\n configure_replace (bool, optional): When 'True' use 'configure replace' instead\n of 'copy run start'. Defaults to False.\n\n config_timeout (int, optional): Max time in seconds allowed for applying the\n configuration. Defaults to 60.\n\n config_stable_time (int, optional): Max time in seconds allowed for the\n configuration to stabilize. Defaults to 10.\n\n copy_vdc_all (bool, optional): If 'True' copy on all VDCs. Defaults to False.\n\n max_time (int, optional): Maximum time in seconds allowed for any\n verifications. Defaults to 300.\n\n check_interval (int, optional): How often in seconds to check. Defaults to 60.\n\n skip_copy_run_start (bool, optional): If 'True' do not copy the running config\n to the startup config. Defaults to False.\n\n copy_directly_to_startup (bool, optional): If 'True' copy the provided\n configuration directly to the startup config. Defaults to False.\n\nExample\n-------\napply_configuration:\n configuration: |\n interface ethernet2/1\n no shutdown\n config_timeout: 600\n config_stable_time: 10\n copy_vdc_all: True\n max_time: 300\n check_interval: 20\n copy_directly_to_startup: False\n\n", - "module_name": "stages.stages", + "doc": "Apply configuration on the device, either by providing a file or a\nraw configuration.\n\nStage Schema\n------------\napply_configuration:\n\n configuration (str, optional): String representation of the configuration to\n apply. Defaults to None.\n\n configuration_from_file (str, optional): A file that contains a configuration\n that will be read. The configuration contained will then be applied as\n if a string representation of the config was applied. Defaults to None.\n\n file (str, optional): A saved configuration file that will be used. The file\n will either be used in copy run start or configure replace based on the\n 'configure_replace' argument. Defaults to None.\n\n configure_replace (bool, optional): When 'True' use 'configure replace' instead\n of 'copy run start'. Defaults to False.\n\n config_timeout (int, optional): Max time in seconds allowed for applying the\n configuration. Defaults to 60.\n\n config_stable_time (int, optional): Max time in seconds allowed for the\n configuration to stabilize. Defaults to 10.\n\n copy_vdc_all (bool, optional): If 'True' copy on all VDCs. Defaults to False.\n\n max_time (int, optional): Maximum time in seconds allowed for any\n verifications. Defaults to 300.\n\n check_interval (int, optional): How often in seconds to check. Defaults to 60.\n\n skip_copy_run_start (bool, optional): If 'True' do not copy the running config\n to the startup config. Defaults to False.\n\n copy_directly_to_startup (bool, optional): If 'True' copy the provided\n configuration directly to the startup config. Defaults to False.\n\n error_pattern (list, optional): if error_pattern list is given,\n it will be passed to device.configure() to use the error_pattern\n\nExample\n-------\napply_configuration:\n configuration: |\n interface ethernet2/1\n no shutdown\n config_timeout: 600\n config_stable_time: 10\n copy_vdc_all: True\n max_time: 300\n check_interval: 20\n copy_directly_to_startup: False\n\n", + "folders": { + "apic": { + "doc": "This stage executes the REST API against the device.\n\nStage schema\n------------\napply_configuration:\n\n method (str, optional): the REST API method to call (get/put/post/delete).\n Defaults to 'post'.\n\n rest_alias (str, optional): the connection alias for the REST\n connection. Defaults to 'rest'.\n\n rest_via (str, optional): the connection name from the topology.\n Defaults to 'rest'.\n\n kwargs (dict, optional): the keyword arguments to pass to the REST API call.\n Defaults to None.\n\nExample\n-------\napply_configuration:\n method: get\n kwargs:\n dn: api/class/topSystem.json\n", + "module_name": "stages.apic.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "apic" + }, + "uid": "ApplyConfiguration", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/apic/stages.py#L1036" + }, + "iosxe": { + "folders": { + "sdwan": { + "doc": "Apply configuration on the device, either by providing a file or a\nraw configuration.\n\nStage Schema\n------------\napply_configuration:\n\n configuration (str, optional): String representation of the configuration to\n apply. Defaults to None.\n\n configuration_from_file (str, optional): A file that contains a configuration\n that will be read. The configuration contained will then be applied as\n if a string representation of the config was applied. Defaults to None.\n\n file (str, optional): A saved configuration file that will be used. The file\n will either be used in copy run start or configure replace based on the\n 'configure_replace' argument. Defaults to None.\n\n configure_replace (bool, optional): When 'True' use 'configure replace' instead\n of 'copy run start'. Defaults to False.\n\n config_timeout (int, optional): Max time in seconds allowed for applying the\n configuration. Defaults to 60.\n\n config_stable_time (int, optional): Max time in seconds allowed for the\n configuration to stabilize. Defaults to 10.\n\n copy_vdc_all (bool, optional): If 'True' copy on all VDCs. Defaults to False.\n\n max_time (int, optional): Maximum time in seconds allowed for any\n verifications. Defaults to 300.\n\n check_interval (int, optional): How often in seconds to check. Defaults to 60.\n\n skip_copy_run_start (bool, optional): If 'True' do not copy the running config\n to the startup config. Defaults to False.\n\n copy_directly_to_startup (bool, optional): If 'True' copy the provided\n configuration directly to the startup config. Defaults to False.\n\nExample\n-------\napply_configuration:\n configuration: |\n interface ethernet2/1\n no shutdown\n config_timeout: 600\n config_stable_time: 10\n copy_vdc_all: True\n max_time: 300\n check_interval: 20\n copy_directly_to_startup: False\n\n", + "module_name": "stages.iosxe.sdwan.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "sdwan" + }, + "uid": "ApplyConfiguration", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/stages.py#L262" + } + }, + "tokens": { + "os": "iosxe" + } + }, + "iosxr": { + "doc": "Apply configuration on the device, either by providing a file or a\nraw configuration.\n\nStage Schema\n------------\napply_configuration:\n\n configuration (str, optional): String representation of the configuration to\n apply. Defaults to None.\n\n configuration_from_file (str, optional): A file that contains a configuration\n that will be read. The configuration contained will then be applied as\n if a string representation of the config was applied. Defaults to None.\n\n file (str, optional): A saved configuration file that will be used. The file\n will either be used in copy run start or configure replace based on the\n 'configure_replace' argument. Defaults to None.\n\n configure_replace (bool, optional): When 'True' use 'configure replace' instead\n of 'copy run start'. Defaults to False.\n\n config_timeout (int, optional): Max time in seconds allowed for applying the\n configuration. Defaults to 60.\n\n config_stable_time (int, optional): Max time in seconds allowed for the\n configuration to stabilize. Defaults to 10.\n\n copy_directly_to_startup (bool, optional): If 'True' copy the provided\n configuration directly to the startup config. Defaults to False.\n\nExample\n-------\napply_configuration:\n configuration: |\n interface ethernet2/1\n no shutdown\n config_timeout: 600\n config_stable_time: 10\n copy_directly_to_startup: False\n\n", + "module_name": "stages.iosxr.stages", "package": "genie.libs.clean", + "tokens": { + "os": "iosxr" + }, "uid": "ApplyConfiguration", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/stages.py#L262" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/stages.py#L645" } }, - "iosxr": { - "doc": "Apply configuration on the device, either by providing a file or a\nraw configuration.\n\nStage Schema\n------------\napply_configuration:\n\n configuration (str, optional): String representation of the configuration to\n apply. Defaults to None.\n\n configuration_from_file (str, optional): A file that contains a configuration\n that will be read. The configuration contained will then be applied as\n if a string representation of the config was applied. Defaults to None.\n\n file (str, optional): A saved configuration file that will be used. The file\n will either be used in copy run start or configure replace based on the\n 'configure_replace' argument. Defaults to None.\n\n configure_replace (bool, optional): When 'True' use 'configure replace' instead\n of 'copy run start'. Defaults to False.\n\n config_timeout (int, optional): Max time in seconds allowed for applying the\n configuration. Defaults to 60.\n\n config_stable_time (int, optional): Max time in seconds allowed for the\n configuration to stabilize. Defaults to 10.\n\n copy_directly_to_startup (bool, optional): If 'True' copy the provided\n configuration directly to the startup config. Defaults to False.\n\nExample\n-------\napply_configuration:\n configuration: |\n interface ethernet2/1\n no shutdown\n config_timeout: 600\n config_stable_time: 10\n copy_directly_to_startup: False\n\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "ApplyConfiguration", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/stages.py#L645" - } + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "ApplyConfiguration", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L1612" }, "ApplyGlobalConfiguration": { - "linux": { - "wsim": { - "doc": "This stage apply configuration on the device with user provided data\nStage Schema\n------------\napply_global_configuration:\n ctrl_type(str): Type of the controller in which wsim will simulate the Aps/Clients.\n ctrl_ip(str): Management IP of the controller\n ctrl_username(str): username of the controller\n ctrl_password(str): password of the controller\n ap_name(str): Base Ap name\n ap_version(str,optional): Version of the AP\n ap_vlan(str): Vlan of the AP\n ap_freq(str,optional): Ap radio 2.4Ghz/5GHz\n ap_base_mac(str): Base mac address of the AP\n client_base_mac(str): Client base mac address\n\nExample\n-------\napply_global_configuration:\n ctrl_type: 'EWLC'\n ctrl_ip: '9.2.45.15'\n ctrl_username: 'welcome'\n ctrl_password: 'welcome'\n ap_name: 'wsim-AP'\n ap_model: '9117'\n ap_vlan: '46'\n ap_ip: '9.2.45.15' #give the controller mgmt IP\n ap_base_mac: '00:e5:64:00:00:00'\n client_base_mac: '00:00:e5:64:00:00'\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "ApplyGlobalConfiguration", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/linux/wsim/stages.py#L101" + "folders": { + "linux": { + "folders": { + "wsim": { + "doc": "This stage apply configuration on the device with user provided data\nStage Schema\n------------\napply_global_configuration:\n ctrl_type(str): Type of the controller in which wsim will simulate the Aps/Clients.\n ctrl_ip(str): Management IP of the controller\n ctrl_username(str): username of the controller\n ctrl_password(str): password of the controller\n ap_name(str): Base Ap name\n ap_version(str,optional): Version of the AP\n ap_vlan(str): Vlan of the AP\n ap_freq(str,optional): Ap radio 2.4Ghz/5GHz\n ap_base_mac(str): Base mac address of the AP\n client_base_mac(str): Client base mac address\n\nExample\n-------\napply_global_configuration:\n ctrl_type: 'EWLC'\n ctrl_ip: '9.2.45.15'\n ctrl_username: 'welcome'\n ctrl_password: 'welcome'\n ap_name: 'wsim-AP'\n ap_model: '9117'\n ap_vlan: '46'\n ap_ip: '9.2.45.15' #give the controller mgmt IP\n ap_base_mac: '00:e5:64:00:00:00'\n client_base_mac: '00:00:e5:64:00:00'\n", + "module_name": "stages.linux.wsim.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "wsim" + }, + "uid": "ApplyGlobalConfiguration", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/linux/wsim/stages.py#L101" + } + }, + "tokens": { + "origin": "linux" + } } } }, "ApplySelfSignedCert": { - "iosxe": { - "c9800": { - "c9800_cl": { - "doc": " This stage configures the self-signed-certificate for the given trustpoint.\n\n Stage Schema\n ------------\n apply_self_signed_cert:\n\n key_size (int, optional): Key size to be configured. Default is 2048\n\n signature_algorithm (str, optional): Algorithm to be applied. Default is sha256\n\n encryption_type (int, optional): Encryption type to be configured. Default is 0\n\n password (str): Password to be configured for the trustpoint.\n\n timeout (int, optional): Execute timeout in seconds. Defaults to 300.\n\n Examples:\n apply_self_signed_cert:\n key_size:2048\n signature_algorithm:sha256\n encryption_type:0\n password:cisco123\n timeout: 150\n ", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "ApplySelfSignedCert", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/c9800_cl/stages.py#L19" + "folders": { + "iosxe": { + "folders": { + "cat9k": { + "folders": { + "c9800_cl": { + "doc": " This stage configures the self-signed-certificate for the given trustpoint.\n\n Stage Schema\n ------------\n apply_self_signed_cert:\n\n key_size (int, optional): Key size to be configured. Default is 2048\n\n signature_algorithm (str, optional): Algorithm to be applied. Default is sha256\n\n encryption_type (int, optional): Encryption type to be configured. Default is 0\n\n password (str): Password to be configured for the trustpoint.\n\n timeout (int, optional): Execute timeout in seconds. Defaults to 300.\n\n Examples:\n apply_self_signed_cert:\n key_size:2048\n signature_algorithm:sha256\n encryption_type:0\n password:cisco123\n timeout: 150\n ", + "module_name": "stages.iosxe.cat9k.c9800_cl.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "cat9k", + "submodel": "c9800_cl" + }, + "uid": "ApplySelfSignedCert", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800_cl/stages.py#L19" + } + }, + "tokens": { + "platform": "cat9k" + } + } + }, + "tokens": { + "os": "iosxe" } } } }, "BackupFileOnDevice": { - "com": { - "doc": "This stage copies an existing file on the device and prepends 'backup_'\nto the start of the file name.\n\nStage Schema\n------------\nbackup_file_on_device:\n\n copy_dir (str): Directory containing file to be backed up\n\n copy_file (str): File to be backed up\n\n overwrite (bool, optional): Overwrite the file if exists. Defaults to True.\n\n timeout (int, optional): Copy timeout in second. Defaults to 300.\n\nExample\n-------\nbackup_file_on_device:\n copy_dir: bootflash:\n copy_file: ISSUCleanGolden.cfg\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "BackupFileOnDevice", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L1937" - } + "doc": "This stage copies an existing file on the device and prepends 'backup_'\nto the start of the file name.\n\nStage Schema\n------------\nbackup_file_on_device:\n\n copy_dir (str): Directory containing file to be backed up\n\n copy_file (str): File to be backed up\n\n overwrite (bool, optional): Overwrite the file if exists. Defaults to True.\n\n timeout (int, optional): Copy timeout in second. Defaults to 300.\n\nExample\n-------\nbackup_file_on_device:\n copy_dir: bootflash:\n copy_file: ISSUCleanGolden.cfg\n", + "folders": {}, + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "BackupFileOnDevice", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L1937" }, "ChangeBootVariable": { - "ios": { - "doc": "This stage configures boot variables of the device.\n\nStage Schema\n------------\nchange_boot_variable:\n\n images (list): Images to copy\n\n timeout (int, optional): Execute timeout in seconds. Defaults to 300.\n\n current_running_image (bool, optional): Set the boot variable to the currently\n running image from the show version command instead of the image provided.\n Defaults to False.\n\nExample\n-------\nchange_boot_variable:\n images:\n - harddisk:/Genie-12351822-iedge-asr-uut\n timeout: 150\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "ChangeBootVariable", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/ios/stages.py#L16" - }, - "iosxe": { - "cat9500": { - "doc": "This stage configures boot variables of the device using the following steps:\n\n - Delete existing boot variables.\n - Configure boot variables using the provided 'images'.\n - Write memory.\n - Verify the boot variables are as expected.\n\nStage Schema\n------------\nchange_boot_variable:\n\n images (list): Image files to use when configuring the boot variables.\n\n timeout (int, optional): Execute timeout in seconds. Defaults to 300.\n\n current_running_image (bool, optional): Set the boot variable to the currently\n running image from the show version command instead of the image provided.\n Defaults to False.\n\nExample\n-------\nchange_boot_variable:\n images:\n - harddisk:/image.bin\n timeout: 150\n", - "module_name": "stages.stages", + "folders": { + "ios": { + "doc": "This stage configures boot variables of the device.\n\nStage Schema\n------------\nchange_boot_variable:\n\n images (list): Images to copy\n\n timeout (int, optional): Execute timeout in seconds. Defaults to 300.\n\n current_running_image (bool, optional): Set the boot variable to the currently\n running image from the show version command instead of the image provided.\n Defaults to False.\n\nExample\n-------\nchange_boot_variable:\n images:\n - harddisk:/Genie-12351822-iedge-asr-uut\n timeout: 150\n", + "module_name": "stages.ios.stages", "package": "genie.libs.clean", + "tokens": { + "os": "ios" + }, "uid": "ChangeBootVariable", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9500/stages.py#L17" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/ios/stages.py#L16" }, - "cat9k": { - "doc": "This stage configures boot variables of the device using the following steps:\n\n - Delete existing boot variables.\n - Configure boot variables using the provided 'images'.\n - Write memory.\n - Verify the boot variables are as expected.\n\nStage Schema\n------------\nchange_boot_variable:\n\n images (list): Image files to use when configuring the boot variables.\n\n timeout (int, optional): Execute timeout in seconds. Defaults to 300.\n\n current_running_image (bool, optional): Set the boot variable to the currently\n running image from the show version command instead of the image provided.\n Defaults to False.\n\nExample\n-------\nchange_boot_variable:\n images:\n - harddisk:/image.bin\n timeout: 150\n", - "module_name": "stages.stages", + "iosxe": { + "doc": "This stage configures boot variables of the device using the following steps:\n\n - Delete existing boot variables.\n - Configure boot variables using the provided 'images'.\n - Set the configuration-register using the provided 'config_register'.\n - Write memory.\n - Verify the boot variables are as expected.\n - Verify the configuration-register is as expected.\n\nStage Schema\n------------\nchange_boot_variable:\n\n images (list): Image files to use when configuring the boot variables.\n\n timeout (int, optional): Execute timeout in seconds. Defaults to 300.\n\n config_register (str, optional): Value to set config-register for\n reload. Defaults to 0x2102.\n\n current_running_image (bool, optional): Set the boot variable to the currently\n running image from the show version command instead of the image provided.\n Defaults to False.\n\nExample\n-------\nchange_boot_variable:\n images:\n - harddisk:/image.bin\n timeout: 150\n", + "folders": { + "cat9k": { + "doc": "This stage configures boot variables of the device using the following steps:\n\n - Delete existing boot variables.\n - Configure boot variables using the provided 'images'.\n - Write memory.\n - Verify the boot variables are as expected.\n\nStage Schema\n------------\nchange_boot_variable:\n\n images (list): Image files to use when configuring the boot variables.\n\n timeout (int, optional): Execute timeout in seconds. Defaults to 300.\n\n current_running_image (bool, optional): Set the boot variable to the currently\n running image from the show version command instead of the image provided.\n Defaults to False.\n\nExample\n-------\nchange_boot_variable:\n images:\n - harddisk:/image.bin\n timeout: 150\n", + "folders": { + "c9500": { + "doc": "This stage configures boot variables of the device using the following steps:\n\n - Delete existing boot variables.\n - Configure boot variables using the provided 'images'.\n - Write memory.\n - Verify the boot variables are as expected.\n\nStage Schema\n------------\nchange_boot_variable:\n\n images (list): Image files to use when configuring the boot variables.\n\n timeout (int, optional): Execute timeout in seconds. Defaults to 300.\n\n current_running_image (bool, optional): Set the boot variable to the currently\n running image from the show version command instead of the image provided.\n Defaults to False.\n\nExample\n-------\nchange_boot_variable:\n images:\n - harddisk:/image.bin\n timeout: 150\n", + "module_name": "stages.iosxe.cat9k.c9500.stages", + "package": "genie.libs.clean", + "tokens": { + "model": "c9500", + "platform": "cat9k" + }, + "uid": "ChangeBootVariable", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9500/stages.py#L17" + } + }, + "module_name": "stages.iosxe.cat9k.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "cat9k" + }, + "uid": "ChangeBootVariable", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py#L32" + }, + "sdwan": { + "doc": "This stage change boot variables of the device using the following steps:\n\n - Delete existing boot variables.\n - Configure boot variables using the provided 'images'.\n - Write memory.\n\nStage Schema\n------------\nchange_boot_variable:\n\n images (list): Image files to use when configuring the boot variables.\n\n timeout (int, optional): Execute timeout in seconds. Defaults to 300.\n\nExample\n-------\nchange_boot_variable:\n timeout: 150\n", + "module_name": "stages.iosxe.sdwan.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "sdwan" + }, + "uid": "ChangeBootVariable", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/stages.py#L965" + } + }, + "module_name": "stages.iosxe.stages", "package": "genie.libs.clean", + "tokens": { + "os": "iosxe" + }, "uid": "ChangeBootVariable", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py#L32" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L42" }, - "doc": "This stage configures boot variables of the device using the following steps:\n\n - Delete existing boot variables.\n - Configure boot variables using the provided 'images'.\n - Set the configuration-register using the provided 'config_register'.\n - Write memory.\n - Verify the boot variables are as expected.\n - Verify the configuration-register is as expected.\n\nStage Schema\n------------\nchange_boot_variable:\n\n images (list): Image files to use when configuring the boot variables.\n\n timeout (int, optional): Execute timeout in seconds. Defaults to 300.\n\n config_register (str, optional): Value to set config-register for\n reload. Defaults to 0x2102.\n\n current_running_image (bool, optional): Set the boot variable to the currently\n running image from the show version command instead of the image provided.\n Defaults to False.\n\nExample\n-------\nchange_boot_variable:\n images:\n - harddisk:/image.bin\n timeout: 150\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "sdwan": { - "doc": "This stage change boot variables of the device using the following steps:\n\n - Delete existing boot variables.\n - Configure boot variables using the provided 'images'.\n - Write memory.\n\nStage Schema\n------------\nchange_boot_variable:\n\n images (list): Image files to use when configuring the boot variables.\n\n timeout (int, optional): Execute timeout in seconds. Defaults to 300.\n\nExample\n-------\nchange_boot_variable:\n timeout: 150\n", - "module_name": "stages.stages", + "nxos": { + "doc": "This stage configures boot variables of the device using the following steps:\n\n - Delete existing boot variables.\n - Configure boot variables using the provided 'images'.\n - Write memory.\n - Verify the boot variables are as expected.\n\nStage Schema\n------------\nchange_boot_variable:\n\n images:\n\n kickstart (list, optional): The kickstart image file\n\n system (list): The system image file\n\n copy_vdc_all (bool, optional): If True copy onto all VDCs. Defaults to False.\n\n timeout (int, optional): Execute timeout in seconds. Defaults to 300.\n\n max_time (int, optional): Maximum time in seconds allowed for verifications.\n Defaults to 300.\n\n check_interval (int, optional): How often to check verifications in seconds.\n Defaults to 60.\n\n standby_copy_max_time (int, optional): Maximum time in seconds allowed for\n copying to standby RP. Defaults to 300.\n\n standby_copy_check_interval (int, optional): How often to check if the copy\n to the standby RP is complete. Defaults to 20.\n\n current_running_image (bool, optional): Set the boot variable to the currently\n running image from the show version command instead of the image provided.\n Defaults to False.\n\nExample\n-------\nchange_boot_variable:\n images:\n kickstart: bootflash:/kisckstart.gbin\n system: bootflash:/system.gbin\n copy_vdc_all: True\n timeout: 150\n max_time: 300\n check_interval: 20\n standby_copy_max_time: 100\n standby_copy_check_interval: 10\n", + "module_name": "stages.nxos.stages", "package": "genie.libs.clean", + "tokens": { + "os": "nxos" + }, "uid": "ChangeBootVariable", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/stages.py#L969" - }, - "uid": "ChangeBootVariable", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L38" - }, - "nxos": { - "doc": "This stage configures boot variables of the device using the following steps:\n\n - Delete existing boot variables.\n - Configure boot variables using the provided 'images'.\n - Write memory.\n - Verify the boot variables are as expected.\n\nStage Schema\n------------\nchange_boot_variable:\n\n images:\n\n kickstart (list, optional): The kickstart image file\n\n system (list): The system image file\n\n copy_vdc_all (bool, optional): If True copy onto all VDCs. Defaults to False.\n\n timeout (int, optional): Execute timeout in seconds. Defaults to 300.\n\n max_time (int, optional): Maximum time in seconds allowed for verifications.\n Defaults to 300.\n\n check_interval (int, optional): How often to check verifications in seconds.\n Defaults to 60.\n\n standby_copy_max_time (int, optional): Maximum time in seconds allowed for\n copying to standby RP. Defaults to 300.\n\n standby_copy_check_interval (int, optional): How often to check if the copy\n to the standby RP is complete. Defaults to 20.\n\n current_running_image (bool, optional): Set the boot variable to the currently\n running image from the show version command instead of the image provided.\n Defaults to False.\n\nExample\n-------\nchange_boot_variable:\n images:\n kickstart: bootflash:/kisckstart.gbin\n system: bootflash:/system.gbin\n copy_vdc_all: True\n timeout: 150\n max_time: 300\n check_interval: 20\n standby_copy_max_time: 100\n standby_copy_check_interval: 10\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "ChangeBootVariable", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/stages.py#L25" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/stages.py#L25" + } } }, "CliBoot": { - "aireos": { - "doc": "This stage boot the device from CLI using the following steps:\n\n - Using the provided info to download the requested boot image\n - Waiting for the image download\n - Reboot the device\n\nStage Schema\n------------\nCliBoot:\n\n filename (str): The name of the file to be using to download.\n\n username (str, optional): FTP username if using FTP protocol\n \n password (str, optional): FTP password if using FTP protocol\n\n protocol (str): Supporting TFTP/FTP, default is FTP\n\n path (str): A path to the image location\n\n tftp_server (str): an IP address for tftp server\n \n\n\nExample\n-------\ncli_boot:\n filename: 'AIR-CT3504-K9-8-8-111-0.aes'\n timeout: 1000\n username: rcpuser\n password: cisco123$\n protocol: ftp\n tftp_server: 10.10.2.10\n path: /auto/my-ftp/\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "CliBoot", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/aireos/stages.py#L26" + "folders": { + "aireos": { + "doc": "This stage boot the device from CLI using the following steps:\n\n - Using the provided info to download the requested boot image\n - Waiting for the image download\n - Reboot the device\n\nStage Schema\n------------\nCliBoot:\n\n filename (str): The name of the file to be using to download.\n\n username (str, optional): FTP username if using FTP protocol\n \n password (str, optional): FTP password if using FTP protocol\n\n protocol (str): Supporting TFTP/FTP, default is FTP\n\n path (str): A path to the image location\n\n tftp_server (str): an IP address for tftp server\n \n\n\nExample\n-------\ncli_boot:\n filename: 'AIR-CT3504-K9-8-8-111-0.aes'\n timeout: 1000\n username: rcpuser\n password: cisco123$\n protocol: ftp\n tftp_server: 10.10.2.10\n path: /auto/my-ftp/\n", + "module_name": "stages.aireos.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "aireos" + }, + "uid": "CliBoot", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/aireos/stages.py#L26" + } } }, "ConfigureApTxPower": { - "iosxe": { - "c9800": { - "doc": " This stage verifies the configured Tx power.\n\n Stage Schema\n ------------\n configure_ap_tx_power:\n configure_ap_tx_power(str): tx power to be verified\n\n Examples:\n configure_ap_tx_power:\n tx_power: \n - \"1\"\n - \"2\"\n ", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "ConfigureApTxPower", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/stages.py#L250" + "folders": { + "iosxe": { + "folders": { + "cat9k": { + "folders": { + "c9800": { + "doc": " This stage verifies the configured Tx power.\n\n Stage Schema\n ------------\n configure_ap_tx_power:\n configure_ap_tx_power(str): tx power to be verified\n\n Examples:\n configure_ap_tx_power:\n tx_power: \n - \"1\"\n - \"2\"\n ", + "module_name": "stages.iosxe.cat9k.c9800.stages", + "package": "genie.libs.clean", + "tokens": { + "model": "c9800", + "platform": "cat9k" + }, + "uid": "ConfigureApTxPower", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800/stages.py#L250" + } + }, + "tokens": { + "platform": "cat9k" + } + } + }, + "tokens": { + "os": "iosxe" + } } } }, "ConfigureManagement": { - "com": { - "doc": "This stage configures the management IP settings on the device.\n\nStage Schema\n------------\nconfigure_management:\n\n address ('dict', optional): Address(es) to configure on the device (syntax: address/mask) (optional)\n ipv4 ('str') or ('list'): ipv4 address\n ipv6 ('str') or ('list'): ipv6 address\n\n gateway: (dict, optional) Gateway address(es) for default route\n ipv4 ('str') or ('list'): ipv4 gateway address\n ipv6 ('str') or ('list'): ipv6 gateway address\n\n vrf (str, optional): VRF to use for management interface\n\n interface (str, optional): Management interface to use\n\n routes ('dict', optional):\n ipv4 (list of 'dict'): ipv4 routes\n - subnet: (str) subnet including mask\n next_hop: (str) next_hop for this subnet\n ipv6 (list of 'dict'): ipv6 routes\n - subnet: (str) subnet including mask\n next_hop: (str) next_hop for this subnet\n\n dhcp_timeout ('int', optional): DHCP timeout in seconds (default: 30)\n\n protocols ('list', optional): [list of protocols]\n\n set_hostname (bool): Configure device hostname (default: True)\n\n\nExample\n-------\nconfigure_management:\n vrf: Mgmt-vrf\n\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "ConfigureManagement", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L2846" - } + "doc": "This stage configures the management IP settings on the device.\n\nStage Schema\n------------\nconfigure_management:\n\n address ('dict', optional): Address(es) to configure on the device (syntax: address/mask) (optional)\n ipv4 ('str') or ('list'): ipv4 address\n ipv6 ('str') or ('list'): ipv6 address\n\n gateway: (dict, optional) Gateway address(es) for default route\n ipv4 ('str') or ('list'): ipv4 gateway address\n ipv6 ('str') or ('list'): ipv6 gateway address\n\n vrf (str, optional): VRF to use for management interface\n\n interface (str, optional): Management interface to use\n\n routes ('dict', optional):\n ipv4 (list of 'dict'): ipv4 routes\n - subnet: (str) subnet including mask\n next_hop: (str) next_hop for this subnet\n ipv6 (list of 'dict'): ipv6 routes\n - subnet: (str) subnet including mask\n next_hop: (str) next_hop for this subnet\n\n dhcp_timeout ('int', optional): DHCP timeout in seconds (default: 30)\n\n protocols ('list', optional): [list of protocols]\n\n set_hostname (bool): Configure device hostname (default: True)\n\n\nExample\n-------\nconfigure_management:\n vrf: Mgmt-vrf\n\n", + "folders": {}, + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "ConfigureManagement", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L2846" }, "ConfigureReplace": { - "iosxe": { - "doc": "This stage does a configure replace on the device.", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "ConfigureReplace", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L1990" + "folders": { + "iosxe": { + "doc": "This stage does a configure replace on the device.", + "module_name": "stages.iosxe.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "iosxe" + }, + "uid": "ConfigureReplace", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L2002" + } } }, "ConfigureRrmDcaChannel": { - "iosxe": { - "c9800": { - "doc": " This stage removes the specified channels from the controller.\n\n Stage Schema\n ------------\n configure_rrm_dca_channel:\n N/A\n\n ", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "ConfigureRrmDcaChannel", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/stages.py#L149" + "folders": { + "iosxe": { + "folders": { + "cat9k": { + "folders": { + "c9800": { + "doc": " This stage removes the specified channels from the controller.\n\n Stage Schema\n ------------\n configure_rrm_dca_channel:\n N/A\n\n ", + "module_name": "stages.iosxe.cat9k.c9800.stages", + "package": "genie.libs.clean", + "tokens": { + "model": "c9800", + "platform": "cat9k" + }, + "uid": "ConfigureRrmDcaChannel", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800/stages.py#L149" + } + }, + "tokens": { + "platform": "cat9k" + } + } + }, + "tokens": { + "os": "iosxe" + } } } }, "Connect": { - "com": { - "doc": "This stage connects to the device that is being cleaned.\n\nStage Schema\n------------\nconnect:\n\n via (str, optional): Which connection to use from the testbed file. Uses the\n default connection if not specified.\n\n timeout (int, optional): The timeout for the connection to complete in seconds.\n Defaults to 200.\n\n retry_timeout (int, optional): Overall timeout for retry mechanism in seconds.\n Defaults to 0 which means no retry.\n\n retry_interval (int, optional): Interval for retry mechanism in seconds. Defaults\n to 0 which means no retry.\n\nExample\n-------\nconnect:\n timeout: 60\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "Connect", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L33" - }, - "iosxe": { - "doc": "This stage connects to the device that is being cleaned.\nStage Schema\n------------\nconnect:\n via (str, optional): Which connection to use from the testbed file. Uses the\n default connection if not specified.\n alias (str, optional): Which connection alias to use from the testbed file.\n timeout (int, optional): The timeout for the connection to complete in seconds.\n Defaults to 200.\n retry_timeout (int, optional): Overall timeout for retry mechanism in seconds.\n Defaults to 0 which means no retry.\n retry_interval (int, optional): Interval for retry mechanism in seconds. Defaults\n to 0 which means no retry.\nExample\n-------\nconnect:\n timeout: 60\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "sdwan": { - "doc": "This stage connects to the device that is being cleaned.\n\nStage Schema\n------------\nconnect:\n\n via (str, optional): Which connection to use from the testbed file. Uses the\n default connection if not specified.\n\n timeout (int, optional): The timeout for the connection to complete in seconds.\n Defaults to 200.\n\n retry_timeout (int, optional): Overall timeout for retry mechanism in seconds.\n Defaults to 0 which means no retry.\n\n retry_interval (int, optional): Interval for retry mechanism in seconds. Defaults\n to 0 which means no retry.\n\nExample\n-------\nconnect:\n timeout: 60\n", - "module_name": "stages.stages", + "doc": "This stage connects to the device that is being cleaned.\n\nStage Schema\n------------\nconnect:\n\n via (str, optional): Which connection to use from the testbed file. Uses the\n default connection if not specified.\n\n timeout (int, optional): The timeout for the connection to complete in seconds.\n Defaults to 200.\n\n retry_timeout (int, optional): Overall timeout for retry mechanism in seconds.\n Defaults to 0 which means no retry.\n\n retry_interval (int, optional): Interval for retry mechanism in seconds. Defaults\n to 0 which means no retry.\n\nExample\n-------\nconnect:\n timeout: 60\n", + "folders": { + "iosxe": { + "doc": "This stage connects to the device that is being cleaned.\nStage Schema\n------------\nconnect:\n via (str, optional): Which connection to use from the testbed file. Uses the\n default connection if not specified.\n alias (str, optional): Which connection alias to use from the testbed file.\n timeout (int, optional): The timeout for the connection to complete in seconds.\n Defaults to 200.\n retry_timeout (int, optional): Overall timeout for retry mechanism in seconds.\n Defaults to 0 which means no retry.\n retry_interval (int, optional): Interval for retry mechanism in seconds. Defaults\n to 0 which means no retry.\nExample\n-------\nconnect:\n timeout: 60\n", + "folders": { + "sdwan": { + "doc": "This stage connects to the device that is being cleaned.\n\nStage Schema\n------------\nconnect:\n\n via (str, optional): Which connection to use from the testbed file. Uses the\n default connection if not specified.\n\n timeout (int, optional): The timeout for the connection to complete in seconds.\n Defaults to 200.\n\n retry_timeout (int, optional): Overall timeout for retry mechanism in seconds.\n Defaults to 0 which means no retry.\n\n retry_interval (int, optional): Interval for retry mechanism in seconds. Defaults\n to 0 which means no retry.\n\nExample\n-------\nconnect:\n timeout: 60\n", + "module_name": "stages.iosxe.sdwan.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "sdwan" + }, + "uid": "Connect", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/stages.py#L31" + } + }, + "module_name": "stages.iosxe.stages", "package": "genie.libs.clean", + "tokens": { + "os": "iosxe" + }, "uid": "Connect", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/stages.py#L31" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L2058" }, - "uid": "Connect", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L2046" - }, - "linux": { - "wsim": { - "doc": "This stage connects to the device that is being cleaned.\nStage Schema\n------------\nconnect:\n via (str, optional): Which connection to use from the testbed file. Uses the\n default connection if not specified.\n timeout (int, optional): The timeout for the connection to complete in seconds.\n Defaults to 200.\n retry_timeout (int, optional): Overall timeout for retry mechanism in seconds.\n Defaults to 0 which means no retry.\n retry_interval (int, optional): Interval for retry mechanism in seconds. Defaults\n to 0 which means no retry.\nExample\n-------\nconnect:\n timeout: 60\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "Connect", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/linux/wsim/stages.py#L19" + "linux": { + "folders": { + "wsim": { + "doc": "This stage connects to the device that is being cleaned.\nStage Schema\n------------\nconnect:\n via (str, optional): Which connection to use from the testbed file. Uses the\n default connection if not specified.\n timeout (int, optional): The timeout for the connection to complete in seconds.\n Defaults to 200.\n retry_timeout (int, optional): Overall timeout for retry mechanism in seconds.\n Defaults to 0 which means no retry.\n retry_interval (int, optional): Interval for retry mechanism in seconds. Defaults\n to 0 which means no retry.\nExample\n-------\nconnect:\n timeout: 60\n", + "module_name": "stages.linux.wsim.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "wsim" + }, + "uid": "Connect", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/linux/wsim/stages.py#L19" + } + }, + "tokens": { + "origin": "linux" + } } - } + }, + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "Connect", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L33" }, "CopyRunToFlash": { - "com": { - "doc": "This stage will copy running-configuration to device flash.\n\nStage Schema\n------------\ncopy_run_to_flash:\n\n file_name (str): Name of the file to be saved to flash.\n timeout (int, optional): Copy operation timeout in seconds. Defaults to 300.\n overwrite (bool, optional): Overwrite the file if a file with the same name already exists. Defaults to True.\n\nExample\n-------\ncopy_run_to_flash:\n file_name: base.cfg\n timeout: 300\n overwrite: True\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "CopyRunToFlash", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L2796" - } + "doc": "This stage will copy running-configuration to device flash.\n\nStage Schema\n------------\ncopy_run_to_flash:\n\n file_name (str): Name of the file to be saved to flash.\n timeout (int, optional): Copy operation timeout in seconds. Defaults to 300.\n overwrite (bool, optional): Overwrite the file if a file with the same name already exists. Defaults to True.\n\nExample\n-------\ncopy_run_to_flash:\n file_name: base.cfg\n timeout: 300\n overwrite: True\n", + "folders": {}, + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "CopyRunToFlash", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L2796" }, "CopyToDevice": { - "apic": { - "doc": "This stage will copy an image to a device from a networked location.\n\nStage Schema\n------------\ncopy_to_device:\n\n origin:\n files (list): Image files location on the server.\n\n hostname (str): Hostname or address of the server.\n\n destination:\n\n directory (str): Location on the device to copy images.\n\n protocol (str): Protocol used for copy operation.\n\n verify_num_images (bool, optional): Verify number of images provided by\n user for clean is correct. Defaults to True.\n\n expected_num_images (int, optional): Number of images expected to be\n provided by user for clean. Defaults to 1.\n\n vrf (str, optional): Vrf used to copy. Defaults to an empty string.\n\n timeout (int, optional): Copy operation timeout in seconds. Defaults to 300.\n\n compact (bool, optional): Compact copy mode if supported by the device.\n Defaults to False.\n\n protected_files (list, optional): File patterns that should not be deleted.\n Defaults to None.\n\n overwrite (bool, optional): Overwrite the file if a file with the same\n name already exists. Defaults to False.\n\n skip_deletion (bool, optional): Do not delete any files even if there isn't\n any space on device. Defaults to False.\n\n copy_attempts (int, optional): Number of times to attempt copying image\n files. Defaults to 1 (no retry).\n\n copy_attempts_sleep (int, optional): Number of seconds to sleep between\n copy_attempts. Defaults to 30.\n\n check_file_stability (bool, optional): Verifies that the file size is not\n changing. This ensures the image is not actively being copied.\n Defaults to False.\n\n stability_check_tries (int, optional): Max number of checks that can be\n done when checking file stability. Defaults to 3.\n\n stability_check_delay (int, optional): Delay between tries when checking\n file stability in seconds. Defaults to 2.\n\n min_free_space_percent (int, optional) : Percentage of total disk space\n that must be free. If specified the percentage is not free then the\n stage will attempt to delete unprotected files to reach the minimum\n percentage. Defaults to None.\n\n use_kstack (bool, optional): Use faster version of copy with limited options.\n Defaults to False.\n\nExample\n-------\ncopy_to_device:\n origin:\n hostname: server-1\n files:\n - /home/cisco/asr1k.bin\n destination:\n directory: harddisk:/\n protocol: sftp\n timeout: 300\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "CopyToDevice", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/apic/stages.py#L519" - }, - "com": { - "doc": "This stage will copy an image to a device from a networked location.\n\nStage Schema\n------------\ncopy_to_device:\n\n origin:\n\n files (list): Image files location on the server.\n\n hostname (str): Hostname or address of the server.\n\n destination:\n\n directory (str): Directory on the device to copy the images to.\n\n standby_directory (str, optional): Standby directory on the device\n to copy the images to. Defaults to None.\n\n protocol (str): Protocol used for copy operation.\n\n connection_alias (str): Connection alias to use\n\n verify_num_images (bool, optional): Verify number of images provided by\n user for clean is correct. Defaults to True.\n\n expected_num_images (int, optional): Number of images expected to be\n provided by user for clean. Defaults to 1.\n\n vrf (str, optional): Vrf used to copy. Defaults to an empty string.\n\n timeout (int, optional): Copy operation timeout in seconds. Defaults to 300.\n\n compact (bool, optional): Compact copy mode if supported by the device.\n Defaults to False.\n\n protected_files (list, optional): File patterns that should not be deleted.\n Defaults to None.\n\n overwrite (bool, optional): Overwrite the file if a file with the same\n name already exists. Defaults to False.\n\n skip_deletion (bool, optional): Do not delete any files even if there isn't\n any space on device. Defaults to False.\n\n copy_attempts (int, optional): Number of times to attempt copying image\n files. Defaults to 1 (no retry).\n\n copy_attempts_sleep (int, optional): Number of seconds to sleep between\n copy_attempts. Defaults to 30.\n\n check_file_stability (bool, optional): Verifies that the file size is not\n changing. This ensures the image is not actively being copied.\n Defaults to False.\n\n stability_check_tries (int, optional): Max number of checks that can be\n done when checking file stability. Defaults to 3.\n\n stability_check_delay (int, optional): Delay between tries when checking\n file stability in seconds. Defaults to 2.\n\n min_free_space_percent ('int', optional) : Percentage of total disk space\n that must be free. If specified the percentage is not free then the\n stage will attempt to delete unprotected files to reach the minimum\n percentage. Defaults to None.\n\n use_kstack (bool, optional): Use faster version of copy with limited options.\n Defaults to False.\n\n interface (str, optional): The interface to use for file transfers, may be needed\n for copying files on some IOSXE platforms, such as ASR1K when using a VRF\n Defaults to None\n\n unique_file_name (bool, optional): Appends a random six-digit number to\n the end of the image name. Defaults to False.\n\n unique_number: (int, optional): Appends the provided number to the end of\n the image name. Defaults to None. Requires unique_file_name is True\n to be applied.\n\n rename_images: (str, optional): Rename the image to the provided name.\n If multiple files exist then an incrementing number is also appended.\n Defaults to None\n\n prompt_recovery(bool, optional): Enable the prompt recovery when the execution\n command timeout. Defaults to False.\n\nExample\n-------\ncopy_to_device:\n origin:\n hostname: server-1\n files:\n - /home/cisco/asr1k.bin\n destination:\n directory: harddisk:/\n protocol: sftp\n timeout: 300\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "CopyToDevice", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L721" + "doc": "This stage will copy an image to a device from a networked location.\n\nStage Schema\n------------\ncopy_to_device:\n\n origin:\n\n files (list): Image files location on the server.\n\n hostname (str): Hostname or address of the server.\n\n destination:\n\n directory (str): Directory on the device to copy the images to.\n\n standby_directory (str, optional): Standby directory on the device\n to copy the images to. Defaults to None.\n\n protocol (str): Protocol used for copy operation.\n\n connection_alias (str): Connection alias to use\n\n verify_num_images (bool, optional): Verify number of images provided by\n user for clean is correct. Defaults to True.\n\n expected_num_images (int, optional): Number of images expected to be\n provided by user for clean. Defaults to 1.\n\n vrf (str, optional): Vrf used to copy. Defaults to an empty string.\n\n timeout (int, optional): Copy operation timeout in seconds. Defaults to 300.\n\n compact (bool, optional): Compact copy mode if supported by the device.\n Defaults to False.\n\n protected_files (list, optional): File patterns that should not be deleted.\n Defaults to None.\n\n overwrite (bool, optional): Overwrite the file if a file with the same\n name already exists. Defaults to False.\n\n skip_deletion (bool, optional): Do not delete any files even if there isn't\n any space on device. Defaults to False.\n\n copy_attempts (int, optional): Number of times to attempt copying image\n files. Defaults to 1 (no retry).\n\n copy_attempts_sleep (int, optional): Number of seconds to sleep between\n copy_attempts. Defaults to 30.\n\n check_file_stability (bool, optional): Verifies that the file size is not\n changing. This ensures the image is not actively being copied.\n Defaults to False.\n\n stability_check_tries (int, optional): Max number of checks that can be\n done when checking file stability. Defaults to 3.\n\n stability_check_delay (int, optional): Delay between tries when checking\n file stability in seconds. Defaults to 2.\n\n min_free_space_percent ('int', optional) : Percentage of total disk space\n that must be free. If specified the percentage is not free then the\n stage will attempt to delete unprotected files to reach the minimum\n percentage. Defaults to None.\n\n use_kstack (bool, optional): Use faster version of copy with limited options.\n Defaults to False.\n\n interface (str, optional): The interface to use for file transfers, may be needed\n for copying files on some IOSXE platforms, such as ASR1K when using a VRF\n Defaults to None\n\n unique_file_name (bool, optional): Appends a random six-digit number to\n the end of the image name. Defaults to False.\n\n unique_number: (int, optional): Appends the provided number to the end of\n the image name. Defaults to None. Requires unique_file_name is True\n to be applied.\n\n rename_images: (str, optional): Rename the image to the provided name.\n If multiple files exist then an incrementing number is also appended.\n Defaults to None\n\n prompt_recovery(bool, optional): Enable the prompt recovery when the execution\n command timeout. Defaults to False.\n\nExample\n-------\ncopy_to_device:\n origin:\n hostname: server-1\n files:\n - /home/cisco/asr1k.bin\n destination:\n directory: harddisk:/\n protocol: sftp\n timeout: 300\n", + "folders": { + "apic": { + "doc": "This stage will copy an image to a device from a networked location.\n\nStage Schema\n------------\ncopy_to_device:\n\n origin:\n files (list): Image files location on the server.\n\n hostname (str): Hostname or address of the server.\n\n destination:\n\n directory (str): Location on the device to copy images.\n\n protocol (str): Protocol used for copy operation.\n\n verify_num_images (bool, optional): Verify number of images provided by\n user for clean is correct. Defaults to True.\n\n expected_num_images (int, optional): Number of images expected to be\n provided by user for clean. Defaults to 1.\n\n vrf (str, optional): Vrf used to copy. Defaults to an empty string.\n\n timeout (int, optional): Copy operation timeout in seconds. Defaults to 300.\n\n compact (bool, optional): Compact copy mode if supported by the device.\n Defaults to False.\n\n protected_files (list, optional): File patterns that should not be deleted.\n Defaults to None.\n\n overwrite (bool, optional): Overwrite the file if a file with the same\n name already exists. Defaults to False.\n\n skip_deletion (bool, optional): Do not delete any files even if there isn't\n any space on device. Defaults to False.\n\n copy_attempts (int, optional): Number of times to attempt copying image\n files. Defaults to 1 (no retry).\n\n copy_attempts_sleep (int, optional): Number of seconds to sleep between\n copy_attempts. Defaults to 30.\n\n check_file_stability (bool, optional): Verifies that the file size is not\n changing. This ensures the image is not actively being copied.\n Defaults to False.\n\n stability_check_tries (int, optional): Max number of checks that can be\n done when checking file stability. Defaults to 3.\n\n stability_check_delay (int, optional): Delay between tries when checking\n file stability in seconds. Defaults to 2.\n\n min_free_space_percent (int, optional) : Percentage of total disk space\n that must be free. If specified the percentage is not free then the\n stage will attempt to delete unprotected files to reach the minimum\n percentage. Defaults to None.\n\n use_kstack (bool, optional): Use faster version of copy with limited options.\n Defaults to False.\n\nExample\n-------\ncopy_to_device:\n origin:\n hostname: server-1\n files:\n - /home/cisco/asr1k.bin\n destination:\n directory: harddisk:/\n protocol: sftp\n timeout: 300\n", + "module_name": "stages.apic.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "apic" + }, + "uid": "CopyToDevice", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/apic/stages.py#L519" + }, + "iosxe": { + "doc": "This stage will copy an image to a device from a networked location.\n\nStage Schema\n------------\ncopy_to_device:\n\n origin:\n\n files (list): Image files location on the server.\n\n hostname (str): Hostname or address of the server.\n\n destination:\n\n directory (str): Directory on the device to copy the images to.\n\n standby_directory (str, optional): Standby directory on the device\n to copy the images to. Defaults to None.\n\n protocol (str): Protocol used for copy operation.\n\n connection_alias (str): Connection alias to use\n\n verify_num_images (bool, optional): Verify number of images provided by\n user for clean is correct. Defaults to True.\n\n verify_running_image (bool, optional): Compare the image filename with the running\n image version on device. If a match is found, the copy stage will be skipped.\n Defaults to True.\n\n expected_num_images (int, optional): Number of images expected to be\n provided by user for clean. Defaults to 1.\n\n vrf (str, optional): Vrf used to copy. Defaults to an empty string.\n\n timeout (int, optional): Copy operation timeout in seconds. Defaults to 300.\n\n compact (bool, optional): Compact copy mode if supported by the device.\n Defaults to False.\n\n protected_files (list, optional): File patterns that should not be deleted.\n Defaults to None.\n\n overwrite (bool, optional): Overwrite the file if a file with the same\n name already exists. Defaults to False.\n\n skip_deletion (bool, optional): Do not delete any files even if there isn't\n any space on device. Defaults to False.\n\n copy_attempts (int, optional): Number of times to attempt copying image\n files. Defaults to 1 (no retry).\n\n copy_attempts_sleep (int, optional): Number of seconds to sleep between\n copy_attempts. Defaults to 30.\n\n check_file_stability (bool, optional): Verifies that the file size is not\n changing. This ensures the image is not actively being copied.\n Defaults to False.\n\n stability_check_tries (int, optional): Max number of checks that can be\n done when checking file stability. Defaults to 3.\n\n stability_check_delay (int, optional): Delay between tries when checking\n file stability in seconds. Defaults to 2.\n\n min_free_space_percent ('int', optional) : Percentage of total disk space\n that must be free. If specified the percentage is not free then the\n stage will attempt to delete unprotected files to reach the minimum\n percentage. Defaults to None.\n\n use_kstack (bool, optional): Use faster version of copy with limited options.\n Defaults to False.\n\n interface (str, optional): The interface to use for file transfers, may be needed\n for copying files on some IOSXE platforms, such as ASR1K when using a VRF\n Defaults to None\n\n unique_file_name (bool, optional): Appends a random six-digit number to\n the end of the image name. Defaults to False.\n\n unique_number: (int, optional): Appends the provided number to the end of\n the image name. Defaults to None. Requires unique_file_name is True\n to be applied.\n\n rename_images: (str, optional): Rename the image to the provided name.\n If multiple files exist then an incrementing number is also appended.\n Defaults to None\n\n prompt_recovery(bool, optional): Enable the prompt recovery when the execution\n command timeout. Defaults to False.\n\nExample\n-------\ncopy_to_device:\n origin:\n hostname: server-1\n files:\n - /home/cisco/asr1k.bin\n destination:\n directory: harddisk:/\n protocol: sftp\n timeout: 300\n", + "module_name": "stages.iosxe.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "iosxe" + }, + "uid": "CopyToDevice", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L1360" + } }, - "iosxe": { - "doc": "This stage will copy an image to a device from a networked location.\n\nStage Schema\n------------\ncopy_to_device:\n\n origin:\n\n files (list): Image files location on the server.\n\n hostname (str): Hostname or address of the server.\n\n destination:\n\n directory (str): Directory on the device to copy the images to.\n\n standby_directory (str, optional): Standby directory on the device\n to copy the images to. Defaults to None.\n\n protocol (str): Protocol used for copy operation.\n\n connection_alias (str): Connection alias to use\n\n verify_num_images (bool, optional): Verify number of images provided by\n user for clean is correct. Defaults to True.\n\n verify_running_image (bool, optional): Compare the image filename with the running\n image version on device. If a match is found, the copy stage will be skipped.\n Defaults to True.\n\n expected_num_images (int, optional): Number of images expected to be\n provided by user for clean. Defaults to 1.\n\n vrf (str, optional): Vrf used to copy. Defaults to an empty string.\n\n timeout (int, optional): Copy operation timeout in seconds. Defaults to 300.\n\n compact (bool, optional): Compact copy mode if supported by the device.\n Defaults to False.\n\n protected_files (list, optional): File patterns that should not be deleted.\n Defaults to None.\n\n overwrite (bool, optional): Overwrite the file if a file with the same\n name already exists. Defaults to False.\n\n skip_deletion (bool, optional): Do not delete any files even if there isn't\n any space on device. Defaults to False.\n\n copy_attempts (int, optional): Number of times to attempt copying image\n files. Defaults to 1 (no retry).\n\n copy_attempts_sleep (int, optional): Number of seconds to sleep between\n copy_attempts. Defaults to 30.\n\n check_file_stability (bool, optional): Verifies that the file size is not\n changing. This ensures the image is not actively being copied.\n Defaults to False.\n\n stability_check_tries (int, optional): Max number of checks that can be\n done when checking file stability. Defaults to 3.\n\n stability_check_delay (int, optional): Delay between tries when checking\n file stability in seconds. Defaults to 2.\n\n min_free_space_percent ('int', optional) : Percentage of total disk space\n that must be free. If specified the percentage is not free then the\n stage will attempt to delete unprotected files to reach the minimum\n percentage. Defaults to None.\n\n use_kstack (bool, optional): Use faster version of copy with limited options.\n Defaults to False.\n\n interface (str, optional): The interface to use for file transfers, may be needed\n for copying files on some IOSXE platforms, such as ASR1K when using a VRF\n Defaults to None\n\n unique_file_name (bool, optional): Appends a random six-digit number to\n the end of the image name. Defaults to False.\n\n unique_number: (int, optional): Appends the provided number to the end of\n the image name. Defaults to None. Requires unique_file_name is True\n to be applied.\n\n rename_images: (str, optional): Rename the image to the provided name.\n If multiple files exist then an incrementing number is also appended.\n Defaults to None\n\n prompt_recovery(bool, optional): Enable the prompt recovery when the execution\n command timeout. Defaults to False.\n\nExample\n-------\ncopy_to_device:\n origin:\n hostname: server-1\n files:\n - /home/cisco/asr1k.bin\n destination:\n directory: harddisk:/\n protocol: sftp\n timeout: 300\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "CopyToDevice", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L1356" - } + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "CopyToDevice", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L721" }, "CopyToLinux": { - "com": { - "doc": "This stage copies an image to a location on a linux device. It can keep\nthe original name or modify the name as required.\n\nStage Schema\n------------\ncopy_to_linux:\n\n origin:\n\n files (list): Location of file on the origin server.\n\n hostname (str, optional): Hostname or address of the origin server.\n If not provided the file is treated as a local file on the\n execution host.\n\n destination:\n\n directory (str): Directory that the file will be copied to.\n\n hostname (str, optional): Hostname or address of the origi server.\n If not provided the directory is treated as a local directory on the\n execution host. This key is only optional if the hostname under\n origin is not provided.\n\n protocol (str, optional): Protocol used for the copy operation. Defaults to\n sftp.\n\n overwrite (bool, optional): Overwrite the file if a file with the same\n name already exists. Defaults to False.\n\n timeout (int, optional): Copy operation timeout in seconds. Defaults to 300.\n\n check_image_length (bool, optional): Check if the length of the image name\n exceeds the image_length_limit. Defaults to False.\n\n image_length_limit (int, optional): Maximum length of the image name.\n Defaults to 63.\n\n append_hostname (bool, optional): Append hostname to the end of the image\n name during copy. Defaults to False.\n\n copy_attempts (int, optional): Number of times to attempt copying image\n files. Defaults to 1 (no retry).\n\n copy_attempts_sleep (int, optional): Number of seconds to sleep between\n copy_attempts. Defaults to 30.\n\n check_file_stability (bool, optional): Verifies that the file size is not\n changing. This ensures the image is not actively being copied.\n Defaults to False.\n\n unique_file_name (bool, optional): Appends a random six-digit number to\n the end of the image name. Defaults to False.\n\n unique_number: (int, optional): Appends the provided number to the end of\n the image name. Defaults to None.\n\n rename_images: (str, optional): Rename the image to the provided name.\n If multiple files exist then an incrementing number is also appended.\n Defaults to None\n\nExample\n-------\ncopy_to_linux:\n protocol: sftp\n origin:\n hostname: server-1\n files:\n - /home/cisco/kickstart.bin\n - /home/cisco/system.bin\n timeout: 300\n destination:\n hostname: file-server\n directory: /auto/tftp-ssr/\n copy_attempts: 2\n check_file_stability: True\n unique_file_name: True\n\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "CopyToLinux", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L279" - } + "doc": "This stage copies an image to a location on a linux device. It can keep\nthe original name or modify the name as required.\n\nStage Schema\n------------\ncopy_to_linux:\n\n origin:\n\n files (list): Location of file on the origin server.\n\n hostname (str, optional): Hostname or address of the origin server.\n If not provided the file is treated as a local file on the\n execution host.\n\n destination:\n\n directory (str): Directory that the file will be copied to.\n\n hostname (str, optional): Hostname or address of the origi server.\n If not provided the directory is treated as a local directory on the\n execution host. This key is only optional if the hostname under\n origin is not provided.\n\n protocol (str, optional): Protocol used for the copy operation. Defaults to\n sftp.\n\n overwrite (bool, optional): Overwrite the file if a file with the same\n name already exists. Defaults to False.\n\n timeout (int, optional): Copy operation timeout in seconds. Defaults to 300.\n\n check_image_length (bool, optional): Check if the length of the image name\n exceeds the image_length_limit. Defaults to False.\n\n image_length_limit (int, optional): Maximum length of the image name.\n Defaults to 63.\n\n append_hostname (bool, optional): Append hostname to the end of the image\n name during copy. Defaults to False.\n\n copy_attempts (int, optional): Number of times to attempt copying image\n files. Defaults to 1 (no retry).\n\n copy_attempts_sleep (int, optional): Number of seconds to sleep between\n copy_attempts. Defaults to 30.\n\n check_file_stability (bool, optional): Verifies that the file size is not\n changing. This ensures the image is not actively being copied.\n Defaults to False.\n\n unique_file_name (bool, optional): Appends a random six-digit number to\n the end of the image name. Defaults to False.\n\n unique_number: (int, optional): Appends the provided number to the end of\n the image name. Defaults to None.\n\n rename_images: (str, optional): Rename the image to the provided name.\n If multiple files exist then an incrementing number is also appended.\n Defaults to None\n\nExample\n-------\ncopy_to_linux:\n protocol: sftp\n origin:\n hostname: server-1\n files:\n - /home/cisco/kickstart.bin\n - /home/cisco/system.bin\n timeout: 300\n destination:\n hostname: file-server\n directory: /auto/tftp-ssr/\n copy_attempts: 2\n check_file_stability: True\n unique_file_name: True\n\n", + "folders": {}, + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "CopyToLinux", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L279" }, "DeleteBackupFromDevice": { - "com": { - "doc": "This stage removes a backed up file from the device. It can optionally\nreplace the original file with the one that was backed up.\n\nStage Schema\n------------\ndelete_backup_from_device:\n\n delete_dir (str): Directory containing file to be deleted\n\n delete_dir_stby (str, optional): For high availability devices, the directory\n containing file to be deleted on standby. Defaults to None.\n\n delete_file (str): File to be deleted\n\n restore_from_backup (bool, optional): Restore the file from backup file.\n Defaults to False.\n\n overwrite (bool, optional): When creating the backup, overwrite the file\n if one with the same name already exists. Defaults to True.\n\n timeout (int, optional): Timeout in seconds for copying. Defaults to 300.\n\nExample\n-------\ndelete_backup_from_device:\n delete_dir: 'bootflash:'\n delete_dir_stby: 'bootflash-stby:'\n delete_file: ISSUCleanGolden.cfg_backup\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "DeleteBackupFromDevice", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L2032" - } + "doc": "This stage removes a backed up file from the device. It can optionally\nreplace the original file with the one that was backed up.\n\nStage Schema\n------------\ndelete_backup_from_device:\n\n delete_dir (str): Directory containing file to be deleted\n\n delete_dir_stby (str, optional): For high availability devices, the directory\n containing file to be deleted on standby. Defaults to None.\n\n delete_file (str): File to be deleted\n\n restore_from_backup (bool, optional): Restore the file from backup file.\n Defaults to False.\n\n overwrite (bool, optional): When creating the backup, overwrite the file\n if one with the same name already exists. Defaults to True.\n\n timeout (int, optional): Timeout in seconds for copying. Defaults to 300.\n\nExample\n-------\ndelete_backup_from_device:\n delete_dir: 'bootflash:'\n delete_dir_stby: 'bootflash-stby:'\n delete_file: ISSUCleanGolden.cfg_backup\n", + "folders": {}, + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "DeleteBackupFromDevice", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L2032" }, "DeleteFiles": { - "com": { - "doc": "Delete files from the device.\n\nUses the `delete_files` device API.\n\nStage Schema\n------------\ndelete_files:\n\n files (list): List of files including location.\n\n regex (bool, optional): If regex is used in the file names, set to True. Default False.\n\nExample\n-------\ndelete_files:\n - flash:core/*.gz\n - crashinfo/*.tar.gz\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "DeleteFiles", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L2255" - } + "doc": "Delete files from the device.\n\nUses the `delete_files` device API.\n\nStage Schema\n------------\ndelete_files:\n\n files (list): List of files including location.\n\n regex (bool, optional): If regex is used in the file names, set to True. Default False.\n\nExample\n-------\ndelete_files:\n - flash:core/*.gz\n - crashinfo/*.tar.gz\n", + "folders": {}, + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "DeleteFiles", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L2255" }, "DeleteFilesFromServer": { - "com": { - "doc": "This stage deletes files from a server.\n\nStage Schema\n------------\ndelete_files_from_server:\n\n server (str, optional): Hostname or address of the server. If not provided,\n uses the same server from copy_to_linux (if applicable).\n\n files (list, optional): List of files to delete. If not provided, uses the\n same files from copy_to_linux (if applicable).\n\n protocol (str, optional): Protocol used for deletion. Only ftp or sftp is\n supported. Defaults to sftp.\n\nExample\n-------\ndelete_files_from_server:\n server: 1.1.1.1\n files:\n - /home/cisco/kickstart.bin\n protocol: sftp\n\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "DeleteFilesFromServer", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L2156" - } + "doc": "This stage deletes files from a server.\n\nStage Schema\n------------\ndelete_files_from_server:\n\n server (str, optional): Hostname or address of the server. If not provided,\n uses the same server from copy_to_linux (if applicable).\n\n files (list, optional): List of files to delete. If not provided, uses the\n same files from copy_to_linux (if applicable).\n\n protocol (str, optional): Protocol used for deletion. Only ftp or sftp is\n supported. Defaults to sftp.\n\nExample\n-------\ndelete_files_from_server:\n server: 1.1.1.1\n files:\n - /home/cisco/kickstart.bin\n protocol: sftp\n\n", + "folders": {}, + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "DeleteFilesFromServer", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L2156" }, "EraseApConfiguration": { - "cheetah": { - "ap": { - "doc": "This stage erases the AP configuration\n\n Stage Schema\n ------------\n erase_ap_configuration:\n login_credentials_alias (str): Alias of login credentials to use after write erase which will be mentioned in TB yaml\n\n max_time (int, optional): Maximum time for which this clean stage will try to associate Ap to controller.\n Defaults to 900\n\n check_interval (int, optional): Interval for retry mechanism in seconds. Defaults to 30\n\n\n Example\n -------\n erase_ap_configuration:\n login_credentials_alias: \"erase\"\n max_time: \"600\"\n ", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "EraseApConfiguration", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/cheetah/ap/stages.py#L122" + "folders": { + "cheetah": { + "folders": { + "ap": { + "doc": "This stage erases the AP configuration\n\n Stage Schema\n ------------\n erase_ap_configuration:\n login_credentials_alias (str): Alias of login credentials to use after write erase which will be mentioned in TB yaml\n\n max_time (int, optional): Maximum time for which this clean stage will try to associate Ap to controller.\n Defaults to 900\n\n check_interval (int, optional): Interval for retry mechanism in seconds. Defaults to 30\n\n\n Example\n -------\n erase_ap_configuration:\n login_credentials_alias: \"erase\"\n max_time: \"600\"\n ", + "module_name": "stages.cheetah.ap.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "ap" + }, + "uid": "EraseApConfiguration", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/cheetah/ap/stages.py#L122" + } + }, + "tokens": { + "os": "cheetah" + } } } }, "ExecuteCommand": { - "com": { - "doc": "Executing commands on the device.\n\nStage Schema\n------------\nexecute_command:\n\n commands (list): List of commands to execute.\n\n execute_timeout (int, optional): Max time in seconds allowed for executing the\n command. Defaults to 60.\n\n sleep_time(int,optional): Time in seconds to sleep after running each command.\n\nExample\n-------\nexecute_command:\n commands:\n - show version\n - show boot\n execute_timeout: 60\n sleep_time: 10\n\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "ExecuteCommand", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L1546" - } + "doc": "Executing commands on the device.\n\nStage Schema\n------------\nexecute_command:\n\n commands (list): List of commands to execute.\n\n execute_timeout (int, optional): Max time in seconds allowed for executing the\n command. Defaults to 60.\n\n sleep_time(int,optional): Time in seconds to sleep after running each command.\n\nExample\n-------\nexecute_command:\n commands:\n - show version\n - show boot\n execute_timeout: 60\n sleep_time: 10\n\n", + "folders": {}, + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "ExecuteCommand", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L1546" }, "ExpandImage": { - "iosxe": { - "sdwan": { - "doc": "Clear up old packages and expand image\n\nStage Schema\n------------\nexpand_image:\n\n image (list, optional): Image to boot with\n\nExample\n-------\nexpand_image:\n image:\n - bootflash:stay-isr-image.bin\n timeout: 120\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "ExpandImage", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/stages.py#L691" + "folders": { + "iosxe": { + "folders": { + "sdwan": { + "doc": "Clear up old packages and expand image\n\nStage Schema\n------------\nexpand_image:\n\n image (list, optional): Image to boot with\n\nExample\n-------\nexpand_image:\n image:\n - bootflash:stay-isr-image.bin\n timeout: 120\n", + "module_name": "stages.iosxe.sdwan.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "sdwan" + }, + "uid": "ExpandImage", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/stages.py#L687" + } + }, + "tokens": { + "os": "iosxe" + } } } }, "FabricClean": { - "apic": { - "doc": "This stage will clean APIC controllers.\n\nThe stage will execute 'acidiag touch clean' and then reload the controller.\n\nStage Schema\n------------\nfabric_clean:\n\n cleaning_timeout (int, optional): Max time for cleaning scripts to execute.\n Defaults to 90.\n\n reload_timeout (int, optional): Max time for reload. Defaults to 800.\n\n sleep_after_reload (int, optional): Time in seconds to sleep after the\n device completes reloading. Defaults to 60.\n\nExample\n-------\nfabric_clean:\n cleaning_timeout: 90\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "FabricClean", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/apic/stages.py#L340" - }, - "nxos": { - "aci": { - "doc": "This stage will clean NXOS ACI nodes.\n\nThe stage will execute the following commands, where \nis the currently running image if it exists, or the image copied to the\ndevice (if applicable)::\n - '/bin/setup-clean-config.sh'\n - '/bin/setup-bootvars.sh '\n\nFinally the stage will reload the node.\n\nStage Schema\n------------\nfabric_clean:\n\n cleaning_timeout (int, optional): Max time for cleaning scripts to execute.\n Defaults to 90.\n\n reload_timeout (int, optional): Max time for reload. Defaults to 800.\n\n sleep_after_reload (int, optional): Time in seconds to sleep after the\n device completes reloading. Defaults to 60.\n\n copy_boot_image (dict, optional):\n\n origin:\n\n files (list): Image files location on the server.\n\n hostname (str): Hostname or address of the server to copy from.\n This must exist in the testbed under the 'servers' block.\n\n destination:\n\n directory (str): Location on the device where the images\n should be copied to.\n\n protocol (str): Protocol used for copy operation.\n\n timeout (int, optional): Max time allowed for copy operation in\n seconds. Defaults to 300.\n\nExample\n-------\nfabric_clean:\n cleaning_timeout: 90\n copy_boot_image:\n origin:\n files: [/my_switch_image.bin]\n hostname: my_server_from_testbed\n destination:\n directory: '/bootflash'\n protocol: scp\n", - "module_name": "stages.stages", + "folders": { + "apic": { + "doc": "This stage will clean APIC controllers.\n\nThe stage will execute 'acidiag touch clean' and then reload the controller.\n\nStage Schema\n------------\nfabric_clean:\n\n cleaning_timeout (int, optional): Max time for cleaning scripts to execute.\n Defaults to 90.\n\n reload_timeout (int, optional): Max time for reload. Defaults to 800.\n\n sleep_after_reload (int, optional): Time in seconds to sleep after the\n device completes reloading. Defaults to 60.\n\nExample\n-------\nfabric_clean:\n cleaning_timeout: 90\n", + "module_name": "stages.apic.stages", "package": "genie.libs.clean", + "tokens": { + "os": "apic" + }, "uid": "FabricClean", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/aci/stages.py#L15" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/apic/stages.py#L340" + }, + "nxos": { + "folders": { + "aci": { + "doc": "This stage will clean NXOS ACI nodes.\n\nThe stage will execute the following commands, where \nis the currently running image if it exists, or the image copied to the\ndevice (if applicable)::\n - '/bin/setup-clean-config.sh'\n - '/bin/setup-bootvars.sh '\n\nFinally the stage will reload the node.\n\nStage Schema\n------------\nfabric_clean:\n\n cleaning_timeout (int, optional): Max time for cleaning scripts to execute.\n Defaults to 90.\n\n reload_timeout (int, optional): Max time for reload. Defaults to 800.\n\n sleep_after_reload (int, optional): Time in seconds to sleep after the\n device completes reloading. Defaults to 60.\n\n copy_boot_image (dict, optional):\n\n origin:\n\n files (list): Image files location on the server.\n\n hostname (str): Hostname or address of the server to copy from.\n This must exist in the testbed under the 'servers' block.\n\n destination:\n\n directory (str): Location on the device where the images\n should be copied to.\n\n protocol (str): Protocol used for copy operation.\n\n timeout (int, optional): Max time allowed for copy operation in\n seconds. Defaults to 300.\n\nExample\n-------\nfabric_clean:\n cleaning_timeout: 90\n copy_boot_image:\n origin:\n files: [/my_switch_image.bin]\n hostname: my_server_from_testbed\n destination:\n directory: '/bootflash'\n protocol: scp\n", + "module_name": "stages.nxos.aci.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "aci" + }, + "uid": "FabricClean", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/aci/stages.py#L15" + } + }, + "tokens": { + "os": "nxos" + } } } }, "FabricUpgrade": { - "apic": { - "doc": "This stage upgrades (or downgrades) the firmware version for APIC\ndevices. This includes the controller-group and the switch-group.\n\nStage Schema\n------------\nfabric_upgrade:\n\n controller_image (list, optional): Contains the controller image.\n Defaults to None.\n\n switch_image (list, optional): Contains the switch image. Defaults to\n None.\n\n switch_group_name (str, optional): The name of the switch-group to\n create. Defaults to switches.\n\n clear_switch_group (bool, optional): Whether or not to clear the\n switch-group configuration before configuring it. Defaults to True.\n\n sleep_after_delete (int, optional): How long in seconds to sleep after\n clearing the firmware repository. Defaults to 5.\n\n switch_group_nodes (list, optional): Contains the Nodes which will\n be added to the switch_group_name. Defaults to None.\n\n timeouts (dict, optional):\n\n firmware_repository_add (int, optional): Max time in seconds allowed\n for adding images to the firmware repository. Defaults to\n 300 (5 mins).\n\n controller_upgrade (int, optional): Max time in seconds allowed for\n upgrading the controller. Defaults to 1800 (30 mins).\n\n controller_reconnect (int, optional): Max time in seconds allowed\n for reconnecting to the controller during upgrade. This may\n occur if there is only one controller. Defaults to 900 (15 mins).\n\n controller_upgrade_after_reconnect (int, optional): Max time in\n seconds allowed for completing the controller upgrade after\n reconnecting. Defaults to 300 (5 mins).\n\n switch_upgrade (int, optional): Max time in seconds allowed for\n upgrading switches. Defaults to 2700 (45 mins).\n\n stabilize_switch_group_config (int, optional): Time to sleep after\n configuring the switch-group. Defaults to 120 (2 mins).\n\nExample\n-------\nfabric_upgrade:\n switch_group_name: my_switches\n switch_group_nodes: [switch1, switch2]\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "FabricUpgrade", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/apic/stages.py#L27" + "folders": { + "apic": { + "doc": "This stage upgrades (or downgrades) the firmware version for APIC\ndevices. This includes the controller-group and the switch-group.\n\nStage Schema\n------------\nfabric_upgrade:\n\n controller_image (list, optional): Contains the controller image.\n Defaults to None.\n\n switch_image (list, optional): Contains the switch image. Defaults to\n None.\n\n switch_group_name (str, optional): The name of the switch-group to\n create. Defaults to switches.\n\n clear_switch_group (bool, optional): Whether or not to clear the\n switch-group configuration before configuring it. Defaults to True.\n\n sleep_after_delete (int, optional): How long in seconds to sleep after\n clearing the firmware repository. Defaults to 5.\n\n switch_group_nodes (list, optional): Contains the Nodes which will\n be added to the switch_group_name. Defaults to None.\n\n timeouts (dict, optional):\n\n firmware_repository_add (int, optional): Max time in seconds allowed\n for adding images to the firmware repository. Defaults to\n 300 (5 mins).\n\n controller_upgrade (int, optional): Max time in seconds allowed for\n upgrading the controller. Defaults to 1800 (30 mins).\n\n controller_reconnect (int, optional): Max time in seconds allowed\n for reconnecting to the controller during upgrade. This may\n occur if there is only one controller. Defaults to 900 (15 mins).\n\n controller_upgrade_after_reconnect (int, optional): Max time in\n seconds allowed for completing the controller upgrade after\n reconnecting. Defaults to 300 (5 mins).\n\n switch_upgrade (int, optional): Max time in seconds allowed for\n upgrading switches. Defaults to 2700 (45 mins).\n\n stabilize_switch_group_config (int, optional): Time to sleep after\n configuring the switch-group. Defaults to 120 (2 mins).\n\nExample\n-------\nfabric_upgrade:\n switch_group_name: my_switches\n switch_group_nodes: [switch1, switch2]\n", + "module_name": "stages.apic.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "apic" + }, + "uid": "FabricUpgrade", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/apic/stages.py#L27" + } } }, "InstallImage": { - "iosxe": { - "cat3k": { - "doc": "This stage installs a provided image onto the device using the install\nCLI. It also handles the automatic reloading of your device after the\ninstall is complete.\n\nStage Schema\n------------\ninstall_image:\n images (list): Image to install\n\n save_system_config (bool, optional): Whether or not to save the system\n config if it was modified. Defaults to False.\n\n install_timeout (int, optional): Maximum time in seconds to wait for install\n process to finish. Defaults to 500.\n\n reload_timeout (int, optional): Maximum time in seconds to wait for reload\n process to finish. Defaults to 800.\n\nExample\n-------\ninstall_image:\n images:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n save_system_config: True\n install_timeout: 1000\n reload_timeout: 1000\n\n", - "module_name": "stages.stages", + "folders": { + "iosxe": { + "doc": "This stage installs a provided image onto the device using the install\nCLI. It also handles the automatic reloading of your device after the\ninstall is complete.\n\nStage Schema\n------------\ninstall_image:\n images (list): Image to install\n\n directory (str): directory where packages.conf is created\n\n\n save_system_config (bool, optional): Whether or not to save the system\n config if it was modified. Defaults to False.\n\n install_timeout (int, optional): Maximum time in seconds to wait for install\n process to finish. Defaults to 500.\n\n reload_timeout (int, optional): Maximum time in seconds to wait for reload\n process to finish. Defaults to 800.\n\n verify_running_image (bool, optional): Compare the image filename with the running\n image version on device. If a match is found, the stage will be skipped.\n Defaults to True.\n\n reload_service_args (optional):\n\n reload_creds (str, optional): The credential to use after the reload is\n complete. The credential name comes from the testbed yaml file.\n Defaults to the 'default' credential.\n\n prompt_recovery (bool, optional): Enable or disable the prompt recovery\n feature of unicon. Defaults to True.\n\n error_pattern (list, optional): List of regex strings to check for errors.\n Default: [r\"FAILED:.*?$\",]\n\n : \n Any other arguments that the Unicon reload service supports\n\nExample\n-------\ninstall_image:\n images:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n save_system_config: True\n install_timeout: 1000\n reload_timeout: 1000\n\n", + "folders": { + "cat3k": { + "doc": "This stage installs a provided image onto the device using the install\nCLI. It also handles the automatic reloading of your device after the\ninstall is complete.\n\nStage Schema\n------------\ninstall_image:\n images (list): Image to install\n\n save_system_config (bool, optional): Whether or not to save the system\n config if it was modified. Defaults to False.\n\n install_timeout (int, optional): Maximum time in seconds to wait for install\n process to finish. Defaults to 500.\n\n reload_timeout (int, optional): Maximum time in seconds to wait for reload\n process to finish. Defaults to 800.\n\nExample\n-------\ninstall_image:\n images:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n save_system_config: True\n install_timeout: 1000\n reload_timeout: 1000\n\n", + "module_name": "stages.iosxe.cat3k.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "cat3k" + }, + "uid": "InstallImage", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat3k/stages.py#L12" + } + }, + "module_name": "stages.iosxe.stages", "package": "genie.libs.clean", + "tokens": { + "os": "iosxe" + }, "uid": "InstallImage", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat3k/stages.py#L12" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L517" }, - "doc": "This stage installs a provided image onto the device using the install\nCLI. It also handles the automatic reloading of your device after the\ninstall is complete.\n\nStage Schema\n------------\ninstall_image:\n images (list): Image to install\n\n directory (str): directory where packages.conf is created\n\n\n save_system_config (bool, optional): Whether or not to save the system\n config if it was modified. Defaults to False.\n\n install_timeout (int, optional): Maximum time in seconds to wait for install\n process to finish. Defaults to 500.\n\n reload_timeout (int, optional): Maximum time in seconds to wait for reload\n process to finish. Defaults to 800.\n\n verify_running_image (bool, optional): Compare the image filename with the running\n image version on device. If a match is found, the stage will be skipped.\n Defaults to True.\n\n reload_service_args (optional):\n\n reload_creds (str, optional): The credential to use after the reload is\n complete. The credential name comes from the testbed yaml file.\n Defaults to the 'default' credential.\n\n prompt_recovery (bool, optional): Enable or disable the prompt recovery\n feature of unicon. Defaults to True.\n\n error_pattern (list, optional): List of regex strings to check for errors.\n Default: [r\"FAILED:.*?$\",]\n\n : \n Any other arguments that the Unicon reload service supports\n\nExample\n-------\ninstall_image:\n images:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n save_system_config: True\n install_timeout: 1000\n reload_timeout: 1000\n\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "InstallImage", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L513" - }, - "iosxr": { - "ncs540": { - "doc": "This stage installs the provided image onto your device using the install CLI.\n\nStage Schema\n------------\ninstall_image:\n\n image (list): Image to install on the device.\n\n protocol (str, optional): Protocol (http or ftp) used for the install operation.\n Defaults to http.\n\n server (str, optional): Hostname or address of the server to install.\n\n vrf (str, optional): Vrf used to copy. Defaults to default.\n\n install_timeout (int, optional): Max time in seconds allowed for install\n operations. Defaults to 300.\n\n commit_sleep (int, optional): Time in seconds to sleep before executing\n 'install commit'. Defaults to 180.\n\nExample\n-------\ninstall_image:\n image:\n - /path/image.iso\n install_timeout: 1500\n commit_sleep: 200\n\nor\n\ninstall_image:\n image:\n - /http_path/image.iso\n protocol: http\n server: 10.1.1.1\n vrf: default\n install_timeout: 2700\n commit_sleep: 180\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "InstallImage", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/ncs540/stages.py#L23" - } - }, - "nxos": { - "n9k": { - "doc": "This stage installs a provided image onto the device using the install CLI.\nStage Schema\n------------\ninstall_image:\n images (list): Image to install\n install_timeout (int, optional): Maximum time in seconds to wait for install\n process to finish. Defaults to 750.\nExample\n-------\ninstall_image:\n images:\n - bootflash:nxos.9.3.5.bin\n install_timeout: 500\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "InstallImage", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n9k/stages.py#L14" + "iosxr": { + "folders": { + "ncs540": { + "doc": "This stage installs the provided image onto your device using the install CLI.\n\nStage Schema\n------------\ninstall_image:\n\n image (list): Image to install on the device.\n\n protocol (str, optional): Protocol (http or ftp) used for the install operation.\n Defaults to http.\n\n server (str, optional): Hostname or address of the server to install.\n\n vrf (str, optional): Vrf used to copy. Defaults to default.\n\n install_timeout (int, optional): Max time in seconds allowed for install\n operations. Defaults to 300.\n\n commit_sleep (int, optional): Time in seconds to sleep before executing\n 'install commit'. Defaults to 180.\n\nExample\n-------\ninstall_image:\n image:\n - /path/image.iso\n install_timeout: 1500\n commit_sleep: 200\n\nor\n\ninstall_image:\n image:\n - /http_path/image.iso\n protocol: http\n server: 10.1.1.1\n vrf: default\n install_timeout: 2700\n commit_sleep: 180\n", + "module_name": "stages.iosxr.ncs540.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "ncs540" + }, + "uid": "InstallImage", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/ncs540/stages.py#L23" + } + }, + "tokens": { + "os": "iosxr" + } + }, + "nxos": { + "folders": { + "n9k": { + "doc": "This stage installs a provided image onto the device using the install CLI.\nStage Schema\n------------\ninstall_image:\n images (list): Image to install\n install_timeout (int, optional): Maximum time in seconds to wait for install\n process to finish. Defaults to 750.\nExample\n-------\ninstall_image:\n images:\n - bootflash:nxos.9.3.5.bin\n install_timeout: 500\n", + "module_name": "stages.nxos.n9k.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "n9k" + }, + "uid": "InstallImage", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n9k/stages.py#L14" + } + }, + "tokens": { + "os": "nxos" + } } } }, "InstallImageAndPackages": { - "iosxr": { - "doc": "This stage installs the provided image and optional packages onto\nyour device using the install CLI. The stage will also handle the\nautomatic reload.\n\nStage Schema\n------------\ninstall_image_and_packages:\n\n image (list): Image to install on the device.\n\n packages (list, optional): Packages to install on the device. Defaults to None.\n\n tftp_server (str, optional): TFTP Server that should be used when installing\n via tftp. Defaults to None.\n\n remove_inactive_pkgs (bool, optional): If True remove all the inactive\n packages before attempting installation. Defaults to True.\n\n install_timeout (int, optional): Max time in seconds allowed for install\n operations. Defaults to 300.\n\n reload_timeout (int, optional): Max time in seconds allowed for the reload\n to complete. Defaults to 900.\n\n commit_sleep (int, optional): Time in seconds to sleep before executing\n 'install commit'. Defaults to 180.\n\n source_directory (str, optional): Directory to copy from. Defaults to 'harddisk:'\n\nExample\n-------\ninstall_image_and_packages:\n image:\n - flash:image.iso\n packages:\n - flash:package.rpm\n\nor\n\ninstall_image_and_packages:\n image:\n - /tftp_path/image.iso\n packages:\n - /tftp_path/package.rpm\n tftp_server: tftp_server_1\n remove_inactive_pkgs: True\n install_timeout: 2700\n reload_timeout: 800\n commit_sleep: 180\n\nor\n\nimages:\n - /path/to/system.iso\n - /path/to/package1.rpm\n - /path/to/package2.rpm\n\ninstall_image_and_packages:\n source_directory: \"disk1:\"\n\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "InstallImageAndPackages", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/stages.py#L263" + "folders": { + "iosxr": { + "doc": "This stage installs the provided image and optional packages onto\nyour device using the install CLI. The stage will also handle the\nautomatic reload.\n\nStage Schema\n------------\ninstall_image_and_packages:\n\n image (list): Image to install on the device.\n\n packages (list, optional): Packages to install on the device. Defaults to None.\n\n tftp_server (str, optional): TFTP Server that should be used when installing\n via tftp. Defaults to None.\n\n remove_inactive_pkgs (bool, optional): If True remove all the inactive\n packages before attempting installation. Defaults to True.\n\n install_timeout (int, optional): Max time in seconds allowed for install\n operations. Defaults to 300.\n\n reload_timeout (int, optional): Max time in seconds allowed for the reload\n to complete. Defaults to 900.\n\n commit_sleep (int, optional): Time in seconds to sleep before executing\n 'install commit'. Defaults to 180.\n\n source_directory (str, optional): Directory to copy from. Defaults to 'harddisk:'\n\nExample\n-------\ninstall_image_and_packages:\n image:\n - flash:image.iso\n packages:\n - flash:package.rpm\n\nor\n\ninstall_image_and_packages:\n image:\n - /tftp_path/image.iso\n packages:\n - /tftp_path/package.rpm\n tftp_server: tftp_server_1\n remove_inactive_pkgs: True\n install_timeout: 2700\n reload_timeout: 800\n commit_sleep: 180\n\nor\n\nimages:\n - /path/to/system.iso\n - /path/to/package1.rpm\n - /path/to/package2.rpm\n\ninstall_image_and_packages:\n source_directory: \"disk1:\"\n\n", + "module_name": "stages.iosxr.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "iosxr" + }, + "uid": "InstallImageAndPackages", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/stages.py#L263" + } } }, "InstallPackages": { - "iosxe": { - "doc": "This stage installs the provided packages using the install CLI.\n\nStage Schema\n------------\ninstall_packages:\n packages (list): Packages to install.\n\n save_system_config (bool, optional): Whether or not to save the system\n config if it was modified. Defaults to False.\n\n install_timeout (int, optional): Maximum time to wait for install\n process to finish. Defaults to 300.\n\nExample\n-------\ninstall_packages:\n packages:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n save_system_config: True\n install_timeout: 1000\n\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "InstallPackages", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L763" + "folders": { + "iosxe": { + "doc": "This stage installs the provided packages using the install CLI.\n\nStage Schema\n------------\ninstall_packages:\n packages (list): Packages to install.\n\n save_system_config (bool, optional): Whether or not to save the system\n config if it was modified. Defaults to False.\n\n install_timeout (int, optional): Maximum time to wait for install\n process to finish. Defaults to 300.\n\nExample\n-------\ninstall_packages:\n packages:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n save_system_config: True\n install_timeout: 1000\n\n", + "module_name": "stages.iosxe.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "iosxe" + }, + "uid": "InstallPackages", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L767" + } } }, "InstallRemoveInactive": { - "iosxe": { - "doc": "This stage removes partially installed packages/images left\non the device. If a super package is left partially installed,\nwe cannot attempt to install another until it is removed.\n\nStage Schema\n------------\ninstall_image:\n timeout (int, optional): Maximum time to wait for remove process to\n finish. Defaults to 180.\n\nExample\n-------\ninstall_remove_inactive:\n timeout: 180\n\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "InstallRemoveInactive", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L458" + "folders": { + "iosxe": { + "doc": "This stage removes partially installed packages/images left\non the device. If a super package is left partially installed,\nwe cannot attempt to install another until it is removed.\n\nStage Schema\n------------\ninstall_image:\n timeout (int, optional): Maximum time to wait for remove process to\n finish. Defaults to 180.\n\nExample\n-------\ninstall_remove_inactive:\n timeout: 180\n\n", + "module_name": "stages.iosxe.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "iosxe" + }, + "uid": "InstallRemoveInactive", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L462" + } } }, "LoadApImage": { - "cheetah": { - "ap": { - "doc": "This stage loads new AP image\n\n Stage Schema\n ------------\n load_ap_image:\n ap_image_path (str): Absolute path where ap image is located\n\n server(str): Server alias which has AP image\n\n protocol(str): protocol through which AP image will be loaded\n\n max_time (int, optional): Maximum time for which this clean stage will try to clean ap.\n Defaults to 1200\n\n\n\n\n Example\n -------\n load_ap_image:\n ap_image_path: \"/auto/wnbu-groups-builds/FAST_BUNDLING/polaris_dev/6640/ap3g3-k9w8-tar.master-cisco.202309180209\"\n server: \"tftp\"\n max_time: \"1200\"\n ", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "LoadApImage", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/cheetah/ap/stages.py#L184" + "folders": { + "cheetah": { + "folders": { + "ap": { + "doc": "This stage loads new AP image\n\n Stage Schema\n ------------\n load_ap_image:\n ap_image_path (str): Absolute path where ap image is located\n\n server(str): Server alias which has AP image\n\n protocol(str): protocol through which AP image will be loaded\n\n max_time (int, optional): Maximum time for which this clean stage will try to clean ap.\n Defaults to 1200\n\n\n\n\n Example\n -------\n load_ap_image:\n ap_image_path: \"/auto/wnbu-groups-builds/FAST_BUNDLING/polaris_dev/6640/ap3g3-k9w8-tar.master-cisco.202309180209\"\n server: \"tftp\"\n max_time: \"1200\"\n ", + "module_name": "stages.cheetah.ap.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "ap" + }, + "uid": "LoadApImage", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/cheetah/ap/stages.py#L184" + } + }, + "tokens": { + "os": "cheetah" + } } } }, "LoadPies": { - "iosxr": { - "doc": "This stage installs provided pies onto the device.\n\nStage Schema\n------------\nload_pies:\n\n files (list): List of XR pies to install\n\n server (str, optional): Hostname or IP address of server to use for install\n command. Defaults to None (Looks in the testbed YAML for a TFTP server)\n\n prompt_level (str, optional): Prompt-level argument for install command.\n Defaults to 'none'.\n\n synchronous (bool, optional): Synchronous option for install command.\n Defaults to None.\n\n install_timeout (int, optional): Maximum time in seconds allowed for\n execution of the install command to complete. Defaults to 600.\n\n max_time (int, optional): Maximum time in seconds to wait while verifying\n the pies installed. Defaults to 300.\n\n check_interval (int, optional): Time interval in seconds while verifying\n the pies installed. Defaults to 30.\n\nExample\n-------\nload_pies:\n files:\n - /auto/path/to/image/asr9k-mcast-px.pie-7.3.1.08I\n - /auto/path/to/image/asr9k-mgbl-px.pie-7.3.1.08I\n - /auto/path/to/image/asr9k-mpls-px.pie-7.3.1.08I\n server: 10.1.6.244\n prompt_level: 'all'\n synchronous: True\n timeout: 150\n max_time: 300\n check_interval: 20\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "LoadPies", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/stages.py#L29" + "folders": { + "iosxr": { + "doc": "This stage installs provided pies onto the device.\n\nStage Schema\n------------\nload_pies:\n\n files (list): List of XR pies to install\n\n server (str, optional): Hostname or IP address of server to use for install\n command. Defaults to None (Looks in the testbed YAML for a TFTP server)\n\n prompt_level (str, optional): Prompt-level argument for install command.\n Defaults to 'none'.\n\n synchronous (bool, optional): Synchronous option for install command.\n Defaults to None.\n\n install_timeout (int, optional): Maximum time in seconds allowed for\n execution of the install command to complete. Defaults to 600.\n\n max_time (int, optional): Maximum time in seconds to wait while verifying\n the pies installed. Defaults to 300.\n\n check_interval (int, optional): Time interval in seconds while verifying\n the pies installed. Defaults to 30.\n\nExample\n-------\nload_pies:\n files:\n - /auto/path/to/image/asr9k-mcast-px.pie-7.3.1.08I\n - /auto/path/to/image/asr9k-mgbl-px.pie-7.3.1.08I\n - /auto/path/to/image/asr9k-mpls-px.pie-7.3.1.08I\n server: 10.1.6.244\n prompt_level: 'all'\n synchronous: True\n timeout: 150\n max_time: 300\n check_interval: 20\n", + "module_name": "stages.iosxr.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "iosxr" + }, + "uid": "LoadPies", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/stages.py#L29" + } } }, "NodeRegistration": { - "apic": { - "doc": "This stage registers nodes on APIC using REST API.\n\nStage Schema\n------------\nnode_registration:\n\n nodes (list): Nodes to register on APIC\n\n rest_alias (str, optional): Connection alias for REST connection.\n Defaults to 'rest'.\n\n verify_max_time (int, optional): Max time in seconds to verify node registration.\n Defaults to 480.\n\n verify_interval (int, optional): How often in seconds to attempt verify node\n registration. Defaults to 30.\n\nExample\n-------\nnode_registration:\n nodes: [Spine1, Spine2]\n rest_alias: cli\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "NodeRegistration", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/apic/stages.py#L432" + "folders": { + "apic": { + "doc": "This stage registers nodes on APIC using REST API.\n\nStage Schema\n------------\nnode_registration:\n\n nodes (list): Nodes to register on APIC\n\n rest_alias (str, optional): Connection alias for REST connection.\n Defaults to 'rest'.\n\n verify_max_time (int, optional): Max time in seconds to verify node registration.\n Defaults to 480.\n\n verify_interval (int, optional): How often in seconds to attempt verify node\n registration. Defaults to 30.\n\nExample\n-------\nnode_registration:\n nodes: [Spine1, Spine2]\n rest_alias: cli\n", + "module_name": "stages.apic.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "apic" + }, + "uid": "NodeRegistration", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/apic/stages.py#L432" + } } }, "PingServer": { - "com": { - "doc": " This stage pings a server from a device to ensure connectivity.\n\nStage Schema\n------------\nping_server:\n\n server (str): Hostname or address of the server to ping.\n\n vrf (str, optional): Vrf used in ping command. Defaults to None.\n\n timeout (int, optional): Maximum time in seconds for ping. Defaults to 60.\n\n min_success_rate (int, optional): Minimum acceptable success rate (percentage)\n of the ping command. Defaults to 60.\n\n max_attempts (int, optional): Maximum number of attempts to check minimum\n ping success rate. Defaults to 5.\n\n interval (int, optional): Time in seconds between re-attempts to check\n minimum ping success rate. Defaults to 30.\n\nExample\n-------\nping_server:\n server: server-1\n vrf: management\n timeout: 120\n min_success_rate: 75\n max_attempts: 3\n interval: 60\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "PingServer", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L126" - } + "doc": " This stage pings a server from a device to ensure connectivity.\n\nStage Schema\n------------\nping_server:\n\n server (str): Hostname or address of the server to ping.\n\n vrf (str, optional): Vrf used in ping command. Defaults to None.\n\n timeout (int, optional): Maximum time in seconds for ping. Defaults to 60.\n\n min_success_rate (int, optional): Minimum acceptable success rate (percentage)\n of the ping command. Defaults to 60.\n\n max_attempts (int, optional): Maximum number of attempts to check minimum\n ping success rate. Defaults to 5.\n\n interval (int, optional): Time in seconds between re-attempts to check\n minimum ping success rate. Defaults to 30.\n\nExample\n-------\nping_server:\n server: server-1\n vrf: management\n timeout: 120\n min_success_rate: 75\n max_attempts: 3\n interval: 60\n", + "folders": {}, + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "PingServer", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L126" }, "PowerCycle": { - "com": { - "doc": "This stage power cycles the device\n\nStage schema\n------------\npower_cycle:\n\n sleep_after_power_off (int, optional): Time in seconds to sleep\n after powering off the device. Defaults to 30.\n\n boot_timeout (int, optional): Max time in seconds allowed for the\n device to boot. Defaults to 600.\n\n sleep_before_connect (int, optional): Time to sleep before connecting\n to the device. Defaults to 60 seconds.\n\n sleep_after_connect (int, optional): Time to sleep after connecting\n to the device. Defaults to 0 (no sleep).\n\n connect_arguments (dict, optional): Arguments to connect() method.\n\n connect_retry_wait (int, optional). Time to wait before retrying to\n connect to the device. Defaults to 60 seconds.\n\nExample\n-------\npower_cycle:\n sleep_after_power_off: 5\n sleep_after_connect: 10\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "PowerCycle", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L2692" - } + "doc": "This stage power cycles the device\n\nStage schema\n------------\npower_cycle:\n\n sleep_after_power_off (int, optional): Time in seconds to sleep\n after powering off the device. Defaults to 30.\n\n boot_timeout (int, optional): Max time in seconds allowed for the\n device to boot. Defaults to 600.\n\n sleep_before_connect (int, optional): Time to sleep before connecting\n to the device. Defaults to 60 seconds.\n\n sleep_after_connect (int, optional): Time to sleep after connecting\n to the device. Defaults to 0 (no sleep).\n\n connect_arguments (dict, optional): Arguments to connect() method.\n\n connect_retry_wait (int, optional). Time to wait before retrying to\n connect to the device. Defaults to 60 seconds.\n\nExample\n-------\npower_cycle:\n sleep_after_power_off: 5\n sleep_after_connect: 10\n", + "folders": {}, + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "PowerCycle", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L2692" }, "PrimeAp": { - "cheetah": { - "ap": { - "doc": "This stage primes accesspoint to desired controller\n\n Stage Schema\n ------------\n prime_ap:\n\n controller_name (str):Name of the controller where AP needs to join.\n\n controller_ip_address (str): IPv4/Ipv6 address of controller where AP needs to join.\n\n max_time (int, optional): Maximum time for which this clean stage will try to associate Ap to controller .\n Defaults to 900\n\n check_interval (int, optional): Interval for retry mechanism in seconds. Defaults to 30\n\n sleep_time (int, optional): Interval for sleeping mechanism in seconds after priming AP to controller.\n Defaults to 30\n\n\n Example\n -------\n prime_ap:\n controller_name: \"ewlc-5\"\n controller_ip_address: \"9.4.62.41\"\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "PrimeAp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/cheetah/ap/stages.py#L27" + "folders": { + "cheetah": { + "folders": { + "ap": { + "doc": "This stage primes accesspoint to desired controller\n\n Stage Schema\n ------------\n prime_ap:\n\n controller_name (str):Name of the controller where AP needs to join.\n\n controller_ip_address (str): IPv4/Ipv6 address of controller where AP needs to join.\n\n max_time (int, optional): Maximum time for which this clean stage will try to associate Ap to controller .\n Defaults to 900\n\n check_interval (int, optional): Interval for retry mechanism in seconds. Defaults to 30\n\n sleep_time (int, optional): Interval for sleeping mechanism in seconds after priming AP to controller.\n Defaults to 30\n\n\n Example\n -------\n prime_ap:\n controller_name: \"ewlc-5\"\n controller_ip_address: \"9.4.62.41\"\n", + "module_name": "stages.cheetah.ap.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "ap" + }, + "uid": "PrimeAp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/cheetah/ap/stages.py#L27" + } + }, + "tokens": { + "os": "cheetah" + } } } }, "Reload": { - "com": { - "doc": " This stage reloads the device.\n\nStage Schema\n------------\nreload:\n\n reload_service_args (optional):\n\n timeout (int, optional): Maximum time in seconds allowed for the reload.\n Defaults to 800.\n\n reload_creds (str, optional): The credential to use after the reload is\n complete. The credential name comes from the testbed yaml file.\n Defaults to the 'default' credential.\n\n prompt_recovery (bool, optional): Enable or disable the prompt recovery\n feature of unicon. Defaults to True.\n\n error_pattern (list, optional): List of regex patterns to check for errors.\n Defaults to an empty list (no error checking).\n\n : \n Any other arguments that the Unicon reload service supports\n\n check_modules:\n\n check (bool, optional): Enable the checking of modules after reload.\n Defaults to True.\n\n timeout (int, optional): Maximum time in seconds allowed for verifying\n the modules are in a stable state. Defaults to 180.\n\n interval (int, optional): How often to check the module states in\n seconds. Defaults to 30.\n\n reconnect_via (str, optional): Specify which connection to use after reloading.\n Defaults to the 'default' connection in the testbed yaml file.\n\n\nExample\n-------\nreload:\n reload_service_args:\n timeout: 600\n reload_creds: clean_reload_creds\n prompt_recovery: True\n check_modules:\n check: False\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "Reload", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L1369" + "doc": " This stage reloads the device.\n\nStage Schema\n------------\nreload:\n\n reload_service_args (optional):\n\n timeout (int, optional): Maximum time in seconds allowed for the reload.\n Defaults to 800.\n\n reload_creds (str, optional): The credential to use after the reload is\n complete. The credential name comes from the testbed yaml file.\n Defaults to the 'default' credential.\n\n prompt_recovery (bool, optional): Enable or disable the prompt recovery\n feature of unicon. Defaults to True.\n\n error_pattern (list, optional): List of regex patterns to check for errors.\n Defaults to an empty list (no error checking).\n\n : \n Any other arguments that the Unicon reload service supports\n\n check_modules:\n\n check (bool, optional): Enable the checking of modules after reload.\n Defaults to True.\n\n timeout (int, optional): Maximum time in seconds allowed for verifying\n the modules are in a stable state. Defaults to 180.\n\n interval (int, optional): How often to check the module states in\n seconds. Defaults to 30.\n\n reconnect_via (str, optional): Specify which connection to use after reloading.\n Defaults to the 'default' connection in the testbed yaml file.\n\n\nExample\n-------\nreload:\n reload_service_args:\n timeout: 600\n reload_creds: clean_reload_creds\n prompt_recovery: True\n check_modules:\n check: False\n", + "folders": { + "iosxe": { + "doc": " This stage reloads the device.\n\nStage Schema\n------------\nreload:\n license: (optional)\n check: (bool, optional): Enable the checking license inconsistency and fix\n\n reload_service_args (optional):\n\n timeout (int, optional): Maximum time in seconds allowed for the reload.\n Defaults to 800.\n\n reload_creds (str, optional): The credential to use after the reload is\n complete. The credential name comes from the testbed yaml file.\n Defaults to the 'default' credential.\n\n prompt_recovery (bool, optional): Enable or disable the prompt recovery\n feature of unicon. Defaults to True.\n\n\n : \n Any other arguments that the Unicon reload service supports\n\n check_modules:\n\n check (bool, optional): Enable the checking of modules after reload.\n Defaults to True.\n\n timeout (int, optional): Maximum time in seconds allowed for verifying\n the modules are in a stable state. Defaults to 180.\n\n interval (int, optional): How often to check the module states in\n seconds. Defaults to 30.\n\n reconnect_via (str, optional): Specify which connection to use after reloading.\n Defaults to the 'default' connection in the testbed yaml file.\n\n\nExample\n-------\nreload:\n reload_service_args:\n timeout: 600\n reload_creds: clean_reload_creds\n prompt_recovery: True\n check_modules:\n check: False\n", + "module_name": "stages.iosxe.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "iosxe" + }, + "uid": "Reload", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L851" + } }, - "iosxe": { - "doc": " This stage reloads the device.\n\nStage Schema\n------------\nreload:\n license: (optional)\n check: (bool, optional): Enable the checking license inconsistency and fix\n\n reload_service_args (optional):\n\n timeout (int, optional): Maximum time in seconds allowed for the reload.\n Defaults to 800.\n\n reload_creds (str, optional): The credential to use after the reload is\n complete. The credential name comes from the testbed yaml file.\n Defaults to the 'default' credential.\n\n prompt_recovery (bool, optional): Enable or disable the prompt recovery\n feature of unicon. Defaults to True.\n\n\n : \n Any other arguments that the Unicon reload service supports\n\n check_modules:\n\n check (bool, optional): Enable the checking of modules after reload.\n Defaults to True.\n\n timeout (int, optional): Maximum time in seconds allowed for verifying\n the modules are in a stable state. Defaults to 180.\n\n interval (int, optional): How often to check the module states in\n seconds. Defaults to 30.\n\n reconnect_via (str, optional): Specify which connection to use after reloading.\n Defaults to the 'default' connection in the testbed yaml file.\n\n\nExample\n-------\nreload:\n reload_service_args:\n timeout: 600\n reload_creds: clean_reload_creds\n prompt_recovery: True\n check_modules:\n check: False\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "Reload", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L847" + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "Reload", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L1369" + }, + "ResetConfiguration": { + "folders": { + "iosxe": { + "doc": " Reset device configuration by using config replace operation with a minimal configuration.\n\n This clean stage generates a minimal configuration from the running config and stores\n it in the base_config.txt file on bootflash. Then uses configure replace command to\n override the running configuration.\n\n If the file `base_config.txt` exists on flash, the contents will be overwritten.\n\nStage Schema\n------------\nreset_configuration:\n timeout (int, optional): The timeout for device configuration to complete in seconds.\n Defaults to 120.\n\nExample:\n\n reset_configuration:\n\n order:\n - connect\n - reset_configuration\n ", + "module_name": "stages.iosxe.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "iosxe" + }, + "uid": "ResetConfiguration", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L2203" + } } }, "RevertVmSnapshot": { - "com": { - "doc": "This stage reverts the virtual device to the provided snapshot\n\nStage schema\n------------\nrevert_snapshot:\n\n vm_hostname (str, optional): Name of the VM that is on the ESXi\n server, if not provided, it will be set as the device name.\n\n esxi_server (str): ESXI Server which holds the vm to revert the\n snapshot.\n\n recovery_snapshot_name (str): Name of the snapshot to have VM\n reverted back to.\n\n max_recovery_attempts (int, optional): Maximum number of recovery\n attempts. Defaults to 2.\n\n sleep_after_powering_off (int, optional): Wait time after powering\n off devices. Default value is 60 seconds.\n\n sleep_time_stabilize_device (int, optional): Wait time before\n finishing revert snapshot stage. Defaults to 300.\n\n sleep_time_after_powering_on (int, optional): Wait time after\n powering on devices to reach steady state. Defaults to 600.\n\nExample\n-------\nrevert_vm_snapshot:\n esxi_server: ssr-ucs2\n vm_hostname: P1-4\n max_recovery_attempts: 2\n sleep_after_powering_off: 60\n sleep_time_after_powering_on: 600\n sleep_time_stabilize_device: 300\n recovery_snapshot_name: golden\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "RevertVmSnapshot", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L2325" - } + "doc": "This stage reverts the virtual device to the provided snapshot\n\nStage schema\n------------\nrevert_snapshot:\n\n vm_hostname (str, optional): Name of the VM that is on the ESXi\n server, if not provided, it will be set as the device name.\n\n esxi_server (str): ESXI Server which holds the vm to revert the\n snapshot.\n\n recovery_snapshot_name (str): Name of the snapshot to have VM\n reverted back to.\n\n max_recovery_attempts (int, optional): Maximum number of recovery\n attempts. Defaults to 2.\n\n sleep_after_powering_off (int, optional): Wait time after powering\n off devices. Default value is 60 seconds.\n\n sleep_time_stabilize_device (int, optional): Wait time before\n finishing revert snapshot stage. Defaults to 300.\n\n sleep_time_after_powering_on (int, optional): Wait time after\n powering on devices to reach steady state. Defaults to 600.\n\nExample\n-------\nrevert_vm_snapshot:\n esxi_server: ssr-ucs2\n vm_hostname: P1-4\n max_recovery_attempts: 2\n sleep_after_powering_off: 60\n sleep_time_after_powering_on: 600\n sleep_time_stabilize_device: 300\n recovery_snapshot_name: golden\n", + "folders": {}, + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "RevertVmSnapshot", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L2325" }, "RommonBoot": { - "iosxe": { - "cat9k": { - "doc": "This stage boots an image onto the device through rommon. Using either\na local image or one from a tftp server.\n\nStage Schema\n------------\nrommon_boot:\n\n image (list): Image to boot with\n\n tftp (optional): If specified boot via tftp otherwise boot using local\n image.\n\n ip_address (list, optional): Management ip address to configure to reach to the\n tftp server\n\n subnet_mask (str, optional): Management subnet mask\n\n gateway (str, optional): Management gateway\n\n tftp_server (str, optional): Tftp server that is reachable with management interface\n \n recovery_password (str): Enable password for device\n required after bootup. Defaults to None.\n\n recovery_enable_password (str): Enable password for device\n required after bootup. Defaults to None.\n\n recovery_username (str): Enable username for device\n required after bootup. Defaults to None.\n\n save_system_config (bool, optional): Whether or not to save the\n system config if it was modified. Defaults to True.\n\n timeout (int, optional): Max time allowed for the booting process.\n Defaults to 600.\n\n config_reg_timeout (int, optional): Max time to set config-register.\n Defaults to 30.\n\nExample\n-------\nrommon_boot:\n image:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n tftp:\n ip_address: [10.1.7.126, 10.1.7.127]\n gateway: 10.1.7.1\n subnet_mask: 255.255.255.0\n tftp_server: 11.1.7.251\n recovery_password: nbv_12345\n recovery_username: user_12345\n recovery_enable_password: en\n save_system_config: False\n timeout: 600\n config_reg_timeout: 10\n\nThere is more than one ip address, one for each supervisor.\n\nTo pass tftp information and tftp server ip from the testbed, refer the example below\n\n\ntestbed:\n name: \n passwords: \n tacacs: test\n enable: test\n servers:\n tftp: \n address: 10.x.x.x\n credentials:\n default:\n username: user\n password: 1234\ndevices:\n uut1:\n management:\n address:\n ipv4: '10.1.1.1/16'\n gateway:\n ipv4: '10.1.0.1'\n\n", - "module_name": "stages.stages", + "folders": { + "iosxe": { + "doc": "This stage boots an image onto the device through rommon. Using either\na local image or one from a tftp server.\n\nStage Schema\n------------\nrommon_boot:\n\n image (list): Image to boot with\n\n tftp (optional): If specified boot via tftp otherwise boot using local\n image.\n\n ip_address (list, optional): Management ip address to configure to reach to the\n tftp server\n\n subnet_mask (str, optional): Management subnet mask\n\n gateway (str, optional): Management gateway\n\n tftp_server (str, optional): Tftp server that is reachable with management interface\n\n\n recovery_password (str): Enable password for device\n required after bootup. Defaults to None.\n\n recovery_enable_password (str): Enable password for device\n required after bootup. Defaults to None.\n\n recovery_username (str): Enable username for device\n required after bootup. Defaults to None.\n\n save_system_config (bool, optional): Whether or not to save the\n system config if it was modified. Defaults to True.\n\n timeout (int, optional): Max time allowed for the booting process.\n Defaults to 600.\n\n config_reg_timeout (int, optional): Max time to set config-register.\n Defaults to 30.\n\n\n rommon_timeout (int, optional): Timeout after bringing the device to rommon. Default to 15 sec.\n\n reconnect_timeout (int, optional): Timeout to reconnect the device after booting. Default to 90 sec.\n\nExample\n-------\nrommon_boot:\n image:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n tftp:\n ip_address: [10.1.7.126, 10.1.7.127]\n gateway: 10.1.7.1\n subnet_mask: 255.255.255.0\n tftp_server: 11.1.7.251\n recovery_password: nbv_12345\n recovery_username: user_12345\n recovery_enable_password: en\n save_system_config: False\n timeout: 600\n config_reg_timeout: 10\n\nThere is more than one ip address, one for each supervisor.\n\nTo pass tftp information and tftp server ip from the testbed, refer the example below\n\n\ntestbed:\n name:\n name:\n passwords:\n tacacs: test\n enable: test\n servers:\n tftp:\n tftp:\n address: 10.x.x.x\n credentials:\n default:\n username: user\n password: 1234\ndevices:\n uut1:\n management:\n address:\n ipv4: '10.1.1.1/16'\n gateway:\n ipv4: '10.1.0.1'\n\n", + "folders": { + "cat9k": { + "doc": "This stage boots an image onto the device through rommon. Using either\na local image or one from a tftp server.\n\nStage Schema\n------------\nrommon_boot:\n\n image (list): Image to boot with\n\n tftp (optional): If specified boot via tftp otherwise boot using local\n image.\n\n ip_address (list, optional): Management ip address to configure to reach to the\n tftp server\n\n subnet_mask (str, optional): Management subnet mask\n\n gateway (str, optional): Management gateway\n\n tftp_server (str, optional): Tftp server that is reachable with management interface\n \n recovery_password (str): Enable password for device\n required after bootup. Defaults to None.\n\n recovery_enable_password (str): Enable password for device\n required after bootup. Defaults to None.\n\n recovery_username (str): Enable username for device\n required after bootup. Defaults to None.\n\n save_system_config (bool, optional): Whether or not to save the\n system config if it was modified. Defaults to True.\n\n timeout (int, optional): Max time allowed for the booting process.\n Defaults to 600.\n\n config_reg_timeout (int, optional): Max time to set config-register.\n Defaults to 30.\n\nExample\n-------\nrommon_boot:\n image:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n tftp:\n ip_address: [10.1.7.126, 10.1.7.127]\n gateway: 10.1.7.1\n subnet_mask: 255.255.255.0\n tftp_server: 11.1.7.251\n recovery_password: nbv_12345\n recovery_username: user_12345\n recovery_enable_password: en\n save_system_config: False\n timeout: 600\n config_reg_timeout: 10\n\nThere is more than one ip address, one for each supervisor.\n\nTo pass tftp information and tftp server ip from the testbed, refer the example below\n\n\ntestbed:\n name: \n passwords: \n tacacs: test\n enable: test\n servers:\n tftp: \n address: 10.x.x.x\n credentials:\n default:\n username: user\n password: 1234\ndevices:\n uut1:\n management:\n address:\n ipv4: '10.1.1.1/16'\n gateway:\n ipv4: '10.1.0.1'\n\n", + "module_name": "stages.iosxe.cat9k.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "cat9k" + }, + "uid": "RommonBoot", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py#L204" + } + }, + "module_name": "stages.iosxe.stages", "package": "genie.libs.clean", + "tokens": { + "os": "iosxe" + }, "uid": "RommonBoot", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py#L204" - }, - "doc": "This stage boots an image onto the device through rommon. Using either\na local image or one from a tftp server.\n\nStage Schema\n------------\nrommon_boot:\n\n image (list): Image to boot with\n\n tftp (optional): If specified boot via tftp otherwise boot using local\n image.\n\n ip_address (list, optional): Management ip address to configure to reach to the\n tftp server\n\n subnet_mask (str, optional): Management subnet mask\n\n gateway (str, optional): Management gateway\n\n tftp_server (str, optional): Tftp server that is reachable with management interface\n\n\n recovery_password (str): Enable password for device\n required after bootup. Defaults to None.\n\n recovery_enable_password (str): Enable password for device\n required after bootup. Defaults to None.\n\n recovery_username (str): Enable username for device\n required after bootup. Defaults to None.\n\n save_system_config (bool, optional): Whether or not to save the\n system config if it was modified. Defaults to True.\n\n timeout (int, optional): Max time allowed for the booting process.\n Defaults to 600.\n\n config_reg_timeout (int, optional): Max time to set config-register.\n Defaults to 30.\n\n\n rommon_timeout (int, optional): Timeout after bringing the device to rommon. Default to 15 sec.\n\n reconnect_timeout (int, optional): Timeout to reconnect the device after booting. Default to 90 sec.\n\nExample\n-------\nrommon_boot:\n image:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n tftp:\n ip_address: [10.1.7.126, 10.1.7.127]\n gateway: 10.1.7.1\n subnet_mask: 255.255.255.0\n tftp_server: 11.1.7.251\n recovery_password: nbv_12345\n recovery_username: user_12345\n recovery_enable_password: en\n save_system_config: False\n timeout: 600\n config_reg_timeout: 10\n\nThere is more than one ip address, one for each supervisor.\n\nTo pass tftp information and tftp server ip from the testbed, refer the example below\n\n\ntestbed:\n name:\n name:\n passwords:\n tacacs: test\n enable: test\n servers:\n tftp:\n tftp:\n address: 10.x.x.x\n credentials:\n default:\n username: user\n password: 1234\ndevices:\n uut1:\n management:\n address:\n ipv4: '10.1.1.1/16'\n gateway:\n ipv4: '10.1.0.1'\n\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "RommonBoot", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L1094" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L1098" + } } }, "RunConfigure": { - "linux": { - "wsim": { - "doc": "This stage apply certs on controller.\nStage Schema\n------------\nrun_configure:\n timeout(int,optional): 600\nExample\n-------\nrun_configure:\n timeout: 600\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "RunConfigure", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/linux/wsim/stages.py#L228" + "folders": { + "linux": { + "folders": { + "wsim": { + "doc": "This stage apply certs on controller.\nStage Schema\n------------\nrun_configure:\n timeout(int,optional): 600\nExample\n-------\nrun_configure:\n timeout: 600\n", + "module_name": "stages.linux.wsim.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "wsim" + }, + "uid": "RunConfigure", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/linux/wsim/stages.py#L228" + } + }, + "tokens": { + "origin": "linux" + } } } }, "SetControllerMode": { - "iosxe": { - "sdwan": { - "doc": "Set controller mode\n\nStage Schema\n------------\nset_controller_mode:\n\n mode (str, optional): `enable` or `disable`. Defaults to `enable`\n\n reload_timeout (int, optional): maximum time to wait for reload.\n Defaults to 600 secs\n\n configure_retry_interval (int, optional): interval of retry configure().\n Defaults to 60 secs\n\n delete_inactive_versions (bool, optional): delete non active version after\n changing image. Defaults to True\n\nExample\n-------\nset_controller_mode:\n mode: enable\n reload_timeout: 600\n configure_retry_interval: 30\n delete_inactive_versions: True\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "SetControllerMode", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/stages.py#L774" + "folders": { + "iosxe": { + "folders": { + "sdwan": { + "doc": "Set controller mode\n\nStage Schema\n------------\nset_controller_mode:\n\n mode (str, optional): `enable` or `disable`. Defaults to `enable`\n\n reload_timeout (int, optional): maximum time to wait for reload.\n Defaults to 600 secs\n\n configure_retry_interval (int, optional): interval of retry configure().\n Defaults to 60 secs\n\n delete_inactive_versions (bool, optional): delete non active version after\n changing image. Defaults to True\n\nExample\n-------\nset_controller_mode:\n mode: enable\n reload_timeout: 600\n configure_retry_interval: 30\n delete_inactive_versions: True\n", + "module_name": "stages.iosxe.sdwan.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "sdwan" + }, + "uid": "SetControllerMode", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/stages.py#L770" + } + }, + "tokens": { + "os": "iosxe" + } } } }, "SoftwareInstall": { - "viptela": { - "doc": "Software install\n\nStage Schema\n------------\nsoftware_install:\n origin:\n files (list): Image files location on the server.\n hostname (str): Hostname or address of the server.\n protocol (str): Protocol used for copy operation. \n vpn (int): Vpn number used to copy.\n timeout (int, optional): Copy operation timeout in seconds. Defaults to 600.\n\nExample\n-------\nsoftware_install:\n origin:\n files:\n - /home/user/viptela-20.3.4-x86_64.tar.gz\n hostname: 10.1.1.1\n protocol: ftp # only ftp is supported\n vpn: 512\n timeout: 900\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "SoftwareInstall", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/viptela/stages.py#L36" + "folders": { + "viptela": { + "doc": "Software install\n\nStage Schema\n------------\nsoftware_install:\n origin:\n files (list): Image files location on the server.\n hostname (str): Hostname or address of the server.\n protocol (str): Protocol used for copy operation. \n vpn (int): Vpn number used to copy.\n timeout (int, optional): Copy operation timeout in seconds. Defaults to 600.\n\nExample\n-------\nsoftware_install:\n origin:\n files:\n - /home/user/viptela-20.3.4-x86_64.tar.gz\n hostname: 10.1.1.1\n protocol: ftp # only ftp is supported\n vpn: 512\n timeout: 900\n", + "module_name": "stages.viptela.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "viptela" + }, + "uid": "SoftwareInstall", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/viptela/stages.py#L36" + } } }, "StartApContainers": { - "linux": { - "wsim": { - "doc": "This stage starts the ap containers.\nStage Schema\n------------\nstart_device_containers:\n\n ap_count(str,optional): Number of APs that Wsim will simulate\n client_count(str,optional): Number of Clients that Wsim will simulate\n timeout(int,optional): timeout for the command execution\n shell_access(bool,optional): True/False for client shell access\n\nExample\n-------\nstart_ap_containers:\n ap_count: '1'\n client_count: '1'\n timeout:600\n shell_access:True\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "StartApContainers", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/linux/wsim/stages.py#L271" + "folders": { + "linux": { + "folders": { + "wsim": { + "doc": "This stage starts the ap containers.\nStage Schema\n------------\nstart_device_containers:\n\n ap_count(str,optional): Number of APs that Wsim will simulate\n client_count(str,optional): Number of Clients that Wsim will simulate\n timeout(int,optional): timeout for the command execution\n shell_access(bool,optional): True/False for client shell access\n\nExample\n-------\nstart_ap_containers:\n ap_count: '1'\n client_count: '1'\n timeout:600\n shell_access:True\n", + "module_name": "stages.linux.wsim.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "wsim" + }, + "uid": "StartApContainers", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/linux/wsim/stages.py#L271" + } + }, + "tokens": { + "origin": "linux" + } } } }, "TftpBoot": { - "iosxe": { - "cat9k": { - "doc": "This stage boots a new image onto your device using the tftp booting\nmethod.\n\nStage Schema\n------------\ntftp_boot:\n\n image (list): Image to boot with\n\n ip_address (list): Management ip address to configure to reach to the\n tftp server\n\n subnet_mask (str): Management subnet mask\n\n gateway (str): Management gateway\n\n tftp_server (str): Tftp server that is reachable with management interface\n\n recovery_password (str): Enable password for device\n required after bootup. Defaults to None.\n\n recovery_username (str): Enable username for device\n required after bootup. Defaults to None.\n\n save_system_config (bool, optional): Whether or not to save the\n system config if it was modified. Defaults to True.\n\n timeout (int, optional): Max time during which tftp boot must\n complete. Defaults to 1000 seconds.\n\n image_length_limit(int, optional): Maximum length of characters for image.\n Defaults to 110.\n\nExample\n-------\ntftp_boot:\n image:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n ip_address: [10.1.7.126, 10.1.7.127]\n gateway: 10.1.7.1\n subnet_mask: 255.255.255.0\n tftp_server: 11.1.7.251\n recovery_password: nbv_12345\n recovery_username: user_123\n save_system_config: False\n timeout: 1000\n image_length_limit: 90\n\nThere is more than one ip address, one for each supervisor.\n", - "module_name": "stages.stages", + "folders": { + "iosxe": { + "doc": "This stage boots a new image onto your device using the tftp booting\nmethod.\n\nStage Schema\n------------\ntftp_boot:\n\n image (list): Image to boot with\n\n ip_address (list): Management ip address to configure to reach to the\n tftp server\n\n subnet_mask (str): Management subnet mask\n\n gateway (str): Management gateway\n\n tftp_server (str): Tftp server that is reachable with management interface\n\n recovery_password (str): Enable password for device\n required after bootup. Defaults to None.\n\n recovery_en_password (str): Enable password for device\n required after bootup. Defaults to None.\n\n recovery_username (str): Enable username for device\n required after bootup. Defaults to None.\n\n save_system_config (bool, optional): Whether or not to save the\n system config if it was modified. Defaults to True.\n\n timeout (int, optional): Max time during which tftp boot must\n complete. Defaults to 600.\n\n config_reg_timeout (int, optional): Max time to set config-register.\n Defaults to 30.\n\n image_length_limit(int, optional): Maximum length of characters for image.\n Defaults to 110.\n\n ether_port(int, optional): port to set for tftp boot. Defaults to None.\n\nExample\n-------\ntftp_boot:\n image:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n ip_address: [10.1.7.126, 10.1.7.127]\n gateway: 10.1.7.1\n subnet_mask: 255.255.255.0\n tftp_server: 11.1.7.251\n recovery_password: nbv_12345\n recovery_username: user_12345\n recovery_en_password: en\n save_system_config: False\n timeout: 600\n config_reg_timeout: 10\n image_length_limit: 90\n ether_port: 0\n\nThere is more than one ip address, one for each supervisor.\n", + "folders": { + "cat9k": { + "doc": "This stage boots a new image onto your device using the tftp booting\nmethod.\n\nStage Schema\n------------\ntftp_boot:\n\n image (list): Image to boot with\n\n ip_address (list): Management ip address to configure to reach to the\n tftp server\n\n subnet_mask (str): Management subnet mask\n\n gateway (str): Management gateway\n\n tftp_server (str): Tftp server that is reachable with management interface\n\n recovery_password (str): Enable password for device\n required after bootup. Defaults to None.\n\n recovery_username (str): Enable username for device\n required after bootup. Defaults to None.\n\n save_system_config (bool, optional): Whether or not to save the\n system config if it was modified. Defaults to True.\n\n timeout (int, optional): Max time during which tftp boot must\n complete. Defaults to 1000 seconds.\n\n image_length_limit(int, optional): Maximum length of characters for image.\n Defaults to 110.\n\nExample\n-------\ntftp_boot:\n image:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n ip_address: [10.1.7.126, 10.1.7.127]\n gateway: 10.1.7.1\n subnet_mask: 255.255.255.0\n tftp_server: 11.1.7.251\n recovery_password: nbv_12345\n recovery_username: user_123\n save_system_config: False\n timeout: 1000\n image_length_limit: 90\n\nThere is more than one ip address, one for each supervisor.\n", + "module_name": "stages.iosxe.cat9k.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "cat9k" + }, + "uid": "TftpBoot", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py#L91" + }, + "sdwan": { + "doc": "This stage boots a new image onto your device using the tftp booting\n method.\n\nStage Schema\n------------\ntftp_boot:\n\n image (list): Image to boot with\n\n ip_address (list): Management ip address to configure to reach to the tftp server\n\n subnet_mask (str): Management subnet mask\n\n gateway (str): Management gateway\n\n tftp_server (str): Tftp server that is reachable with management interface\n\n device_managed_mode (str, optional): Specify mode 'controller' or 'autonomous'\n Defaults to 'autonomous'\n\n recovery_password (str, optional): Enable password for device\n required after bootup. Defaults to None.\n\n timeout (int, optional): Max time during which tftp boot must\n complete. Defaults to 600.\n\n config_reg_timeout (int, optional): Max time to set config-register.\n Defaults to 30.\n\nExample\n-------\ntftp_boot:\n image:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n ip_address: [10.1.7.126, 10.1.7.127]\n gateway: 10.1.7.1\n subnet_mask: 255.255.255.0\n tftp_server: 11.1.7.251\n device_managed_mode: autonomous\n recovery_password: nbv_12345\n timeout: 600\n config_reg_timeout: 10\n\nThere is more than one ip address, one for each supervisor.\n", + "module_name": "stages.iosxe.sdwan.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "sdwan" + }, + "uid": "TftpBoot", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/stages.py#L395" + } + }, + "module_name": "stages.iosxe.stages", "package": "genie.libs.clean", + "tokens": { + "os": "iosxe" + }, "uid": "TftpBoot", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py#L91" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L193" }, - "doc": "This stage boots a new image onto your device using the tftp booting\nmethod.\n\nStage Schema\n------------\ntftp_boot:\n\n image (list): Image to boot with\n\n ip_address (list): Management ip address to configure to reach to the\n tftp server\n\n subnet_mask (str): Management subnet mask\n\n gateway (str): Management gateway\n\n tftp_server (str): Tftp server that is reachable with management interface\n\n recovery_password (str): Enable password for device\n required after bootup. Defaults to None.\n\n recovery_en_password (str): Enable password for device\n required after bootup. Defaults to None.\n\n recovery_username (str): Enable username for device\n required after bootup. Defaults to None.\n\n save_system_config (bool, optional): Whether or not to save the\n system config if it was modified. Defaults to True.\n\n timeout (int, optional): Max time during which tftp boot must\n complete. Defaults to 600.\n\n config_reg_timeout (int, optional): Max time to set config-register.\n Defaults to 30.\n\n image_length_limit(int, optional): Maximum length of characters for image.\n Defaults to 110.\n\n ether_port(int, optional): port to set for tftp boot. Defaults to None.\n\nExample\n-------\ntftp_boot:\n image:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n ip_address: [10.1.7.126, 10.1.7.127]\n gateway: 10.1.7.1\n subnet_mask: 255.255.255.0\n tftp_server: 11.1.7.251\n recovery_password: nbv_12345\n recovery_username: user_12345\n recovery_en_password: en\n save_system_config: False\n timeout: 600\n config_reg_timeout: 10\n image_length_limit: 90\n ether_port: 0\n\nThere is more than one ip address, one for each supervisor.\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "sdwan": { - "doc": "This stage boots a new image onto your device using the tftp booting\n method.\n\nStage Schema\n------------\ntftp_boot:\n\n image (list): Image to boot with\n\n ip_address (list): Management ip address to configure to reach to the tftp server\n\n subnet_mask (str): Management subnet mask\n\n gateway (str): Management gateway\n\n tftp_server (str): Tftp server that is reachable with management interface\n\n device_managed_mode (str, optional): Specify mode 'controller' or 'autonomous'\n Defaults to 'autonomous'\n\n recovery_password (str, optional): Enable password for device\n required after bootup. Defaults to None.\n\n timeout (int, optional): Max time during which tftp boot must\n complete. Defaults to 600.\n\n config_reg_timeout (int, optional): Max time to set config-register.\n Defaults to 30.\n\nExample\n-------\ntftp_boot:\n image:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n ip_address: [10.1.7.126, 10.1.7.127]\n gateway: 10.1.7.1\n subnet_mask: 255.255.255.0\n tftp_server: 11.1.7.251\n device_managed_mode: autonomous\n recovery_password: nbv_12345\n timeout: 600\n config_reg_timeout: 10\n\nThere is more than one ip address, one for each supervisor.\n", - "module_name": "stages.stages", + "iosxr": { + "doc": "This stage boots a new image onto your device using the tftp booting\nmethod.\n\nStage Schema\n------------\ntftp_boot:\n\n image (list): Image to boot with\n\n ip_address (list): Management ip address to configure to reach to the\n tftp server\n\n subnet_mask (str): Management subnet mask\n\n gateway (str): Management gateway\n\n tftp_server (str): Tftp server that is reachable with management interface\n\n timeout (int, optional): Max time during which tftp boot must\n complete. Defaults to 600.\n\n config_reg_timeout (int, optional): Max time to set config-register.\n Defaults to 30.\n\n device_reload_sleep (int, optional): Time in seconds to wait after\n reloading the device. Defaults to 20.\n\n recovery_username (str, optional): Enable username for device\n required after bootup. Defaults to None.\n\n recovery_password (str, optional): Enable password for device\n required after bootup. Defaults to None.\n\nExample\n-------\ntftp_boot:\n image:\n - /auto/some-location/that-this/image/asr9k-mini-px.vm\n ip_address: [10.1.7.126, 10.1.7.127]\n gateway: 10.1.7.1\n subnet_mask: 255.255.255.0\n tftp_server: 11.1.7.251\n timeout: 1200\n config_reg_timeout: 60\n device_reload_sleep: 300\n recovery_username: admin\n recovery_password: nbv_12345\n\nNote: There is more than one ip address, one for each supervisor.\n", + "module_name": "stages.iosxr.stages", "package": "genie.libs.clean", + "tokens": { + "os": "iosxr" + }, "uid": "TftpBoot", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/stages.py#L395" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/stages.py#L155" }, - "uid": "TftpBoot", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py#L189" - }, - "iosxr": { - "doc": "This stage boots a new image onto your device using the tftp booting\nmethod.\n\nStage Schema\n------------\ntftp_boot:\n\n image (list): Image to boot with\n\n ip_address (list): Management ip address to configure to reach to the\n tftp server\n\n subnet_mask (str): Management subnet mask\n\n gateway (str): Management gateway\n\n tftp_server (str): Tftp server that is reachable with management interface\n\n timeout (int, optional): Max time during which tftp boot must\n complete. Defaults to 600.\n\n config_reg_timeout (int, optional): Max time to set config-register.\n Defaults to 30.\n\n device_reload_sleep (int, optional): Time in seconds to wait after\n reloading the device. Defaults to 20.\n\n recovery_username (str, optional): Enable username for device\n required after bootup. Defaults to None.\n\n recovery_password (str, optional): Enable password for device\n required after bootup. Defaults to None.\n\nExample\n-------\ntftp_boot:\n image:\n - /auto/some-location/that-this/image/asr9k-mini-px.vm\n ip_address: [10.1.7.126, 10.1.7.127]\n gateway: 10.1.7.1\n subnet_mask: 255.255.255.0\n tftp_server: 11.1.7.251\n timeout: 1200\n config_reg_timeout: 60\n device_reload_sleep: 300\n recovery_username: admin\n recovery_password: nbv_12345\n\nNote: There is more than one ip address, one for each supervisor.\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "TftpBoot", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/stages.py#L155" - }, - "nxos": { - "doc": "This stage boots a new image onto your device using the tftp booting method.\n\nStage Schema\n------------\ntftp_boot:\n\n image (str): Image to boot the device with\n\n ip_address (str): The management IP address that will be configured in order\n to reach the TFTP server.\n\n subnet_mask (str): The management subnet mask that will be configured in\n order to reach the TFTP server.\n\n gateway (str): The management gateway that will be configured in order\n to reach the TFTP server.\n\n tftp_server (str): The TFTP server that is reachable through the management\n interface.\n\n timeout (int): The maximum time allowed in seconds to complete the tftp\n booting process.\n\n reboot_delay (int, optional): Time in seconds to sleep after sending the\n reboot command. Defaults to 20.\n\n reconnect_delay (int, optional): Time is seconds to sleep before reconnecting\n after the device has come up. Defaults to 60.\n\nExample:\n--------\ntftp_boot:\n image:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n ip_address: [10.1.7.126, 10.1.7.127]\n gateway: 10.1.7.1\n subnet_mask: 255.255.255.0\n tftp_server: 11.1.7.251\n\nThere is more than one ip address, one for each supervisor.\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "TftpBoot", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/stages.py#L212" + "nxos": { + "doc": "This stage boots a new image onto your device using the tftp booting method.\n\nStage Schema\n------------\ntftp_boot:\n\n image (str): Image to boot the device with\n\n ip_address (str): The management IP address that will be configured in order\n to reach the TFTP server.\n\n subnet_mask (str): The management subnet mask that will be configured in\n order to reach the TFTP server.\n\n gateway (str): The management gateway that will be configured in order\n to reach the TFTP server.\n\n tftp_server (str): The TFTP server that is reachable through the management\n interface.\n\n timeout (int): The maximum time allowed in seconds to complete the tftp\n booting process.\n\n reboot_delay (int, optional): Time in seconds to sleep after sending the\n reboot command. Defaults to 20.\n\n reconnect_delay (int, optional): Time is seconds to sleep before reconnecting\n after the device has come up. Defaults to 60.\n\nExample:\n--------\ntftp_boot:\n image:\n - /auto/some-location/that-this/image/stay-isr-image.bin\n ip_address: [10.1.7.126, 10.1.7.127]\n gateway: 10.1.7.1\n subnet_mask: 255.255.255.0\n tftp_server: 11.1.7.251\n\nThere is more than one ip address, one for each supervisor.\n", + "module_name": "stages.nxos.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "nxos" + }, + "uid": "TftpBoot", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/stages.py#L212" + } } }, "VerifyAccessTunnelSummary": { - "iosxe": { - "cat9k": { - "doc": " This stage checks the wireless process.\n\n Stage Schema\n ------------\n verify_access_tunnel_summary:\n\n ap_name(str): accesspoint name\n ap_ip(str): accesspoint IP\n rloc_ip(str): rloc IP\n\n Examples:\n verify_access_tunnel_summary:\n ap_name: \"Ac0\"\n ap_ip: \"70.201.2.152\"\n rloc_ip: \"70.1.1.1\"\n ", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "VerifyAccessTunnelSummary", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py#L576" + "folders": { + "iosxe": { + "folders": { + "cat9k": { + "doc": " This stage checks the wireless process.\n\n Stage Schema\n ------------\n verify_access_tunnel_summary:\n\n ap_name(str): accesspoint name\n ap_ip(str): accesspoint IP\n rloc_ip(str): rloc IP\n\n Examples:\n verify_access_tunnel_summary:\n ap_name: \"Ac0\"\n ap_ip: \"70.201.2.152\"\n rloc_ip: \"70.1.1.1\"\n ", + "module_name": "stages.iosxe.cat9k.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "cat9k" + }, + "uid": "VerifyAccessTunnelSummary", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py#L576" + } + }, + "tokens": { + "os": "iosxe" + } } } }, "VerifyApAssociation": { - "iosxe": { - "c9800": { - "doc": " This stage verifies the given access point has configured.\n\n Stage Schema\n ------------\n verify_accesspoint_association:\n\n access_points(list):access_point to be verified if present\n\n Examples:\n verify_accesspoint_association:\n access_points:\n - \"AP188B.4500.44C8\" \n ", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "VerifyApAssociation", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/stages.py#L87" + "folders": { + "iosxe": { + "folders": { + "cat9k": { + "folders": { + "c9800": { + "doc": " This stage verifies the given access point has configured.\n\n Stage Schema\n ------------\n verify_accesspoint_association:\n\n access_points(list):access_point to be verified if present\n\n Examples:\n verify_accesspoint_association:\n access_points:\n - \"AP188B.4500.44C8\" \n ", + "module_name": "stages.iosxe.cat9k.c9800.stages", + "package": "genie.libs.clean", + "tokens": { + "model": "c9800", + "platform": "cat9k" + }, + "uid": "VerifyApAssociation", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800/stages.py#L87" + } + }, + "tokens": { + "platform": "cat9k" + } + } + }, + "tokens": { + "os": "iosxe" + } } } }, "VerifyApFabricSummary": { - "iosxe": { - "cat9k": { - "doc": " This stage checks the fabric summary.\n\n Stage Schema\n ------------\n verify_ap_fabric_summary:\n\n ap_list(str):access point list\n\n Examples:\n verify_ap_fabric_summary:\n ap_list: [\"AP188B.4500.44C8\", \"AP188B.4500.55C8\"]\n\n ", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "VerifyApFabricSummary", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py#L463" + "folders": { + "iosxe": { + "folders": { + "cat9k": { + "doc": " This stage checks the fabric summary.\n\n Stage Schema\n ------------\n verify_ap_fabric_summary:\n\n ap_list(str):access point list\n\n Examples:\n verify_ap_fabric_summary:\n ap_list: [\"AP188B.4500.44C8\", \"AP188B.4500.55C8\"]\n\n ", + "module_name": "stages.iosxe.cat9k.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "cat9k" + }, + "uid": "VerifyApFabricSummary", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py#L463" + } + }, + "tokens": { + "os": "iosxe" + } } } }, "VerifyApMode": { - "iosxe": { - "c9800": { - "doc": " This stage verifies the mode of a given access point.\n\n Stage Schema\n ------------\n verify_accesspoint_mode:\n\n access_points(list):mode of a given access_point\n ap_mode(str,optional):mode of accesspoint (i.e: local or flexmode)\n\n Examples:\n verify_accesspoint_mode:\n access_point:\n - \"AP188B.4500.44C8\"\n ap_mode:\"local\"\n ", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "VerifyApMode", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/stages.py#L22" + "folders": { + "iosxe": { + "folders": { + "cat9k": { + "folders": { + "c9800": { + "doc": " This stage verifies the mode of a given access point.\n\n Stage Schema\n ------------\n verify_accesspoint_mode:\n\n access_points(list):mode of a given access_point\n ap_mode(str,optional):mode of accesspoint (i.e: local or flexmode)\n\n Examples:\n verify_accesspoint_mode:\n access_point:\n - \"AP188B.4500.44C8\"\n ap_mode:\"local\"\n ", + "module_name": "stages.iosxe.cat9k.c9800.stages", + "package": "genie.libs.clean", + "tokens": { + "model": "c9800", + "platform": "cat9k" + }, + "uid": "VerifyApMode", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800/stages.py#L22" + } + }, + "tokens": { + "platform": "cat9k" + } + } + }, + "tokens": { + "os": "iosxe" + } } } }, "VerifyApRunState": { - "linux": { - "wsim": { - "doc": "This stage starts the ap containers.\nStage Schema\n------------\nverify_ap_run_state:\n ap_count(str): Number of Aps that were being verified\n max_time(int,optional): 600\nExample\n-------\nverify_ap_run_state:\n ap_count: '5'\n max_time: 600\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "VerifyApRunState", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/linux/wsim/stages.py#L340" + "folders": { + "linux": { + "folders": { + "wsim": { + "doc": "This stage starts the ap containers.\nStage Schema\n------------\nverify_ap_run_state:\n ap_count(str): Number of Aps that were being verified\n max_time(int,optional): 600\nExample\n-------\nverify_ap_run_state:\n ap_count: '5'\n max_time: 600\n", + "module_name": "stages.linux.wsim.stages", + "package": "genie.libs.clean", + "tokens": { + "os": "wsim" + }, + "uid": "VerifyApRunState", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/linux/wsim/stages.py#L340" + } + }, + "tokens": { + "origin": "linux" + } } } }, "VerifyHaState": { - "iosxe": { - "c9800": { - "doc": " This stage verifies the if HA pair has formed successfully\n\n Stage Schema\n ------------\n verify_ha_state:\n\n Examples:\n verify_ha_state:\n ", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "VerifyHaState", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/stages.py#L315" + "folders": { + "iosxe": { + "folders": { + "cat9k": { + "folders": { + "c9800": { + "doc": " This stage verifies the if HA pair has formed successfully\n\n Stage Schema\n ------------\n verify_ha_state:\n\n Examples:\n verify_ha_state:\n ", + "module_name": "stages.iosxe.cat9k.c9800.stages", + "package": "genie.libs.clean", + "tokens": { + "model": "c9800", + "platform": "cat9k" + }, + "uid": "VerifyHaState", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800/stages.py#L315" + } + }, + "tokens": { + "platform": "cat9k" + } + } + }, + "tokens": { + "os": "iosxe" + } } } }, "VerifyInstallationMode": { - "iosxe": { - "c9800": { - "doc": " This stage verifies the configured installation mode.\n\n Stage Schema\n ------------\n verify_installation_mode:\n verify_installation_mode(str):installation_mode to be verified if present\n\n Examples:\n verify_installation_mode:\n installation_mode: \"INSTALL\"\n ", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "VerifyInstallationMode", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/stages.py#L206" + "folders": { + "iosxe": { + "folders": { + "cat9k": { + "folders": { + "c9800": { + "doc": " This stage verifies the configured installation mode.\n\n Stage Schema\n ------------\n verify_installation_mode:\n verify_installation_mode(str):installation_mode to be verified if present\n\n Examples:\n verify_installation_mode:\n installation_mode: \"INSTALL\"\n ", + "module_name": "stages.iosxe.cat9k.c9800.stages", + "package": "genie.libs.clean", + "tokens": { + "model": "c9800", + "platform": "cat9k" + }, + "uid": "VerifyInstallationMode", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800/stages.py#L206" + } + }, + "tokens": { + "platform": "cat9k" + } + } + }, + "tokens": { + "os": "iosxe" + } } } }, "VerifyLispSessionEstablished": { - "iosxe": { - "cat9k": { - "doc": " This stage validates LISP session establishment.\n\n Stage Schema\n ------------\n show_lisp_session_established:\n\n peer_ip(str) : peer ip\n\n\n Examples:\n show_lisp_session_established:\n peer_ip: \"112.1.1.1\"\n\n ", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "VerifyLispSessionEstablished", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py#L519" + "folders": { + "iosxe": { + "folders": { + "cat9k": { + "doc": " This stage validates LISP session establishment.\n\n Stage Schema\n ------------\n show_lisp_session_established:\n\n peer_ip(str) : peer ip\n\n\n Examples:\n show_lisp_session_established:\n peer_ip: \"112.1.1.1\"\n\n ", + "module_name": "stages.iosxe.cat9k.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "cat9k" + }, + "uid": "VerifyLispSessionEstablished", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py#L519" + } + }, + "tokens": { + "os": "iosxe" + } } } }, "VerifyRunningImage": { - "com": { - "doc": "This stage verifies the current running image is the expected image.\nThe verification can be done by either MD5 hash comparison or by filename\ncomparison.\n\nStage Schema\n------------\nverify_running_image:\n\n images (list): Image(s) that should be running on the device. If not\n using verify_md5 then this should be the image path on the device.\n If using verify_md5 then this should be the original image location\n from the linux server.\n\n ignore_flash (bool, optional): Ignore flash directory names. Default False.\n\n verify_md5 (dict, optional): When this dictionary is defined, the image\n verification will by done by comparing the MD5 hashes of the\n running image against the expected image.\n\n hostname (str): Linux server that is used to generate the MD5\n hashes. This server must exist in the testbed servers block.\n\n timeout (int, optional): Maximum time in seconds allowed for the\n hashes to generate. Defaults to 60.\n\nExample\n-------\nverify_running_image:\n images:\n - test_image.bin\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "VerifyRunningImage", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L1775" - }, - "iosxe": { - "cat9k": { - "doc": "This stage verifies the current running image is the expected image.\nThe verification can be done by either MD5 hash comparison or by filename\ncomparison.\n\nStage Schema\n------------\nverify_running_image:\n\n images (list): Image(s) that should be running on the device. If not\n using verify_md5 then this should be the image path on the device.\n If using verify_md5 then this should be the original image location\n from the linux server.\n\n ignore_flash (bool, optional): Ignore flash directory names. Default True.\n\n verify_md5 (dict, optional): When this dictionary is defined, the image\n verification will by done by comparing the MD5 hashes of the\n running image against the expected image.\n\n hostname (str): Linux server that is used to generate the MD5\n hashes. This server must exist in the testbed servers block.\n\n timeout (int, optional): Maximum time in seconds allowed for the\n hashes to generate. Defaults to 60.\n\nExample\n-------\nverify_running_image:\n images:\n - test_image.bin\n", - "module_name": "stages.stages", + "doc": "This stage verifies the current running image is the expected image.\nThe verification can be done by either MD5 hash comparison or by filename\ncomparison.\n\nStage Schema\n------------\nverify_running_image:\n\n images (list): Image(s) that should be running on the device. If not\n using verify_md5 then this should be the image path on the device.\n If using verify_md5 then this should be the original image location\n from the linux server.\n\n ignore_flash (bool, optional): Ignore flash directory names. Default False.\n\n verify_md5 (dict, optional): When this dictionary is defined, the image\n verification will by done by comparing the MD5 hashes of the\n running image against the expected image.\n\n hostname (str): Linux server that is used to generate the MD5\n hashes. This server must exist in the testbed servers block.\n\n timeout (int, optional): Maximum time in seconds allowed for the\n hashes to generate. Defaults to 60.\n\nExample\n-------\nverify_running_image:\n images:\n - test_image.bin\n", + "folders": { + "iosxe": { + "folders": { + "cat9k": { + "doc": "This stage verifies the current running image is the expected image.\nThe verification can be done by either MD5 hash comparison or by filename\ncomparison.\n\nStage Schema\n------------\nverify_running_image:\n\n images (list): Image(s) that should be running on the device. If not\n using verify_md5 then this should be the image path on the device.\n If using verify_md5 then this should be the original image location\n from the linux server.\n\n ignore_flash (bool, optional): Ignore flash directory names. Default True.\n\n verify_md5 (dict, optional): When this dictionary is defined, the image\n verification will by done by comparing the MD5 hashes of the\n running image against the expected image.\n\n hostname (str): Linux server that is used to generate the MD5\n hashes. This server must exist in the testbed servers block.\n\n timeout (int, optional): Maximum time in seconds allowed for the\n hashes to generate. Defaults to 60.\n\nExample\n-------\nverify_running_image:\n images:\n - test_image.bin\n", + "module_name": "stages.iosxe.cat9k.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "cat9k" + }, + "uid": "VerifyRunningImage", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py#L712" + } + }, + "tokens": { + "os": "iosxe" + } + }, + "iosxr": { + "doc": "This stage verifies the current running image is the expected image.\nThe verification will be done by compare the result of 'show version' and provided\nimage name under 'images' keyword in the clean yaml file.\n\nStage Schema\n------------\nverify_running_image:\n\n images (list): Image(s) that should be running on the device. \n\nExample\n-------\nverify_running_image:\n images:\n - test_image-7.5.4.08I.ios\n", + "module_name": "stages.iosxr.stages", "package": "genie.libs.clean", + "tokens": { + "os": "iosxr" + }, "uid": "VerifyRunningImage", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py#L712" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/stages.py#L594" } }, - "iosxr": { - "doc": "This stage verifies the current running image is the expected image.\nThe verification will be done by compare the result of 'show version' and provided\nimage name under 'images' keyword in the clean yaml file.\n\nStage Schema\n------------\nverify_running_image:\n\n images (list): Image(s) that should be running on the device. \n\nExample\n-------\nverify_running_image:\n images:\n - test_image-7.5.4.08I.ios\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "VerifyRunningImage", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/stages.py#L594" - } + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "VerifyRunningImage", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L1775" }, "VerifyWirelessProcess": { - "iosxe": { - "cat9k": { - "doc": " This stage checks the wireless process.\n\n Stage Schema\n ------------\n verify_wireless_process:\n\n check_processes(str): check process\n\n Examples:\n verify_wireless_process:\n check_processes : ['wncd','wncmgrd','nmspd','rrm','rogue','fman','dbm']\n\n ", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "VerifyWirelessProcess", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py#L646" + "folders": { + "iosxe": { + "folders": { + "cat9k": { + "doc": " This stage checks the wireless process.\n\n Stage Schema\n ------------\n verify_wireless_process:\n\n check_processes(str): check process\n\n Examples:\n verify_wireless_process:\n check_processes : ['wncd','wncmgrd','nmspd','rrm','rogue','fman','dbm']\n\n ", + "module_name": "stages.iosxe.cat9k.stages", + "package": "genie.libs.clean", + "tokens": { + "platform": "cat9k" + }, + "uid": "VerifyWirelessProcess", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/stages.py#L646" + } + }, + "tokens": { + "os": "iosxe" + } } } }, "WriteErase": { - "com": { - "doc": " This stage executes 'write erase' on the device\n\nStage Schema\n------------\nwrite_erase:\n\n timeout (int, optional): Max time allowed for command to complete.\n Defaults to 300 seconds.\n\nExample\n-------\nwrite_erase:\n timeout: 100\n", - "module_name": "stages.stages", - "package": "genie.libs.clean", - "uid": "WriteErase", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L1325" - } - }, - "tokens": [ - "aci", - "aireos", - "ap", - "apic", - "c9800", - "c9800_cl", - "cat3k", - "cat9500", - "cat9k", - "cheetah", - "com", - "ios", - "iosxe", - "iosxr", - "linux", - "n9k", - "ncs540", - "nxos", - "sdwan", - "viptela", - "wsim" - ] + "doc": " This stage executes 'write erase' on the device\n\nStage Schema\n------------\nwrite_erase:\n\n timeout (int, optional): Max time allowed for command to complete.\n Defaults to 300 seconds.\n\nExample\n-------\nwrite_erase:\n timeout: 100\n", + "folders": {}, + "module_name": "stages.stages", + "package": "genie.libs.clean", + "uid": "WriteErase", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/clean-pkg/src/genie/libs/clean/stages/stages.py#L1325" + }, + "token_order": [ + "origin", + "os", + "platform", + "model", + "submodel", + "pid", + "version", + "os_flavor", + "revision" + ], + "tokens": { + "model": [ + "c9500", + "c9800" + ], + "origin": [ + "linux" + ], + "os": [ + "aireos", + "apic", + "cheetah", + "ios", + "iosxe", + "iosxr", + "nxos", + "viptela", + "wsim" + ], + "platform": [ + "aci", + "ap", + "cat3k", + "cat9k", + "n9k", + "ncs540", + "sdwan" + ], + "submodel": [ + "c9800_cl" + ] + } } \ No newline at end of file diff --git a/pkgs/clean-pkg/src/genie/libs/clean/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/__init__.py index fc75e778f..36659976b 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/__init__.py @@ -8,13 +8,13 @@ ''' # metadata -__version__ = '24.3' +__version__ = '24.4' __author__ = 'Cisco Systems Inc.' __contact__ = ['asg-genie-support@cisco.com', 'pyats-support-ext@cisco.com'] __copyright__ = 'Copyright (c) 2019, Cisco Systems Inc.' from genie import abstract -abstract.declare_package(__name__) +abstract.declare_package(feature="clean") from .clean import DeviceClean, PyatsDeviceClean, BaseStage diff --git a/pkgs/clean-pkg/src/genie/libs/clean/recovery/iosxe/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/recovery/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/recovery/iosxe/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/recovery/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/recovery/iosxe/cat3k/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/recovery/iosxe/cat3k/__init__.py index 05cdc37aa..123cc8e16 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/recovery/iosxe/cat3k/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/recovery/iosxe/cat3k/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='cat3k') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/recovery/iosxe/sdwan/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/recovery/iosxe/sdwan/__init__.py index 05cdc37aa..68ae70fca 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/recovery/iosxe/sdwan/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/recovery/iosxe/sdwan/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='sdwan') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/recovery/iosxr/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/recovery/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/recovery/iosxr/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/recovery/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/recovery/nxos/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/recovery/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/recovery/nxos/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/recovery/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/recovery/nxos/n3k/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/recovery/nxos/n3k/__init__.py index 05cdc37aa..0d6c130e0 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/recovery/nxos/n3k/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/recovery/nxos/n3k/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='n3k') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/recovery/nxos/n7k/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/recovery/nxos/n7k/__init__.py index 05cdc37aa..f493666a2 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/recovery/nxos/n7k/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/recovery/nxos/n7k/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='n7k') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/recovery/nxos/n9k/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/recovery/nxos/n9k/__init__.py index 05cdc37aa..bd708fb72 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/recovery/nxos/n9k/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/recovery/nxos/n9k/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='n9k') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/recovery/recovery.py b/pkgs/clean-pkg/src/genie/libs/clean/recovery/recovery.py index ee64dae4f..092f53cd6 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/recovery/recovery.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/recovery/recovery.py @@ -80,7 +80,7 @@ def _recovery_steps(device, clear_line=True, powercycler=True, if clear_line: log.info(banner("Clearing the console port line")) try: - device.api.execute_clear_line() + device.api.execute_clear_console() except Exception as e: log.warning(str(e)) log.warning("Unable to clear console port line") diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/aireos/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/aireos/__init__.py index 05cdc37aa..2b56efd46 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/aireos/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/aireos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='aireos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/apic/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/apic/__init__.py index 05cdc37aa..d5c9bf49d 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/apic/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/apic/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='apic') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/cheetah/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/cheetah/__init__.py index 05cdc37aa..ef9b2c7cc 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/cheetah/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/cheetah/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='cheetah') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/cheetah/ap/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/cheetah/ap/__init__.py index 05cdc37aa..897e17ae9 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/cheetah/ap/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/cheetah/ap/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='ap') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/ios/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/ios/__init__.py index 05cdc37aa..5c418e725 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/ios/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/ios/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat3k/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat3k/__init__.py index 592bb88e9..d51dcf9fa 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat3k/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat3k/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='cat3k') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) \ No newline at end of file diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/__init__.py index 05cdc37aa..a0d6227ce 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='cat9k') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9500/__init__.py similarity index 78% rename from pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/__init__.py rename to pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9500/__init__.py index 05cdc37aa..9b344ddcd 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9500/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='cat9k', model='c9500') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9500/stages.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9500/stages.py similarity index 100% rename from pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9500/stages.py rename to pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9500/stages.py diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9500/tests/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9500/tests/__init__.py similarity index 100% rename from pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9500/tests/__init__.py rename to pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9500/tests/__init__.py diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/c9800_cl/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800/__init__.py similarity index 78% rename from pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/c9800_cl/__init__.py rename to pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800/__init__.py index 05cdc37aa..46695effb 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/c9800_cl/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='cat9k', model='c9800') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/stages.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800/stages.py similarity index 100% rename from pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/stages.py rename to pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800/stages.py diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9500/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800_cl/__init__.py similarity index 76% rename from pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9500/__init__.py rename to pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800_cl/__init__.py index 05cdc37aa..4ef077a63 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9500/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800_cl/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='cat9k', submodel='c9800_cl') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/c9800_cl/stages.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800_cl/stages.py similarity index 100% rename from pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/c9800/c9800_cl/stages.py rename to pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/cat9k/c9800_cl/stages.py diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/__init__.py index 05cdc37aa..68ae70fca 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='sdwan') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/stages.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/stages.py index 264ed5531..d08560209 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/stages.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/stages.py @@ -594,10 +594,6 @@ def reload_check(device, target): 'device_managed_mode': device_managed_mode } try: - abstract = Lookup.from_device(device, - packages={'clean': clean}) - # Item is needed to be able to know in which parallel child - # device.start only gets filled with single rp devices # for multiple rp devices we need to use subconnections if device.is_ha and hasattr(device, 'subconnections'): diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/tests/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/tests/__init__.py index 05cdc37aa..e69de29bb 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/tests/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/sdwan/tests/__init__.py @@ -1,7 +0,0 @@ -# Enable abstraction using this directory name as the abstraction token -try: - from genie import abstract - abstract.declare_token(__name__) -except Exception as e: - import warnings - warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py index 438d93c12..df1f1f638 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/stages.py @@ -4,9 +4,12 @@ # Python import re +import copy +import json import time import os.path import logging +from textwrap import dedent from ipaddress import IPv4Address, IPv6Address, IPv4Interface, IPv6Interface # pyATS @@ -18,6 +21,7 @@ from genie.libs import clean from genie.libs.clean.recovery.recovery import _disconnect_reconnect from genie.utils import Dq +from genie.utils.config import Config from genie.metaparser.util.schemaengine import Optional, Required, Any, Or, ListOf from genie.utils.timeout import Timeout from genie.libs.clean import BaseStage @@ -382,7 +386,7 @@ def tftp_boot(self, steps, device, ip_address, subnet_mask, gateway, tftp_server 'image': image, 'ether_port':ether_port} try: - abstract = Lookup.from_device(device, packages={'clean': clean}) + abstract = Lookup.from_device(device, package=clean) # Item is needed to be able to know in which parallel child # device.start only gets filled with single rp devices @@ -392,7 +396,7 @@ def tftp_boot(self, steps, device, ip_address, subnet_mask, gateway, tftp_server else: start = device.start - result = pcall(abstract.clean.recovery.recovery.recovery_worker, + result = pcall(abstract.recovery.recovery.recovery_worker, start=start, ikwargs=[{'item': i} for i, _ in enumerate(start)], ckwargs= \ @@ -1629,6 +1633,9 @@ def copy_to_device(self, steps, device, origin, destination, files_to_copy = {} unknown_size = False + file_size = None + + # Check the running image if verify_running_image: # Verify the image running in the device @@ -1659,8 +1666,15 @@ def copy_to_device(self, steps, device, origin, destination, self.skipped(f"The image file provided is same as the current running image {image_version} on the device.\n\ Setting the destination image to {dest_file_path}. Skipping the copy process.") + + # try to get file size from file directly + with steps.start(f"Get filesize of '{file}'") as step: + try: + file_size = os.stat(file).st_size + except Exception: + step.passx('Failed to get file size') - if server: + if not file_size and server: # Get filesize of image files on remote server with steps.start("Get filesize of '{}' on remote server '{}'".\ format(file, server)) as step: @@ -1689,9 +1703,7 @@ def copy_to_device(self, steps, device, origin, destination, step.passed("Verified filesize of file '{}' to be " "{} bytes".format(file, file_size)) else: - with steps.start(f"Get filesize of '{file}'") as step: - file_size = os.stat(file).st_size - log.info(f'Local file has size {file_size}') + log.info(f'Local file has size {file_size}') for dest in destinations: @@ -2131,7 +2143,7 @@ def connect(self, steps, device, via=VIA, alias=ALIAS, timeout=TIMEOUT, retry_timeout.sleep() step.failed("Could not connect. Scroll up for tracebacks.") - + with steps.start(f'Checking the current state of the device: {device.name}') as step: log.info(f'Checking the current state of the device: {device.name}') @@ -2150,13 +2162,13 @@ def connect(self, steps, device, via=VIA, alias=ALIAS, timeout=TIMEOUT, state = device.state_machine.current_state except Exception as e: log.warning(f'There is no connection in device.subconnections: {e}') - + if state == "rommon": with steps.start("Setting the rommon variables") as step: log.info('Setting the rommon variables for TFTP boot') - + try: device.api.configure_rommon_tftp() except Exception as e: @@ -2175,9 +2187,9 @@ def connect(self, steps, device, via=VIA, alias=ALIAS, timeout=TIMEOUT, step.passx(f'Failed to boot device from rommon. {e}') else: log.info("Successfully booted the device from rommon.") - + # set mit to False to initialize the connection - device.default.mit=False + device.default.mit=False with steps.start("Initialize the device connection") as step: try: @@ -2186,6 +2198,182 @@ def connect(self, steps, device, via=VIA, alias=ALIAS, timeout=TIMEOUT, step.failed(f'Failed to initialize the connection. {e}') else: step.passed("Successfully connected to the device") - - + +class ResetConfiguration(BaseStage): + """ Reset device configuration by using config replace operation with a minimal configuration. + + This clean stage generates a minimal configuration from the running config and stores + it in the base_config.txt file on bootflash. Then uses configure replace command to + override the running configuration. + + If the file `base_config.txt` exists on flash, the contents will be overwritten. + +Stage Schema +------------ +reset_configuration: + timeout (int, optional): The timeout for device configuration to complete in seconds. + Defaults to 120. + +Example: + + reset_configuration: + + order: + - connect + - reset_configuration + """ + # ================= + # Argument Defaults + # ================= + TIMEOUT = 120 + + # ============ + # Stage Schema + # ============ + schema = { + Optional('timeout', description="Timeout for device configuration. Default: 120 seconds."): int, + } + + exec_order = [ + 'create_config_file', + 'reset_configuration', + 'show_running_config' + ] + + def _recurse_config_dict_to_text(self, config_dict, level=0, indent=1): + output = '' + for key, value in config_dict.items(): + if not value: + # special handling for 'quit' statements in crypto config + if key == 'quit': + output = '\n \tquit' + else: + output += '\n' + ' ' * level * indent + key + else: + output += '\n' + ' ' * level * indent + key + \ + self._recurse_config_dict_to_text(value, level + 1) + return output + + def _generate_config_text(self, config_dict): + return self._recurse_config_dict_to_text(config_dict, level=0) + + def _filter_config_dict(self, config_dict, new_config_dict, KEEP): + for k in config_dict: + for key in KEEP: + if re.search(key, k) and not KEEP[key]: + # keep everything in the section + break + elif re.search(key, k) and KEEP[key]: + # filter in section + self._filter_config_dict(config_dict[k], new_config_dict[k], KEEP[key]) + break + else: + new_config_dict.pop(k, None) + + def _generate_default_config(self, device, config_dict): + + DEFAULTS = dedent("""\ + ! + ! Last configuration change + ! + hostname {device.name} + no logging console + service timestamps debug datetime msec + service timestamps log datetime msec + """.format( + device=device + )) + + KEEP = { + '^interface GigabitEthernet0(/0)?$': { + '^vrf forwarding': {}, + '^negotiation auto': {} + }, + '^vrf definition Mgmt-(intf|vrf)': {}, + '^switch 1 provision': {}, + '^crypto pki trustpoint': {}, + '^crypto pki certificate chain': {}, + '^license boot level': {}, + '^class-map match-any system': {}, + '^policy-map system': {}, + '^interface Vlan1$': { + '^no ip address': {}, + '^shutdown': {} + }, + '^transceiver type all': {}, + '^redundancy': {}, + '^control-plane': {}, + '^spanning-tree extend system-id': {}, + '^spanning-tree mode rapid-pvst': {}, + '^diagnostic bootup level minimal': {}, + '^memory free low-watermark processor': {}, + '^boot system': {}, + '^aaa new-model': {}, + '^class-map match-any non-client-nrt-class': {}, + '^aaa session-id common': {}, + '^username': {}, + '^login on-success log': {}, + '^ip forward-protocol nd': {}, + '^ip ssh bulk-mode': {}, + '^line vty': { + '^transport input': {} + }, + '^ip http server': {}, + '^ip http secure-server': {} + } + + new_config_dict = copy.deepcopy(config_dict) + + self._filter_config_dict(config_dict, new_config_dict, KEEP) + + config_text = self._generate_config_text(new_config_dict) + + config_text = DEFAULTS + config_text + '\nend' + + return config_text + + def create_config_file(self, steps, device, timeout=TIMEOUT): + with steps.start('Getting current config') as step: + # Use lstrip to avoid stripping trailing whitespace from config lines, + # this is required for config replace to work with pki certs. + config_dict = device.api.get_running_config_dict(lstrip=True) + log.debug(json.dumps(config_dict, indent=4)) + + with steps.start('Creating minimal configuration file') as step: + config_text = self._generate_default_config(device, config_dict) + config_lines = config_text.splitlines() + + # Write the configuration into a file on the device using TCL shell. + device.tclsh() + lines = ['puts [open "base_config.txt" w+] {',] + config_lines + ['}'] + for line in lines: + device.sendline(line) + # Instead of waiting for each line to be processed, just keep + # reading the buffer. This is a lot faster and testing has shown + # this to work fine. This could be changed using a bulk approach + # like unicon configure() service if needed. + device.spawn.read_update_buffer() + # Wait until all config data has been processed by the device + device.expect(device.state_machine.get_state( + device.state_machine.current_state).pattern, timeout) + + device.enable() + + def reset_configuration(self, steps, device, timeout=TIMEOUT): + dialog = Dialog([ + [r'.*?Enter Y if you are sure you want to proceed. \? \[no]:\s*$', 'sendline(y)', None, True, False], + [r'.*?Overwriting with a file sized 50% or less than running config\'s. Proceed\? \[no]:\s*$', 'sendline(yes)', None, True, False], + ]) + + # Configure the hostname explicitly + device.configure(f'hostname {device.name}') + + with steps.start('Resetting configuration using config replace') as step: + output = device.execute('config replace bootflash:base_config.txt', reply=dialog, timeout=timeout) + if 'Rollback aborted' in output: + step.passx('Rollback aborted') + + def show_running_config(self, steps, device): + with steps.start('Capturing running config') as step: + device.execute('show running-config') diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/tests/test_reset_configuration/mock_data/iosxe/mock_data.yaml b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/tests/test_reset_configuration/mock_data/iosxe/mock_data.yaml new file mode 100644 index 000000000..0871efe17 --- /dev/null +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/tests/test_reset_configuration/mock_data/iosxe/mock_data.yaml @@ -0,0 +1,34 @@ +configure: + commands: + end: + new_state: execute + line console 0: + new_state: configure_line + no logging console: '' + prompt: FW-9300-7(config)# +configure_line: + commands: + end: + new_state: execute + exec-timeout 0: '' + prompt: FW-9300-7(config-line)# +connect: + commands: + ? '' + : new_state: execute + preface: 'Trying mock_device ... + + Connected to mock_device. + + Escape character is ''^]''.' + prompt: '' +execute: + commands: + config term: + new_state: configure + config-transaction: + new_state: configure + show version: '' + term length 0: '' + term width 0: '' + prompt: FW-9300-7# diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/tests/test_reset_configuration/test_reset_configuration.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/tests/test_reset_configuration/test_reset_configuration.py new file mode 100644 index 000000000..5d608ca65 --- /dev/null +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxe/tests/test_reset_configuration/test_reset_configuration.py @@ -0,0 +1,367 @@ +import logging +import unittest + +from unittest.mock import Mock, call + +from genie.libs.clean.stages.iosxe.stages import ResetConfiguration +from pyats.topology import loader +from pyats.aetest.steps import Steps +from pyats.results import Passed, Passx, Errored +from pyats.aetest.signals import TerminateStepSignal + +class TestIosXEConnect(unittest.TestCase): + """ Run unit testing on a mocked IOSXE cat9k device """ + + @classmethod + def setUpClass(self): + testbed = """ + devices: + FW-9300-7: + connections: + defaults: + class: unicon.Unicon + a: + command: mock_device_cli --os iosxe --mock_data_dir mock_data --state connect + protocol: unknown + os: iosxe + platform: c9300 + type: c9300 + """ + self.testbed = loader.load(testbed) + self.device = self.testbed.devices['FW-9300-7'] + self.data = """ + Building configuration... + +Current configuration : 9162 bytes +! +! Last configuration change at 22:06:12 UTC Tue Mar 19 2024 +! +version 17.15 +service timestamps debug datetime msec +service timestamps log datetime msec +! +hostname FW-9300-7 +! +! +vrf definition Mgmt-vrf + ! + address-family ipv4 + exit-address-family + ! + address-family ipv6 + exit-address-family +! +no logging console +aaa new-model +! +! +! +! +aaa session-id common +switch 1 provision c9300-24u +! +! +! +! +! +! +! +! +! +! +! +! +login on-success log +! +! +! +! +! +! +! +! +crypto pki trustpoint TP-self-signed-4016338086 + enrollment selfsigned + subject-name cn=IOS-Self-Signed-Certificate-4016338086 + revocation-check none + rsakeypair TP-self-signed-4016338086 + hash sha256 +! +crypto pki trustpoint SLA-TrustPoint + enrollment pkcs12 + revocation-check crl + hash sha256 +! +license boot level network-advantage addon dna-advantage +memory free low-watermark processor 105485 +! +diagnostic bootup level minimal +! +spanning-tree mode rapid-pvst +spanning-tree extend system-id +! +! +! +! +username admin privilege 15 password 0 Secret12345 +! +redundancy + mode sso +! +! +! +! +! +transceiver type all + monitoring +! +interface GigabitEthernet0/0 + vrf forwarding Mgmt-vrf + ip address 10.1.1.1 255.255.0.0 + negotiation auto +! +interface GigabitEthernet1/0/1 +! +interface GigabitEthernet1/0/2 +! +interface GigabitEthernet1/0/3 +! +interface GigabitEthernet1/0/4 +! +interface GigabitEthernet1/0/5 +! +interface GigabitEthernet1/0/6 +! +interface GigabitEthernet1/0/7 +! +interface GigabitEthernet1/0/8 +! +interface GigabitEthernet1/0/9 +! +interface GigabitEthernet1/0/10 +! +interface GigabitEthernet1/0/11 +! +interface GigabitEthernet1/0/12 +! +interface GigabitEthernet1/0/13 +! +interface GigabitEthernet1/0/14 +! +interface GigabitEthernet1/0/15 +! +interface GigabitEthernet1/0/16 +! +interface GigabitEthernet1/0/17 +! +interface GigabitEthernet1/0/18 +! +interface GigabitEthernet1/0/19 +! +interface GigabitEthernet1/0/20 +! +interface GigabitEthernet1/0/21 +! +interface GigabitEthernet1/0/22 +! +interface GigabitEthernet1/0/23 +! +interface GigabitEthernet1/0/24 +! +interface GigabitEthernet1/1/1 +! +interface GigabitEthernet1/1/2 +! +interface GigabitEthernet1/1/3 +! +interface GigabitEthernet1/1/4 +! +interface TenGigabitEthernet1/1/1 +! +interface TenGigabitEthernet1/1/2 +! +interface TenGigabitEthernet1/1/3 +! +interface TenGigabitEthernet1/1/4 +! +interface TenGigabitEthernet1/1/5 +! +interface TenGigabitEthernet1/1/6 +! +interface TenGigabitEthernet1/1/7 +! +interface TenGigabitEthernet1/1/8 +! +interface FortyGigabitEthernet1/1/1 +! +interface FortyGigabitEthernet1/1/2 +! +interface TwentyFiveGigE1/1/1 +! +interface TwentyFiveGigE1/1/2 +! +interface AppGigabitEthernet1/0/1 +! +interface Vlan1 + no ip address + shutdown +! +ip forward-protocol nd +ip http server +ip http secure-server +ip ssh bulk-mode 131072 +! +! +! +! +! +! +! +! +control-plane + service-policy input system-cpp-policy +! +! +! +line con 0 + exec-timeout 0 0 +line vty 0 4 + exec-timeout 0 0 + transport input all +line vty 5 31 + transport input telnet ssh +! +! +! +! +! +! +! +end +""" + + def test_reset_configuration_pass(self): + + # Make sure we have a unique Steps() object for result verification + steps = Steps() + + # And we want the following methods to be mocked to simulate the stage. + self.device.execute = Mock(return_value=self.data) + self.device.tclsh = Mock() + self.device.sendline = Mock() + self.device.spawn = Mock() + self.device.expect = Mock() + self.device.state_machine = Mock() + self.device.enable = Mock() + self.device.configure = Mock() + self.reset_configuration = ResetConfiguration() + self.reset_configuration(steps=steps, device=self.device) + + # Check the results is as expected. + self.assertEqual(Passed, steps.details[0].result) + self.device.configure.assert_has_calls([call('hostname FW-9300-7')]) + self.device.execute.assert_has_calls([call('show running-config')]) + self.device.sendline.assert_has_calls([call('puts [open "base_config.txt" w+] {')]) + config_text = """ +! +! Last configuration change +! +hostname FW-9300-7 +no logging console +service timestamps debug datetime msec +service timestamps log datetime msec +vrf definition Mgmt-vrf + address-family ipv4 + exit-address-family + address-family ipv6 +aaa new-model +aaa session-id common +switch 1 provision c9300-24u +login on-success log +crypto pki trustpoint TP-self-signed-4016338086 + enrollment selfsigned + subject-name cn=IOS-Self-Signed-Certificate-4016338086 + revocation-check none + rsakeypair TP-self-signed-4016338086 + hash sha256 +crypto pki trustpoint SLA-TrustPoint + enrollment pkcs12 + revocation-check crl + hash sha256 +license boot level network-advantage addon dna-advantage +memory free low-watermark processor 105485 +diagnostic bootup level minimal +spanning-tree mode rapid-pvst +spanning-tree extend system-id +username admin privilege 15 password 0 Secret12345 +redundancy + mode sso +transceiver type all + monitoring +interface GigabitEthernet0/0 + vrf forwarding Mgmt-vrf + negotiation auto +interface Vlan1 + no ip address + shutdown +ip forward-protocol nd +ip http server +ip http secure-server +ip ssh bulk-mode 131072 +control-plane + service-policy input system-cpp-policy +line vty 0 4 + transport input all +line vty 5 31 + transport input telnet ssh +end""" + config_lines = config_text.splitlines() + for line in config_lines: + yield self.device.sendline.assert_has_calls([call(line),]) + + def test_reset_configuration_fail__1(self): + + # Make sure we have a unique Steps() object for result verification + steps = Steps() + + data = """ + This will apply all necessary additions and deletions + to replace the current running configuration with the + contents of the specified configuration file, which is + assumed to be a complete configuration, not a partial + configuration. Enter Y if you are sure you want to proceed. ? [no]: Y + + Total number of passes: 0 + Rollback aborted + """ + + # And we want the execute method to raise an exception when called. + self.device.execute = Mock(return_value=data) + self.device.configure = Mock() + + # We expect this step to fail + self.reset_configuration = ResetConfiguration() + self.reset_configuration.reset_configuration( + steps=steps, device=self.device + ) + + # Check the overall result is as expected + self.assertEqual(Passx, steps.details[0].result) + + def test_reset_configuration_fail__2(self): + + # Make sure we have a unique Steps() object for result verification + steps = Steps() + + # And we want the execute method to raise an exception when called. + self.device.execute = Mock(side_effect=Exception) + + self.reset_configuration = ResetConfiguration() + # We expect this step to fail so make sure it raises the signal + with self.assertRaises(Exception): + self.reset_configuration( + steps=steps, device=self.device + ) + + # Check the overall result is as expected + self.assertEqual(Errored, steps.details[0].result) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/aci/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/aci/__init__.py index 05cdc37aa..c5cb26e93 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/aci/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/aci/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='aci') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/mds/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/mds/__init__.py index 05cdc37aa..8dd79823d 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/mds/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/mds/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='mds') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n3k/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n3k/__init__.py index 05cdc37aa..0d6c130e0 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n3k/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n3k/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='n3k') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n5k/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n5k/__init__.py index 05cdc37aa..f0b9d02a8 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n5k/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n5k/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='n5k') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n7k/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n7k/__init__.py index 05cdc37aa..f493666a2 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n7k/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n7k/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='n7k') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n9k/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n9k/__init__.py index 05cdc37aa..bd708fb72 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n9k/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/nxos/n9k/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='n9k') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/tests/test_configure_management.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/tests/test_configure_management.py index 590074d5f..92e371c68 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/tests/test_configure_management.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/tests/test_configure_management.py @@ -66,5 +66,5 @@ def test_configure_management_2(self): call(['vrf definition Mgmt-vrf', 'address-family ipv4', 'exit-address-family', 'address-family ipv6', 'exit-address-family']), call(['interface Gi1/0', 'vrf forwarding Mgmt-vrf', 'ip address 2.2.2.2 255.255.255.0', 'no shutdown']), call(['ip route vrf Mgmt-vrf 192.168.1.0 255.255.255.0 172.16.1.1']), - call(['ip http source-interface Gi1/0'])] + call(['ip http client source-interface Gi1/0'])] ) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/stages/viptela/__init__.py b/pkgs/clean-pkg/src/genie/libs/clean/stages/viptela/__init__.py index 05cdc37aa..76285bed4 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/stages/viptela/__init__.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/stages/viptela/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='viptela') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/tests/test_clean.py b/pkgs/clean-pkg/src/genie/libs/clean/tests/test_clean.py index ca96340b3..d3d4d1e69 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/tests/test_clean.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/tests/test_clean.py @@ -9,7 +9,7 @@ from genie.libs.clean.clean import StageSection, BaseStage, CleanTestcase, REUSE_LIMIT_MSG from genie.libs.clean.stages.image_handler import BaseImageHandler from genie.conf.base import Device - +from genie.abstract.package import AbstractTree from pyats.log.utils import banner from pyats import results @@ -82,25 +82,42 @@ def test_running_stage_methods_called(self, func1, func2): func1.assert_called_with(test=123) -class TestCleanTestcase(unittest.TestCase): - - clean_json = { +source_json = { "SomeStage": { - "iosxe": { - "package": "genie.libs.clean", - "module_name": "stages.stages", - "uid": "SomeStage", + "folders": { + "iosxe": { + "package": "genie.libs.clean", + "module_name": "stages.stages", + "uid": "SomeStage", + "tokens": { + "os": "iosxe" + } + } } }, "SomeOtherStage": { - "iosxe": { - "package": "genie.libs.clean", - "module_name": "stages.stages", - "uid": "SomeOtherStage", + "folders": { + "iosxe": { + "package": "genie.libs.clean", + "module_name": "stages.stages", + "uid": "SomeOtherStage", + "tokens": { + "os": "iosxe" + } + } } + }, + "token_order": ["os"], + "tokens": { + "os": ["iosxe"] } } +def clean_json(): + # mock load_clean_json function to return a new abstract matrix each test + return AbstractTree.from_json(source_json) + +class TestCleanTestcase(unittest.TestCase): class SomeStage(BaseStage): schema = {} @@ -114,7 +131,7 @@ def setUp(self): self.global_stage_reuse_limit = 3 - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) @mock.patch('genie.libs.clean.stages.stages.SomeStage', SomeStage, create=True) def test_discover(self): @@ -131,7 +148,7 @@ def test_discover(self): self.assertEqual(self.SomeStage, clean_testcase.stages['SomeStage']['func']) - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) @mock.patch('genie.libs.clean.stages.stages.SomeStage', SomeStage, create=True) def test_discover_with_image_handler(self): @@ -153,7 +170,7 @@ def test_discover_with_image_handler(self): clean_testcase.image_handler.update_section.assert_called_with('SomeStage') - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) @mock.patch('genie.libs.clean.stages.stages.SomeStage', SomeStage, create=True) def test_discover_custom_stage_source(self): self.device.clean = { @@ -174,7 +191,7 @@ def test_discover_custom_stage_source(self): self.assertEqual(self.SomeStage, clean_testcase.stages['SomeStage']['func']) - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) @mock.patch('genie.libs.clean.stages.stages.SomeStage', SomeStage, create=True) def test_discover_invalid_stage_schema(self): self.device.clean = { @@ -191,7 +208,7 @@ def test_discover_invalid_stage_schema(self): with self.assertRaisesRegex(ValueError, expected_msg): clean_testcase.discover() - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) def test_discover_stage_doesnt_exist_in_json(self): self.device.clean = { @@ -209,7 +226,7 @@ def test_discover_stage_doesnt_exist_in_json(self): with self.assertRaisesRegex(Exception, expected_msg): clean_testcase.discover() - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) def test_discover_stage_doesnt_exist(self): self.device.clean = { @@ -222,15 +239,14 @@ def test_discover_stage_doesnt_exist(self): global_stage_reuse_limit=self.global_stage_reuse_limit) expected_msg = r"The clean stage 'SomeStage' does not exist under the " \ - r"following abstraction tokens: \[.*\]" + r"following abstraction tokens: \{.*\}" with self.assertRaisesRegex(Exception, expected_msg): clean_testcase.discover() - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) @mock.patch('genie.libs.clean.stages.stages.SomeStage', SomeStage, create=True) def test_discover_device_recovery_not_in_yaml(self): - self.device.clean = { 'SomeStage': {}, 'order': ['SomeStage'] @@ -246,7 +262,7 @@ def test_discover_device_recovery_not_in_yaml(self): self.assertEqual(None, clean_testcase.device_recovery_processor) - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) @mock.patch('genie.libs.clean.stages.stages.SomeStage', SomeStage, create=True) def test_discover_device_recovery_in_yaml(self): @@ -270,7 +286,7 @@ def test_discover_device_recovery_in_yaml(self): self.assertIsInstance(clean_testcase.device_recovery_processor, functools.partial) - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) @mock.patch('genie.libs.clean.stages.stages.SomeStage', SomeStage, create=True) def test_iter(self): self.device.clean = { @@ -286,7 +302,7 @@ def test_iter(self): self.assertEqual('stage SomeStage', str(next(iterator))) - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) @mock.patch('genie.libs.clean.stages.stages.SomeStage', SomeStage, create=True) def test_iter_unique_stage_uids(self): self.device.clean = { @@ -305,7 +321,7 @@ def test_iter_unique_stage_uids(self): self.assertEqual('stage SomeStage(2)', str(next(iterator))) self.assertEqual('stage SomeStage(3)', str(next(iterator))) - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) @mock.patch('genie.libs.clean.stages.stages.SomeStage', SomeStage, create=True) def test_iter_device_recovery_processor(self): @@ -330,7 +346,7 @@ def test_iter_device_recovery_processor(self): stage.function.__processors__.post[0]) - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) @mock.patch('genie.libs.clean.stages.stages.SomeStage', SomeStage, create=True) def test_iter_with_image_handler(self): self.device.clean = { @@ -353,7 +369,7 @@ def test_iter_with_image_handler(self): self.assertEqual('stage SomeStage(2)', str(next(iterator))) clean_testcase.image_handler.update_section.assert_called_with('SomeStage__2', update_history=True) - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) @mock.patch('genie.libs.clean.stages.stages.SomeStage', SomeStage, create=True) def test_iter_stage_in_order_but_not_declared(self): self.device.clean = { @@ -374,7 +390,7 @@ def test_iter_stage_in_order_but_not_declared(self): @mock.patch('genie.libs.clean.clean.log') @mock.patch('genie.libs.clean.clean.aetest') - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) @mock.patch('genie.libs.clean.stages.stages.SomeStage', SomeStage, create=True) def test_iter_infinite_loop_scenario(self, mocked_aetest, mocked_log): self.device.clean = { @@ -407,7 +423,7 @@ def test_iter_infinite_loop_scenario(self, mocked_aetest, mocked_log): @mock.patch('genie.libs.clean.clean.log') @mock.patch('genie.libs.clean.clean.aetest') - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) @mock.patch('genie.libs.clean.stages.stages.SomeStage', SomeStage, create=True) def test_iter_failed_stage(self, mocked_aetest, mocked_log): self.device.clean = { @@ -440,7 +456,7 @@ def test_iter_failed_stage(self, mocked_aetest, mocked_log): self.assertEqual([['SomeStage has failed', str]], mocked_aetest.executer.goto) @mock.patch('genie.libs.clean.clean.log') - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) @mock.patch('genie.libs.clean.stages.stages.SomeStage', SomeStage, create=True) @mock.patch('genie.libs.clean.stages.stages.SomeOtherStage', SomeOtherStage, create=True) def test_iter_change_order_if_pass(self, mocked_log): @@ -473,7 +489,7 @@ def test_iter_change_order_if_pass(self, mocked_log): self.assertEqual('SomeOtherStage', stage.uid) @mock.patch('genie.libs.clean.clean.log') - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(side_effect=clean_json)) @mock.patch('genie.libs.clean.stages.stages.SomeStage', SomeStage, create=True) @mock.patch('genie.libs.clean.stages.stages.SomeOtherStage', SomeOtherStage, create=True) def test_iter_change_order_if_fail(self, mocked_log): @@ -506,7 +522,7 @@ def test_iter_change_order_if_fail(self, mocked_log): self.assertEqual('SomeOtherStage', stage.uid) - @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json)) + @mock.patch('genie.libs.clean.clean.load_clean_json', mock.Mock(return_value=clean_json())) @mock.patch('genie.libs.clean.stages.stages.SomeStage', SomeStage, create=True) def test_discover_image_handler_image_override_false(self): self.device.clean = { @@ -517,7 +533,6 @@ def test_discover_image_handler_image_override_false(self): 'override_stage_images': False }, } - clean_testcase = CleanTestcase( device=self.device, global_stage_reuse_limit=self.global_stage_reuse_limit) diff --git a/pkgs/clean-pkg/src/genie/libs/clean/tests/test_recovery.py b/pkgs/clean-pkg/src/genie/libs/clean/tests/test_recovery.py index 284818ea5..c4189afad 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/tests/test_recovery.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/tests/test_recovery.py @@ -87,7 +87,7 @@ def test_recovery_processor_recovery_failed(self): device.state_machine.go_to = Mock(side_effect=Exception) device.os = 'iosxe' device.api.device_boot_recovery = Mock() - device.api.execute_clear_line = Mock() + device.api.execute_clear_console = Mock() device.api.execute_power_cycle_device = Mock() device.is_ha = False device.log = logger @@ -99,7 +99,7 @@ def test_recovery_processor_recovery_failed(self): golden_image=['bootflash:asr1000_golden.bin'], reconnect_delay=1) device.api.device_recovery_boot.assert_called_once() - device.api.execute_clear_line.assert_called_once() + device.api.execute_clear_console.assert_called_once() device.api.execute_power_cycle_device.assert_called_once() self.assertTrue(section.parent.parameters['block_section']) @@ -114,12 +114,12 @@ def test_recovery_processor_recovery_failed_ha(self): device.state_machine.go_to = Mock(side_effect=Exception) device.os = 'iosxe' device.api.device_boot_recovery = Mock() - device.api.execute_clear_line = Mock() + device.api.execute_clear_console = Mock() device.api.execute_power_cycle_device = Mock() device.log = logger device.is_ha = True device.api.device_boot_recovery = Mock() - device.api.execute_clear_line = Mock() + device.api.execute_clear_console = Mock() sub_con_1 = sub_con_2 = MagicMock() sub_con_1.state_machine.go_to = Mock(side_effect=Exception) device.subconnections = [sub_con_1, sub_con_2] @@ -131,6 +131,6 @@ def test_recovery_processor_recovery_failed_ha(self): golden_image=['bootflash:asr1000_golden.bin'], reconnect_delay=1) device.api.device_recovery_boot.assert_called_once() - device.api.execute_clear_line.assert_called_once() + device.api.execute_clear_console.assert_called_once() device.api.execute_power_cycle_device.assert_called_once() self.assertTrue(section.parent.parameters['block_section']) \ No newline at end of file diff --git a/pkgs/clean-pkg/src/genie/libs/clean/utils.py b/pkgs/clean-pkg/src/genie/libs/clean/utils.py index 4849f2ca3..db1699212 100644 --- a/pkgs/clean-pkg/src/genie/libs/clean/utils.py +++ b/pkgs/clean-pkg/src/genie/libs/clean/utils.py @@ -16,7 +16,7 @@ # Genie from genie.libs import clean from genie.clean.extend import ExtendClean -from genie.abstract import Lookup +from genie.abstract import AbstractTree, Lookup from genie.harness.utils import load_class from genie.metaparser.util.schemaengine import Schema, Optional, Any, Or from genie.metaparser.util.exceptions import ( @@ -40,7 +40,10 @@ # Logger log = logging.getLogger(__name__) -CLEAN_PLUGIN_ENTRYPOINT = 'genie.libs.clean' +CLEAN_MODULE_NAME = 'genie.libs.clean' +CLEAN_PLUGIN_ENTRYPOINT = CLEAN_MODULE_NAME + +clean_json = None def clean_schema(schema): """decorator for defining schema""" @@ -200,8 +203,6 @@ def initialize_clean_sections(image_handler, order): for section in order: getattr(image_handler, 'update_section')(section) -clean_json = None - def load_clean_json(): """get all clean data in json file""" global clean_json @@ -210,7 +211,7 @@ def load_clean_json(): return clean_json try: - mod = importlib.import_module("genie.libs.clean") + mod = importlib.import_module(CLEAN_MODULE_NAME) functions = os.path.join(mod.__path__[0], "clean.json") except Exception: functions = "" @@ -220,28 +221,31 @@ def load_clean_json(): "are running with latest version of " "genie.libs.clean" ) - clean_json = {} + clean_json = AbstractTree() else: # Open all the parsers in json file with open(functions) as f: - clean_json = json.load(f) + json_data = json.load(f) + + clean_json = AbstractTree.from_json(json_data, + package=CLEAN_MODULE_NAME) for entry in iter_entry_points(group=CLEAN_PLUGIN_ENTRYPOINT): log.info('Loading clean APIs from {}'.format(entry.module_name)) ext = ExtendClean(entry.module_name) ext.extend() - ext.output.pop('tokens', None) log.info("{} clean API count: {}".format( entry.module_name, - len(ext.output.keys()))) + len(ext.output.keys()) - 1)) log.debug('{} clean APIs {}'.format( entry.module_name, json.dumps(ext.output, indent=4) )) - plugin_clean_data = ext.output - clean_json = merge_dict(clean_json, plugin_clean_data, update=True) + extend_matrix = AbstractTree.from_json(ext.output, + package=CLEAN_MODULE_NAME) + clean_json.update(extend_matrix) return clean_json @@ -256,62 +260,31 @@ def get_clean_function(clean_name, clean_data, device): if '_' in name or name == name.lower(): name = ''.join(word.title() for word in name.split('_')) - data = clean_data.get(name) - if data is None and name == "Powercycle": + if name == "Powercycle": # if 'powercycle' is passed for 'clean_name' argument, rather than # 'power_cycle', then resulting name is 'Powercycle'. It should be # 'PowerCycle'. Fix it here name = "PowerCycle" data = clean_data.get(name) - - if data is None: - raise Exception(f"The clean stage '{name}' does not exist in the json " - f"file") from None + + if not name in clean_data: + raise AttributeError(f"The clean stage '{name}' does not exist in the " + f"json file") from None # Load abstraction tokens - tokens = Lookup.tokens_from_device(device) - - # Start by checking the lowest level in the json using the abstraction tokens. - # For each consecutive iteration, remove the last token, checking every level - # until there is nothing left to check or a stage is found. - iterated_data = data - for i in reversed(range(1, len(tokens) + 1)): - - for token in tokens[:i]: - if token not in iterated_data: - break - - iterated_data = iterated_data[token] + tokens = Lookup.tokens_from_device(device, clean_data.order, + package=CLEAN_MODULE_NAME) - if 'module_name' in iterated_data: - # Found an abstracted stage - break - - # reset for the next iteration - iterated_data = data - - if iterated_data == data: - # The stage was not found under any of the abstraction tokens. - # Try 'com' as a last resort. - iterated_data = iterated_data.get('com', {}) - - if 'package' in iterated_data: - pkg = importlib.import_module(iterated_data['package']) - else: - pkg = clean - lookup = Lookup.from_device(device, packages={"clean": pkg}) - try: - return getattr(_get_submodule(lookup.clean, iterated_data["module_name"]), name) - except Exception: - raise Exception(f"The clean stage '{name}' does not exist under the " - f"following abstraction tokens: {['com'] + tokens}") from None + for matrix_ptr in clean_data.iter_lookup(tokens=tokens, + top=name): + try: + return matrix_ptr.load_ptr() + # found clean stage, no need to check fallbacks + except Exception: + pass -def _get_submodule(abs_mod, mods): - """recursively find the submodule""" - ret = abs_mod - for mod in mods.split('.'): - ret = getattr(ret, mod) - return ret + raise AttributeError(f"The clean stage '{name}' does not exist under the " + f"following abstraction tokens: {tokens}") from None def format_missing_key_msg(missing_list): """Beautifully populate missing keys in to human readable format @@ -511,8 +484,8 @@ def validate_clean(clean_file, testbed_file, lint=True): setattr(dev, 'clean', clean_data) try: # Get abstracted ImageHandler class - abstract = Lookup.from_device(dev, packages={'clean': clean}) - ImageHandler = abstract.clean.stages.image_handler.ImageHandler + abstract = Lookup.from_device(dev, package=clean) + ImageHandler = abstract.stages.image_handler.ImageHandler image_handler = ImageHandler(dev, dev.clean['images']) initialize_clean_sections(image_handler, clean_data['order']) except Exception as e: @@ -585,8 +558,8 @@ def remove_string_from_image(images, string): def get_image_handler(device): if device.clean.get('images'): # Get abstracted ImageHandler class - abstract = Lookup.from_device(device, packages={'clean': clean}) - ImageHandler = abstract.clean.stages.image_handler.ImageHandler + abstract = Lookup.from_device(device, package=clean) + ImageHandler = abstract.stages.image_handler.ImageHandler return ImageHandler(device, device.clean['images']) else: return None diff --git a/pkgs/sdk-pkg/src/genie/libs/sdk/apis/$ b/pkgs/conf-pkg/changelog/2024/april.rst similarity index 100% rename from pkgs/sdk-pkg/src/genie/libs/sdk/apis/$ rename to pkgs/conf-pkg/changelog/2024/april.rst diff --git a/pkgs/conf-pkg/src/genie/libs/conf/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/__init__.py index c904c11f1..1cba8f0fb 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/__init__.py @@ -12,10 +12,10 @@ ''' # metadata -__version__ = '24.3' +__version__ = '24.4' __author__ = 'Cisco Systems Inc.' __contact__ = ['pyats-support@cisco.com', 'pyats-support-ext@cisco.com'] __copyright__ = 'Copyright (c) 2018, Cisco Systems Inc.' from genie import abstract -abstract.declare_package(__name__) +abstract.declare_package(feature="conf") diff --git a/pkgs/conf-pkg/src/genie/libs/conf/acl/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/acl/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/acl/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/acl/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/arp/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/arp/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/arp/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/arp/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/bgp/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/bgp/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/bgp/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/bgp/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/bgp/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/bgp/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/bgp/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/bgp/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/bgp/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/bgp/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/bgp/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/bgp/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/bgp/nxos/rest/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/bgp/nxos/rest/__init__.py index 05cdc37aa..fe0b2dbdb 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/bgp/nxos/rest/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/bgp/nxos/rest/__init__.py @@ -1,7 +1,8 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='rest') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/community_set/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/community_set/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/community_set/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/community_set/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/device/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/device/__init__.py index 272124f1e..65160d9b1 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/device/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/device/__init__.py @@ -231,7 +231,7 @@ def __init__(self, *args, **kwargs): def get_os_specific_Interface_class(self): from genie.libs.conf.interface import Interface as xbuInterface - return xbuInterface._get_os_specific_Interface_class(self.os) + return xbuInterface._get_abstract_subclass(self) def clean_interface_name(self, interface_name): osInterface = self.get_os_specific_Interface_class() diff --git a/pkgs/conf-pkg/src/genie/libs/conf/dot1x/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/dot1x/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/dot1x/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/dot1x/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/eigrp/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/eigrp/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/eigrp/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/eigrp/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/evpn/ios/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/evpn/ios/__init__.py index 05cdc37aa..5c418e725 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/evpn/ios/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/evpn/ios/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/evpn/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/evpn/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/evpn/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/evpn/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/evpn/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/evpn/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/evpn/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/evpn/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/evpn/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/evpn/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/evpn/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/evpn/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/fdb/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/fdb/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/fdb/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/fdb/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/hsrp/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/hsrp/iosxe/__init__.py index a0308e51d..1d56870c0 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/hsrp/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/hsrp/iosxe/__init__.py @@ -1,6 +1,6 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/hsrp/iosxe/yang/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/hsrp/iosxe/yang/__init__.py index 05cdc37aa..061fad71a 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/hsrp/iosxe/yang/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/hsrp/iosxe/yang/__init__.py @@ -1,7 +1,8 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='yang') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/hsrp/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/hsrp/iosxr/__init__.py index a0308e51d..731f1d0f5 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/hsrp/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/hsrp/iosxr/__init__.py @@ -1,6 +1,6 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/hsrp/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/hsrp/nxos/__init__.py index a0308e51d..418c27320 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/hsrp/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/hsrp/nxos/__init__.py @@ -1,6 +1,6 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/igmp/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/igmp/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/igmp/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/igmp/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/igmp/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/igmp/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/igmp/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/igmp/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/igmp/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/igmp/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/igmp/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/igmp/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/interface/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/interface/__init__.py index a3cccdc28..95ba7115d 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/interface/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/interface/__init__.py @@ -62,32 +62,6 @@ class Medium(Option): p2p = 'p2p' broadcast = 'broadcast' -def _get_descendent_subclass(cls, subcls): - '''Find the descendent class of cls that is a subclass of subcls.''' - found_subclasses = set() - subclasses_walked = set() - subclasses_to_walk = [cls] - while subclasses_to_walk: - cls = subclasses_to_walk.pop(0) - if cls in subclasses_walked: - continue - else: - subclasses_walked.add(cls) - if issubclass(cls, subcls): - found_subclasses.add(cls) - else: - subclasses_to_walk.extend(cls.__subclasses__()) - if not found_subclasses: - raise TypeError('No %r specific subclass of %r found.' % ( - subcls.__qualname__, cls.__qualname__)) - if len(found_subclasses) > 1: - raise TypeError('Too many %r specific subclass of %r found: %r' % ( - subcls.__qualname__, cls.__qualname__, found_subclasses)) - cls = found_subclasses.pop() - return cls - - - class UnsupportedInterfaceOsWarning(UserWarning): pass @@ -547,63 +521,6 @@ def generate_sub_interface(self, range=None, **kwargs): range=range) return Interface(device=self.device, name=name, **kwargs) - @classmethod - def _get_os_specific_Interface_class(cls, os): - assert type(os) is str - if False: - # XXXJST TODO The abstract module needs to be enhanced. - # Use it's API to perform a fast(cached) os-specific only lookup - # without instantiating a Lookup instance everytime and be able to - # work on classes / class methods. - from genie.abstract import Lookup - lib = Lookup(os) - osInterface = lib.conf.interface.Interface - if osInterface is Interface: - raise ImportError( - 'No Interface class found specific to OS {os!r}' \ - .format(os=os)) - - else: - mod = 'genie.libs.conf.interface.{os}'.\ - format(os=os) - OsInterfaceModule = importlib.import_module(mod) - osInterface = OsInterfaceModule.Interface - return osInterface - - def __new__(cls, *args, **kwargs): - - factory_cls = cls - if factory_cls is Interface: - # need to load the correct interface for the right os. - if 'device' in kwargs: - device = kwargs['device'] - if not device.os and 'os' in kwargs['device'].__dict__: - device.os = kwargs['device'].__dict__['os'] - if device.os is None: - log.debug("Cannot convert interfaces for " - "device '{dev}' as mandatory field " - "'os' was not given in the " - "yaml file".format(dev=device.name)) - device.os = 'generic' - - try: - factory_cls = cls._get_os_specific_Interface_class(device.os) - except (ImportError, AttributeError): - # it does not exist, then just use the default one, - # but configuration is not possible - pass - - elif not cls.device: - raise TypeError('\'device\' argument missing') - - if factory_cls is not cls: - self = factory_cls.__new__(factory_cls, *args, **kwargs) - elif super().__new__ is object.__new__: - self = super().__new__(factory_cls) - else: - self = super().__new__(factory_cls, *args, **kwargs) - return self - def __init__(self, *args, **kwargs): '''Base initialization for all Interface subclasses. @@ -913,9 +830,7 @@ def generate_interface(cls, device, range=None, **kwargs): def _generate_unused_interface_name(cls, device, range=None): assert isinstance(device, Device) # Find the os-specific version of this class - cls = _get_descendent_subclass( - cls._get_os_specific_Interface_class(device.os), - cls) + cls = cls._get_abstract_subclass(device) # Determine the interface name type interface_name_types = set(cls.__dict__.get('_interface_name_types', ())) @@ -1337,9 +1252,7 @@ def _generate_unused_sub_interface_name(cls, parent_interface, range=None): assert isinstance(parent_interface, BaseInterface) device = parent_interface.device # Find the os-specific version of this class - cls = _get_descendent_subclass( - cls._get_os_specific_Interface_class(device.os), - cls) + cls = cls._get_abstract_subclass(device) parent_interface_name = parent_interface.name if range is None: @@ -1411,80 +1324,9 @@ class TunnelTeInterface(TunnelInterface): _interface_name_number_range = range(0, 65535 + 1) - def __new__(cls, *args, **kwargs): - - factory_cls = cls - if factory_cls is TunnelTeInterface: - # need to load the correct interface for the right os. - if 'device' not in kwargs: - raise TypeError('\'device\' argument missing') - device = kwargs['device'] - if device.os is None: - log.debug("Cannot convert interfaces for " - "device '{dev}' as mandatory field " - "'os' was not given in the " - "yaml file".format(dev=device.name)) - device.os = 'generic' - try: - factory_cls = _get_descendent_subclass( - factory_cls._get_os_specific_Interface_class(device.os), - factory_cls) - except (ImportError, AttributeError, TypeError) as e: - # it does not exist, then just use the default one, - # but configuration is not possible - warnings.warn( - 'TunnelTeInterfaces for {dev} OS {os!r} are not' - ' supported; Configuration will not be available:' - ' {e}'.format( - dev=device.name, os=device.os, e=e), - UnsupportedInterfaceOsWarning) - - if factory_cls is not cls: - self = factory_cls.__new__(factory_cls, *args, **kwargs) - elif super().__new__ is object.__new__: - self = super().__new__(factory_cls) - else: - self = super().__new__(factory_cls, *args, **kwargs) - return self - class NamedTunnelTeInterface(NamedTunnelInterface, TunnelTeInterface): - - def __new__(cls, *args, **kwargs): - - factory_cls = cls - if factory_cls is NamedTunnelTeInterface: - # need to load the correct interface for the right os. - if 'device' not in kwargs: - raise TypeError('\'device\' argument missing') - device = kwargs['device'] - if device.os is None: - log.debug("Cannot convert interfaces for " - "device '{dev}' as mandatory field " - "'os' was not given in the " - "yaml file".format(dev=device.name)) - device.os = 'generic' - try: - factory_cls = _get_descendent_subclass( - factory_cls._get_os_specific_Interface_class(device.os), - factory_cls) - except (ImportError, AttributeError, TypeError) as e: - # it does not exist, then just use the default one, - # but configuration is not possible - warnings.warn( - 'NamedTunnelTeInterfaces for {dev} OS {os!r} are not' - ' supported; Configuration will not be available:' - ' {e}'.format( - dev=device.name, os=device.os, e=e), - UnsupportedInterfaceOsWarning) - - if factory_cls is not cls: - self = factory_cls.__new__(factory_cls, *args, **kwargs) - elif super().__new__ is object.__new__: - self = super().__new__(factory_cls) - else: - self = super().__new__(factory_cls, *args, **kwargs) - return self + pass class BviInterface(VirtualInterface): diff --git a/pkgs/conf-pkg/src/genie/libs/conf/interface/hltapi/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/interface/hltapi/__init__.py index b359d3234..08aa1144a 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/interface/hltapi/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/interface/hltapi/__init__.py @@ -1,7 +1,8 @@ from .interface import * try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(os='hltapi') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/interface/ios/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/interface/ios/__init__.py index b359d3234..eb0957b7d 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/interface/ios/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/interface/ios/__init__.py @@ -1,7 +1,7 @@ from .interface import * try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/interface/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/interface/iosxe/__init__.py index 6a6e8ee50..0045db70f 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/interface/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/interface/iosxe/__init__.py @@ -3,7 +3,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/interface/iosxe/yang/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/interface/iosxe/yang/__init__.py index 2dc56af6c..07b9bf216 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/interface/iosxe/yang/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/interface/iosxe/yang/__init__.py @@ -1,7 +1,8 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='yang') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/interface/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/interface/iosxr/__init__.py index b359d3234..e1931f7c2 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/interface/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/interface/iosxr/__init__.py @@ -1,7 +1,7 @@ from .interface import * try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/interface/iosxr/yang/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/interface/iosxr/yang/__init__.py index 2dc56af6c..07b9bf216 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/interface/iosxr/yang/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/interface/iosxr/yang/__init__.py @@ -1,7 +1,8 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='yang') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/interface/ixia/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/interface/ixia/__init__.py index b359d3234..e46561c7f 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/interface/ixia/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/interface/ixia/__init__.py @@ -1,7 +1,8 @@ from .interface import * try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(os='ixia') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/interface/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/interface/nxos/__init__.py index b359d3234..8fbdaef46 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/interface/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/interface/nxos/__init__.py @@ -1,7 +1,7 @@ from .interface import * try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/interface/nxos/rest/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/interface/nxos/rest/__init__.py index 05cdc37aa..fe0b2dbdb 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/interface/nxos/rest/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/interface/nxos/rest/__init__.py @@ -1,7 +1,8 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='rest') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/interface/pagent/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/interface/pagent/__init__.py index b359d3234..67c76a318 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/interface/pagent/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/interface/pagent/__init__.py @@ -1,7 +1,8 @@ from .interface import * try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(os='pagent') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/interface/spirent/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/interface/spirent/__init__.py index b359d3234..da2c5d558 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/interface/spirent/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/interface/spirent/__init__.py @@ -1,7 +1,8 @@ from .interface import * try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(os='spirent') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/isis/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/isis/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100755 --- a/pkgs/conf-pkg/src/genie/libs/conf/isis/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/isis/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/isis/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/isis/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/isis/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/isis/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/isis/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/isis/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/isis/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/isis/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/keychains/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/keychains/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/keychains/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/keychains/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/l2vpn/ios/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/l2vpn/ios/__init__.py index 05cdc37aa..5c418e725 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/l2vpn/ios/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/l2vpn/ios/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/l2vpn/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/l2vpn/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/l2vpn/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/l2vpn/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/l2vpn/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/l2vpn/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/l2vpn/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/l2vpn/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/l2vpn/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/l2vpn/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/l2vpn/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/l2vpn/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/ldp/ios/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/ldp/ios/__init__.py index 05cdc37aa..5c418e725 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/ldp/ios/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/ldp/ios/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/ldp/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/ldp/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/ldp/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/ldp/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/ldp/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/ldp/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/ldp/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/ldp/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/ldp/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/ldp/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/ldp/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/ldp/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/lisp/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/lisp/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/lisp/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/lisp/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/lldp/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/lldp/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/lldp/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/lldp/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/mcast/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/mcast/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/mcast/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/mcast/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/mcast/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/mcast/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/mcast/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/mcast/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/mcast/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/mcast/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/mcast/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/mcast/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/mld/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/mld/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/mld/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/mld/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/mld/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/mld/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/mld/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/mld/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/msdp/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/msdp/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/msdp/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/msdp/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/nd/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/nd/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/nd/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/nd/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/ntp/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/ntp/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/ntp/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/ntp/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/ospf/gracefulrestart.py b/pkgs/conf-pkg/src/genie/libs/conf/ospf/gracefulrestart.py index 10fd9db37..73392a295 100755 --- a/pkgs/conf-pkg/src/genie/libs/conf/ospf/gracefulrestart.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/ospf/gracefulrestart.py @@ -26,7 +26,7 @@ def device(self): # ========================================================================== # GLOBAL ENUM TYPES # ========================================================================== - + class GR_TYPE(Enum): ietf = 'ietf' cisco = 'cisco' @@ -74,7 +74,7 @@ class GR_TYPE(Enum): def __eq__(self, other): if not isinstance(other, GracefulRestart): raise NotImplemented - + return (self.gr_enable, self.gr_type, self.gr_helper_enable, @@ -104,7 +104,7 @@ def __lt__(self, other): other.gr_restart_interval,\ other.gr_helper_strict_lsa_checking) return str1 < str2 - + # Overload __hash__ def __hash__(self): return hash((self.gr_enable, diff --git a/pkgs/conf-pkg/src/genie/libs/conf/ospf/ios/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/ospf/ios/__init__.py index 05cdc37aa..5c418e725 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/ospf/ios/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/ospf/ios/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/ospf/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/ospf/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/ospf/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/ospf/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/ospf/iosxe/yang/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/ospf/iosxe/yang/__init__.py index 05cdc37aa..061fad71a 100755 --- a/pkgs/conf-pkg/src/genie/libs/conf/ospf/iosxe/yang/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/ospf/iosxe/yang/__init__.py @@ -1,7 +1,8 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='yang') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/ospf/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/ospf/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/ospf/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/ospf/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/ospf/iosxr/yang/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/ospf/iosxr/yang/__init__.py index 05cdc37aa..061fad71a 100755 --- a/pkgs/conf-pkg/src/genie/libs/conf/ospf/iosxr/yang/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/ospf/iosxr/yang/__init__.py @@ -1,7 +1,8 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='yang') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/ospf/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/ospf/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/ospf/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/ospf/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/ospf/nxos/gracefulrestart.py b/pkgs/conf-pkg/src/genie/libs/conf/ospf/nxos/gracefulrestart.py index ee06739cb..9a0c046ce 100755 --- a/pkgs/conf-pkg/src/genie/libs/conf/ospf/nxos/gracefulrestart.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/ospf/nxos/gracefulrestart.py @@ -1,4 +1,4 @@ -''' +''' OSPF Genie Conf Object Implementation for NXOS: - GracefulRestart multi-line configuration implementation for NXOS - CLI ''' @@ -25,7 +25,7 @@ def build_config(self, apply=True, attributes=None, unconfig=False, # graceful-restart helper-disable # graceful-restart grace-period 50 if attributes.value('gr_enable'): - + # graceful-restart gr_str = 'graceful-restart' diff --git a/pkgs/conf-pkg/src/genie/libs/conf/ospfv3/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/ospfv3/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/ospfv3/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/ospfv3/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/ospfv3/nxos/gracefulrestart.py b/pkgs/conf-pkg/src/genie/libs/conf/ospfv3/nxos/gracefulrestart.py index 1494f9595..65887fab0 100755 --- a/pkgs/conf-pkg/src/genie/libs/conf/ospfv3/nxos/gracefulrestart.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/ospfv3/nxos/gracefulrestart.py @@ -1,4 +1,4 @@ -''' +''' OSPFv3 Genie Conf Object Implementation for NXOS: - GracefulRestart multi-line configuration implementation for NXOS - CLI ''' diff --git a/pkgs/conf-pkg/src/genie/libs/conf/pim/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/pim/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/pim/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/pim/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/pim/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/pim/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/pim/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/pim/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/pim/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/pim/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/pim/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/pim/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/prefix_list/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/prefix_list/iosxe/__init__.py index a0308e51d..1d56870c0 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/prefix_list/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/prefix_list/iosxe/__init__.py @@ -1,6 +1,6 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/prefix_list/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/prefix_list/nxos/__init__.py index a0308e51d..418c27320 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/prefix_list/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/prefix_list/nxos/__init__.py @@ -1,6 +1,6 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/rip/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/rip/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/rip/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/rip/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/route_policy/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/route_policy/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/route_policy/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/route_policy/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/route_policy/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/route_policy/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/route_policy/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/route_policy/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/route_policy/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/route_policy/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/route_policy/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/route_policy/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/routing/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/routing/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/routing/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/routing/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/rsvp/ios/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/rsvp/ios/__init__.py index 05cdc37aa..5c418e725 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/rsvp/ios/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/rsvp/ios/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/rsvp/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/rsvp/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/rsvp/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/rsvp/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/rsvp/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/rsvp/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/rsvp/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/rsvp/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/rsvp/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/rsvp/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/rsvp/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/rsvp/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/segment_routing/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/segment_routing/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/segment_routing/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/segment_routing/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/segment_routing/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/segment_routing/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/segment_routing/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/segment_routing/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/ssx/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/ssx/nxos/__init__.py index e54a28b5c..d6752aa95 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/ssx/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/ssx/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/static_routing/ios/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/static_routing/ios/__init__.py index 05cdc37aa..5c418e725 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/static_routing/ios/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/static_routing/ios/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/static_routing/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/static_routing/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/static_routing/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/static_routing/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/static_routing/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/static_routing/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/static_routing/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/static_routing/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/static_routing/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/static_routing/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/static_routing/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/static_routing/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/stp/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/stp/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/stp/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/stp/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/te/ios/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/te/ios/__init__.py index 05cdc37aa..5c418e725 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/te/ios/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/te/ios/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/te/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/te/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/te/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/te/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/te/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/te/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/te/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/te/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/te/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/te/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/te/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/te/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/tunnel_encryption/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/tunnel_encryption/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/tunnel_encryption/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/tunnel_encryption/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/vlan/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/vlan/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/vlan/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/vlan/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/vlan/iosxe/yang/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/vlan/iosxe/yang/__init__.py index 05cdc37aa..061fad71a 100755 --- a/pkgs/conf-pkg/src/genie/libs/conf/vlan/iosxe/yang/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/vlan/iosxe/yang/__init__.py @@ -1,7 +1,8 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='yang') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/vlan/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/vlan/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/vlan/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/vlan/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/vlan/iosxr/yang/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/vlan/iosxr/yang/__init__.py index 05cdc37aa..061fad71a 100755 --- a/pkgs/conf-pkg/src/genie/libs/conf/vlan/iosxr/yang/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/vlan/iosxr/yang/__init__.py @@ -1,7 +1,8 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='yang') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/vlan/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/vlan/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/vlan/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/vlan/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/vlan/nxos/vlan.py b/pkgs/conf-pkg/src/genie/libs/conf/vlan/nxos/vlan.py index e2f9353ed..20b662a37 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/vlan/nxos/vlan.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/vlan/nxos/vlan.py @@ -35,7 +35,7 @@ def build_config(self, apply=True, attributes=None, unconfig=False, # enabled_interface_vlan elif attributes.value('enabled_interface_vlan'): configurations.append_line('feature interface-vlan') - + # enabled_vn_segment_vlan_based elif attributes.value('enabled_vn_segment_vlan_based'): configurations.append_line('feature vn-segment-vlan-based') diff --git a/pkgs/conf-pkg/src/genie/libs/conf/vlan/nxos/yang/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/vlan/nxos/yang/__init__.py index 05cdc37aa..061fad71a 100755 --- a/pkgs/conf-pkg/src/genie/libs/conf/vlan/nxos/yang/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/vlan/nxos/yang/__init__.py @@ -1,7 +1,8 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='yang') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/vpc/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/vpc/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/vpc/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/vpc/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/vrf/iosxe/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/vrf/iosxe/__init__.py index 05cdc37aa..c56e2ccc3 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/vrf/iosxe/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/vrf/iosxe/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/vrf/iosxe/yang/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/vrf/iosxe/yang/__init__.py index 05cdc37aa..061fad71a 100755 --- a/pkgs/conf-pkg/src/genie/libs/conf/vrf/iosxe/yang/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/vrf/iosxe/yang/__init__.py @@ -1,7 +1,8 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='yang') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/vrf/iosxr/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/vrf/iosxr/__init__.py index 05cdc37aa..ecac2a792 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/vrf/iosxr/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/vrf/iosxr/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/vrf/iosxr/yang/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/vrf/iosxr/yang/__init__.py index 05cdc37aa..061fad71a 100755 --- a/pkgs/conf-pkg/src/genie/libs/conf/vrf/iosxr/yang/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/vrf/iosxr/yang/__init__.py @@ -1,7 +1,8 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='yang') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/vrf/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/vrf/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/vrf/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/vrf/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/conf-pkg/src/genie/libs/conf/vrf/vrf.py b/pkgs/conf-pkg/src/genie/libs/conf/vrf/vrf.py index 315dd8f20..22d477514 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/vrf/vrf.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/vrf/vrf.py @@ -489,8 +489,8 @@ def learn_config(self, device, **kwargs): ''' # Abstracting the show running vrf as per device os - ret = Lookup.from_device(device) - cmd = ret.parser.show_vrf.ShowRunningConfigVrf + ret = Lookup.from_device(device, package=parser) + cmd = ret.show_vrf.ShowRunningConfigVrf maker = ops_Base(device=device) maker.add_leaf(cmd=cmd, diff --git a/pkgs/conf-pkg/src/genie/libs/conf/vxlan/nxos/__init__.py b/pkgs/conf-pkg/src/genie/libs/conf/vxlan/nxos/__init__.py index 05cdc37aa..046fcc782 100644 --- a/pkgs/conf-pkg/src/genie/libs/conf/vxlan/nxos/__init__.py +++ b/pkgs/conf-pkg/src/genie/libs/conf/vxlan/nxos/__init__.py @@ -1,7 +1,7 @@ # Enable abstraction using this directory name as the abstraction token try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/c960/__init__.py b/pkgs/filetransferutils-pkg/changelog/2024/april.rst similarity index 100% rename from pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/c960/__init__.py rename to pkgs/filetransferutils-pkg/changelog/2024/april.rst diff --git a/pkgs/filetransferutils-pkg/src/genie/libs/filetransferutils/__init__.py b/pkgs/filetransferutils-pkg/src/genie/libs/filetransferutils/__init__.py index 7c282fd04..ccc73db8e 100644 --- a/pkgs/filetransferutils-pkg/src/genie/libs/filetransferutils/__init__.py +++ b/pkgs/filetransferutils-pkg/src/genie/libs/filetransferutils/__init__.py @@ -9,7 +9,7 @@ ''' -__version__ = '24.3' +__version__ = '24.4' __author__ = 'Cisco Systems Inc.' __contact__ = ['pyats-support@cisco.com', 'pyats-support-ext@cisco.com'] __copyright__ = 'Copyright (c) 2018, Cisco Systems Inc.' diff --git a/pkgs/filetransferutils-pkg/src/genie/libs/filetransferutils/plugins/apic/__init__.py b/pkgs/filetransferutils-pkg/src/genie/libs/filetransferutils/plugins/apic/__init__.py index 615055010..b628a9d25 100644 --- a/pkgs/filetransferutils-pkg/src/genie/libs/filetransferutils/plugins/apic/__init__.py +++ b/pkgs/filetransferutils-pkg/src/genie/libs/filetransferutils/plugins/apic/__init__.py @@ -1 +1 @@ -from .fileutils import FileUtils +from .fileutils import FileUtils diff --git a/pkgs/filetransferutils-pkg/src/genie/libs/filetransferutils/plugins/linux/__init__.py b/pkgs/filetransferutils-pkg/src/genie/libs/filetransferutils/plugins/linux/__init__.py index 615055010..b628a9d25 100644 --- a/pkgs/filetransferutils-pkg/src/genie/libs/filetransferutils/plugins/linux/__init__.py +++ b/pkgs/filetransferutils-pkg/src/genie/libs/filetransferutils/plugins/linux/__init__.py @@ -1 +1 @@ -from .fileutils import FileUtils +from .fileutils import FileUtils diff --git a/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/c9800/platform/__init__.py b/pkgs/health-pkg/changelog/2024/april.rst similarity index 100% rename from pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/c9800/platform/__init__.py rename to pkgs/health-pkg/changelog/2024/april.rst diff --git a/pkgs/health-pkg/src/genie/libs/health/__init__.py b/pkgs/health-pkg/src/genie/libs/health/__init__.py index 2395503d8..451f1535b 100644 --- a/pkgs/health-pkg/src/genie/libs/health/__init__.py +++ b/pkgs/health-pkg/src/genie/libs/health/__init__.py @@ -8,12 +8,12 @@ ''' # metadata -__version__ = '24.3' +__version__ = '24.4' __author__ = 'Cisco Systems Inc.' __contact__ = ['asg-genie-support@cisco.com', 'pyats-support-ext@cisco.com'] __copyright__ = 'Copyright (c) 2020, Cisco Systems Inc.' from genie import abstract -abstract.declare_package(__name__) +abstract.declare_package(feature="health") from .health import Health diff --git a/pkgs/ops-pkg/changelog/2024/april.rst b/pkgs/ops-pkg/changelog/2024/april.rst new file mode 100644 index 000000000..49dc683a1 --- /dev/null +++ b/pkgs/ops-pkg/changelog/2024/april.rst @@ -0,0 +1,10 @@ +-------------------------------------------------------------------------------- + Fix +-------------------------------------------------------------------------------- + +* iosxe + * Modified unit test + * Added label field in expected output to accomodate fix in show version parser code. + +* iosxr + * Added management ops support \ No newline at end of file diff --git a/pkgs/ops-pkg/ops_generator/output/github_ops.json b/pkgs/ops-pkg/ops_generator/output/github_ops.json index 72d92d427..cff9dfdcd 100644 --- a/pkgs/ops-pkg/ops_generator/output/github_ops.json +++ b/pkgs/ops-pkg/ops_generator/output/github_ops.json @@ -1,1132 +1,1840 @@ { "acl": { - "ios": { - "class_name": "Acl", - "doc": null, - "module_name": "acl.acl", - "package": "genie.libs.ops", - "uid": "acl", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/ios/acl.py#L6" - }, - "iosxe": { - "class_name": "Acl", - "doc": "ACL Genie Ops Object", - "module_name": "acl.acl", - "package": "genie.libs.ops", - "uid": "acl", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxe/acl.py#L10" - }, - "iosxr": { - "class_name": "Acl", - "doc": "ACL Genie Ops Object", - "module_name": "acl.acl", - "package": "genie.libs.ops", - "uid": "acl", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxr/acl.py#L12" + "class": "Acl", + "doc": null, + "folders": { + "ios": { + "class": "Acl", + "doc": null, + "module_name": "acl.ios.acl", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "acl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/ios/acl.py#L6" + }, + "iosxe": { + "class": "Acl", + "doc": "ACL Genie Ops Object", + "module_name": "acl.iosxe.acl", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "acl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxe/acl.py#L10" + }, + "iosxr": { + "class": "Acl", + "doc": "ACL Genie Ops Object", + "module_name": "acl.iosxr.acl", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "acl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxr/acl.py#L12" + }, + "nxos": { + "class": "Acl", + "doc": "Acl Genie Ops Object", + "module_name": "acl.nxos.acl", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "acl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/nxos/acl.py#L32" + } }, - "nxos": { - "class_name": "Acl", - "doc": "Acl Genie Ops Object", - "module_name": "acl.acl", - "package": "genie.libs.ops", - "uid": "acl", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/nxos/acl.py#L32" - } + "module_name": "acl.acl", + "package": "genie.libs.ops", + "uid": "acl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/acl.py#L5" }, "arp": { - "ios": { - "class_name": "Arp", - "doc": "ARP Genie Ops Object", - "module_name": "arp.arp", - "package": "genie.libs.ops", - "uid": "arp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/ios/arp.py#L18" - }, - "iosxe": { - "class_name": "Arp", - "doc": "ARP Genie Ops Object", - "module_name": "arp.arp", - "package": "genie.libs.ops", - "uid": "arp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxe/arp.py#L18" - }, - "iosxr": { - "class_name": "Arp", - "doc": "ARP Genie Ops Object", - "module_name": "arp.arp", - "package": "genie.libs.ops", - "uid": "arp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxr/arp.py#L16" + "class": "Arp", + "doc": null, + "folders": { + "ios": { + "class": "Arp", + "doc": "ARP Genie Ops Object", + "module_name": "arp.ios.arp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "arp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/ios/arp.py#L18" + }, + "iosxe": { + "class": "Arp", + "doc": "ARP Genie Ops Object", + "module_name": "arp.iosxe.arp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "arp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxe/arp.py#L18" + }, + "iosxr": { + "class": "Arp", + "doc": "ARP Genie Ops Object", + "module_name": "arp.iosxr.arp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "arp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxr/arp.py#L16" + }, + "nxos": { + "class": "Arp", + "doc": "ARP Genie Ops Object", + "module_name": "arp.nxos.arp", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "arp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/nxos/arp.py#L15" + } }, - "nxos": { - "class_name": "Arp", - "doc": "ARP Genie Ops Object", - "module_name": "arp.arp", - "package": "genie.libs.ops", - "uid": "arp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/nxos/arp.py#L15" - } + "module_name": "arp.arp", + "package": "genie.libs.ops", + "uid": "arp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/arp.py#L5" }, "bgp": { - "ios": { - "class_name": "Bgp", - "doc": null, - "module_name": "bgp.bgp", - "package": "genie.libs.ops", - "uid": "bgp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/ios/bgp.py#L6" - }, - "iosxe": { - "class_name": "Bgp", - "doc": "BGP Genie Ops Object", - "module_name": "bgp.bgp", - "package": "genie.libs.ops", - "uid": "bgp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxe/bgp.py#L12" - }, - "iosxr": { - "class_name": "Bgp", - "doc": "BGP Genie Ops Object", - "module_name": "bgp.bgp", - "package": "genie.libs.ops", - "uid": "bgp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/bgp.py#L21", - "yang": { - "class_name": "Bgp", + "class": "Bgp", + "doc": null, + "folders": { + "ios": { + "class": "Bgp", + "doc": null, + "module_name": "bgp.ios.bgp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/ios/bgp.py#L6" + }, + "iosxe": { + "class": "Bgp", "doc": "BGP Genie Ops Object", - "module_name": "bgp.bgp", + "module_name": "bgp.iosxe.bgp", "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, "uid": "bgp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/yang/bgp.py#L13" - } - }, - "nxos": { - "class_name": "Bgp", - "doc": "BGP Genie Ops Object", - "module_name": "bgp.bgp", - "package": "genie.libs.ops", - "uid": "bgp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/bgp.py#L28", - "xml": { - "class_name": "Bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxe/bgp.py#L12" + }, + "iosxr": { + "class": "Bgp", "doc": "BGP Genie Ops Object", - "module_name": "bgp.bgp", + "folders": { + "yang": { + "class": "Bgp", + "doc": "BGP Genie Ops Object", + "module_name": "bgp.iosxr.yang.bgp", + "package": "genie.libs.ops", + "tokens": { + "platform": "yang" + }, + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/yang/bgp.py#L13" + } + }, + "module_name": "bgp.iosxr.bgp", "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, "uid": "bgp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/xml/bgp.py#L13" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/bgp.py#L21" }, - "yang": { - "class_name": "Bgp", + "nxos": { + "class": "Bgp", "doc": "BGP Genie Ops Object", - "module_name": "bgp.bgp", + "folders": { + "xml": { + "class": "Bgp", + "doc": "BGP Genie Ops Object", + "module_name": "bgp.nxos.xml.bgp", + "package": "genie.libs.ops", + "tokens": { + "platform": "xml" + }, + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/xml/bgp.py#L13" + }, + "yang": { + "class": "Bgp", + "doc": "BGP Genie Ops Object", + "module_name": "bgp.nxos.yang.bgp", + "package": "genie.libs.ops", + "tokens": { + "platform": "yang" + }, + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/yang/bgp.py#L13" + } + }, + "module_name": "bgp.nxos.bgp", "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, "uid": "bgp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/yang/bgp.py#L13" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/bgp.py#L28" } - } + }, + "module_name": "bgp.bgp", + "package": "genie.libs.ops", + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/bgp.py#L5" }, "device": { - "iosxe": { - "cat9k": { - "class_name": "Device", + "class": "ShowRunningConfig", + "doc": null, + "folders": { + "iosxe": { + "class": "Device", "doc": "Device Genie Ops Object", - "module_name": "device.device", + "folders": { + "cat9k": { + "class": "Device", + "doc": "Device Genie Ops Object", + "module_name": "device.iosxe.cat9k.device", + "package": "genie.libs.ops", + "tokens": { + "os": "cat9k" + }, + "uid": "device", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/iosxe/cat9k/device.py#L7" + } + }, + "module_name": "device.iosxe.device", "package": "genie.libs.ops", + "tokens": { + "origin": "iosxe" + }, "uid": "device", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/iosxe/cat9k/device.py#L7" - }, - "class_name": "Device", - "doc": "Device Genie Ops Object", - "module_name": "device.device", - "package": "genie.libs.ops", - "uid": "device", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/iosxe/device.py#L24" - }, - "iosxr": { - "class_name": "Device", - "doc": "Device Genie Ops Object", - "module_name": "device.device", - "package": "genie.libs.ops", - "uid": "device", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/iosxr/device.py#L21" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/iosxe/device.py#L24" + }, + "iosxr": { + "class": "Device", + "doc": "Device Genie Ops Object", + "module_name": "device.iosxr.device", + "package": "genie.libs.ops", + "tokens": { + "origin": "iosxr" + }, + "uid": "device", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/iosxr/device.py#L21" + }, + "nxos": { + "class": "Device", + "doc": "Device Genie Ops Object", + "module_name": "device.nxos.device", + "package": "genie.libs.ops", + "tokens": { + "origin": "nxos" + }, + "uid": "device", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/nxos/device.py#L23" + } }, - "nxos": { - "class_name": "Device", - "doc": "Device Genie Ops Object", - "module_name": "device.device", - "package": "genie.libs.ops", - "uid": "device", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/nxos/device.py#L23" - } + "module_name": "device.device", + "package": "genie.libs.ops", + "uid": "showrunningconfig", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/device.py#L168" }, "dot1x": { - "ios": { - "class_name": "Dot1X", - "doc": null, - "module_name": "dot1x.dot1x", - "package": "genie.libs.ops", - "uid": "dot1x", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/dot1x/ios/dot1x.py#L6" + "class": "Dot1X", + "doc": null, + "folders": { + "ios": { + "class": "Dot1X", + "doc": null, + "module_name": "dot1x.ios.dot1x", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "dot1x", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/dot1x/ios/dot1x.py#L6" + }, + "iosxe": { + "class": "Dot1X", + "doc": "Dot1x Genie Ops Object", + "module_name": "dot1x.iosxe.dot1x", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "dot1x", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/dot1x/iosxe/dot1x.py#L9" + } }, - "iosxe": { - "class_name": "Dot1X", - "doc": "Dot1x Genie Ops Object", - "module_name": "dot1x.dot1x", - "package": "genie.libs.ops", - "uid": "dot1x", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/dot1x/iosxe/dot1x.py#L9" - } + "module_name": "dot1x.dot1x", + "package": "genie.libs.ops", + "uid": "dot1x", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/dot1x/dot1x.py#L3" }, "eigrp": { - "ios": { - "class_name": "Eigrp", - "doc": "\n Eigrp Ops Object\n ", - "module_name": "eigrp.eigrp", - "package": "genie.libs.ops", - "uid": "eigrp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/ios/eigrp.py#L7" - }, - "iosxe": { - "class_name": "Eigrp", - "doc": "\n Eigrp Ops Object\n ", - "module_name": "eigrp.eigrp", - "package": "genie.libs.ops", - "uid": "eigrp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxe/eigrp.py#L8" - }, - "iosxr": { - "class_name": "Eigrp", - "doc": "\n Eigrp Ops object\n ", - "module_name": "eigrp.eigrp", - "package": "genie.libs.ops", - "uid": "eigrp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxr/eigrp.py#L9" + "class": "Eigrp", + "doc": null, + "folders": { + "ios": { + "class": "Eigrp", + "doc": "\n Eigrp Ops Object\n ", + "module_name": "eigrp.ios.eigrp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "eigrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/ios/eigrp.py#L7" + }, + "iosxe": { + "class": "Eigrp", + "doc": "\n Eigrp Ops Object\n ", + "module_name": "eigrp.iosxe.eigrp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "eigrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxe/eigrp.py#L8" + }, + "iosxr": { + "class": "Eigrp", + "doc": "\n Eigrp Ops object\n ", + "module_name": "eigrp.iosxr.eigrp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "eigrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxr/eigrp.py#L9" + }, + "nxos": { + "class": "Eigrp", + "doc": "\n Eigrp Ops object\n ", + "module_name": "eigrp.nxos.eigrp", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "eigrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/nxos/eigrp.py#L9" + } }, - "nxos": { - "class_name": "Eigrp", - "doc": "\n Eigrp Ops object\n ", - "module_name": "eigrp.eigrp", - "package": "genie.libs.ops", - "uid": "eigrp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/nxos/eigrp.py#L9" - } + "module_name": "eigrp.eigrp", + "package": "genie.libs.ops", + "uid": "eigrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/eigrp.py#L5" }, "fdb": { - "ios": { - "class_name": "Fdb", - "doc": null, - "module_name": "fdb.fdb", - "package": "genie.libs.ops", - "uid": "fdb", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/ios/fdb.py#L6" - }, - "iosxe": { - "class_name": "Fdb", - "doc": "Fdb Genie Ops Object", - "module_name": "fdb.fdb", - "package": "genie.libs.ops", - "uid": "fdb", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/iosxe/fdb.py#L9" + "class": "Fdb", + "doc": null, + "folders": { + "ios": { + "class": "Fdb", + "doc": null, + "module_name": "fdb.ios.fdb", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "fdb", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/ios/fdb.py#L6" + }, + "iosxe": { + "class": "Fdb", + "doc": "Fdb Genie Ops Object", + "module_name": "fdb.iosxe.fdb", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "fdb", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/iosxe/fdb.py#L9" + }, + "nxos": { + "class": "Fdb", + "doc": "Fdb Genie Ops Object", + "module_name": "fdb.nxos.fdb", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "fdb", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/nxos/fdb.py#L11" + } }, - "nxos": { - "class_name": "Fdb", - "doc": "Fdb Genie Ops Object", - "module_name": "fdb.fdb", - "package": "genie.libs.ops", - "uid": "fdb", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/nxos/fdb.py#L11" - } + "module_name": "fdb.fdb", + "package": "genie.libs.ops", + "uid": "fdb", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/fdb.py#L3" }, "hsrp": { - "ios": { - "class_name": "Hsrp", - "doc": null, - "module_name": "hsrp.hsrp", - "package": "genie.libs.ops", - "uid": "hsrp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/ios/hsrp.py#L6" - }, - "iosxe": { - "class_name": "Hsrp", - "doc": "HSRP Genie Ops Object", - "module_name": "hsrp.hsrp", - "package": "genie.libs.ops", - "uid": "hsrp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxe/hsrp.py#L13" - }, - "iosxr": { - "class_name": "Hsrp", - "doc": "HSRP Genie Ops Object", - "module_name": "hsrp.hsrp", - "package": "genie.libs.ops", - "uid": "hsrp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxr/hsrp.py#L12" + "class": "Hsrp", + "doc": null, + "folders": { + "ios": { + "class": "Hsrp", + "doc": null, + "module_name": "hsrp.ios.hsrp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "hsrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/ios/hsrp.py#L6" + }, + "iosxe": { + "class": "Hsrp", + "doc": "HSRP Genie Ops Object", + "module_name": "hsrp.iosxe.hsrp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "hsrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxe/hsrp.py#L13" + }, + "iosxr": { + "class": "Hsrp", + "doc": "HSRP Genie Ops Object", + "module_name": "hsrp.iosxr.hsrp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "hsrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxr/hsrp.py#L12" + }, + "nxos": { + "class": "Hsrp", + "doc": "HSRP Genie Ops Object", + "module_name": "hsrp.nxos.hsrp", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "hsrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/nxos/hsrp.py#L11" + } }, - "nxos": { - "class_name": "Hsrp", - "doc": "HSRP Genie Ops Object", - "module_name": "hsrp.hsrp", - "package": "genie.libs.ops", - "uid": "hsrp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/nxos/hsrp.py#L11" - } + "module_name": "hsrp.hsrp", + "package": "genie.libs.ops", + "uid": "hsrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/hsrp.py#L4" }, "igmp": { - "ios": { - "class_name": "Igmp", - "doc": null, - "module_name": "igmp.igmp", - "package": "genie.libs.ops", - "uid": "igmp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/ios/igmp.py#L6" - }, - "iosxe": { - "class_name": "Igmp", - "doc": "IGMP Genie Ops Object", - "module_name": "igmp.igmp", - "package": "genie.libs.ops", - "uid": "igmp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxe/igmp.py#L11" - }, - "iosxr": { - "class_name": "Igmp", - "doc": "IGMP Genie Ops Object", - "module_name": "igmp.igmp", - "package": "genie.libs.ops", - "uid": "igmp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxr/igmp.py#L13" + "class": "Igmp", + "doc": null, + "folders": { + "ios": { + "class": "Igmp", + "doc": null, + "module_name": "igmp.ios.igmp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "igmp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/ios/igmp.py#L6" + }, + "iosxe": { + "class": "Igmp", + "doc": "IGMP Genie Ops Object", + "module_name": "igmp.iosxe.igmp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "igmp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxe/igmp.py#L11" + }, + "iosxr": { + "class": "Igmp", + "doc": "IGMP Genie Ops Object", + "module_name": "igmp.iosxr.igmp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "igmp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxr/igmp.py#L13" + }, + "nxos": { + "class": "Igmp", + "doc": "IGMP Genie Ops Object", + "module_name": "igmp.nxos.igmp", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "igmp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/nxos/igmp.py#L13" + } }, - "nxos": { - "class_name": "Igmp", - "doc": "IGMP Genie Ops Object", - "module_name": "igmp.igmp", - "package": "genie.libs.ops", - "uid": "igmp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/nxos/igmp.py#L13" - } + "module_name": "igmp.igmp", + "package": "genie.libs.ops", + "uid": "igmp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/igmp.py#L5" }, "interface": { - "cheetah": { - "ap": { - "class_name": "Interface", + "class": "Interface", + "doc": null, + "folders": { + "cheetah": { + "folders": { + "ap": { + "class": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.cheetah.ap.interface", + "package": "genie.libs.ops", + "tokens": { + "os": "ap" + }, + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/cheetah/ap/interface.py#L10" + } + }, + "tokens": { + "origin": "cheetah" + } + }, + "ios": { + "class": "Interface", "doc": "Interface Genie Ops Object", - "module_name": "interface.interface", + "module_name": "interface.ios.interface", "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, "uid": "interface", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/cheetah/ap/interface.py#L10" - }, - "class_name": "Interface", - "doc": "Interface Genie Ops Object", - "module_name": "interface.interface", - "package": "genie.libs.ops", - "uid": "interface", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/cheetah/ap/interface.py#L10" - }, - "ios": { - "class_name": "Interface", - "doc": "Interface Genie Ops Object", - "module_name": "interface.interface", - "package": "genie.libs.ops", - "uid": "interface", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/ios/interface.py#L11" - }, - "iosxe": { - "asr1k": { - "class_name": "Interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/ios/interface.py#L11" + }, + "iosxe": { + "class": "Interface", "doc": "Interface Genie Ops Object", - "module_name": "interface.interface", + "folders": { + "asr1k": { + "class": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.iosxe.asr1k.interface", + "package": "genie.libs.ops", + "tokens": { + "platform": "asr1k" + }, + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/asr1k/interface.py#L14" + }, + "c3850": { + "class": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.iosxe.c3850.interface", + "package": "genie.libs.ops", + "tokens": { + "model": "c3850", + "platform": "cat3k" + }, + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/c3850/interface.py#L14" + } + }, + "module_name": "interface.iosxe.interface", "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, "uid": "interface", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/asr1k/interface.py#L14" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/interface.py#L17" }, - "c3850": { - "class_name": "Interface", + "iosxr": { + "class": "Interface", "doc": "Interface Genie Ops Object", - "module_name": "interface.interface", + "module_name": "interface.iosxr.interface", "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, "uid": "interface", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/c3850/interface.py#L14" - }, - "class_name": "Interface", - "doc": "Interface Genie Ops Object", - "module_name": "interface.interface", - "package": "genie.libs.ops", - "uid": "interface", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/interface.py#L17" - }, - "iosxr": { - "class_name": "Interface", - "doc": "Interface Genie Ops Object", - "module_name": "interface.interface", - "package": "genie.libs.ops", - "uid": "interface", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/interface.py#L20" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/interface.py#L20" + }, + "nxos": { + "class": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.nxos.interface", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/nxos/interface.py#L17" + } }, - "nxos": { - "class_name": "Interface", - "doc": "Interface Genie Ops Object", - "module_name": "interface.interface", - "package": "genie.libs.ops", - "uid": "interface", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/nxos/interface.py#L17" - } + "module_name": "interface.interface", + "package": "genie.libs.ops", + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/interface.py#L5" }, "isis": { - "ios": { - "class_name": "Isis", - "doc": "Isis Genie Ops Object", - "module_name": "isis.isis", - "package": "genie.libs.ops", - "uid": "isis", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/ios/isis.py#L3" - }, - "iosxe": { - "class_name": "Isis", - "doc": "Isis Genie Ops Object", - "module_name": "isis.isis", - "package": "genie.libs.ops", - "uid": "isis", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxe/isis.py#L28" - }, - "iosxr": { - "class_name": "Isis", - "doc": "Isis Genie Ops Object", - "module_name": "isis.isis", - "package": "genie.libs.ops", - "uid": "isis", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxr/isis.py#L22" + "class": "Isis", + "doc": null, + "folders": { + "ios": { + "class": "Isis", + "doc": "Isis Genie Ops Object", + "module_name": "isis.ios.isis", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "isis", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/ios/isis.py#L3" + }, + "iosxe": { + "class": "Isis", + "doc": "Isis Genie Ops Object", + "module_name": "isis.iosxe.isis", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "isis", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxe/isis.py#L28" + }, + "iosxr": { + "class": "Isis", + "doc": "Isis Genie Ops Object", + "module_name": "isis.iosxr.isis", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "isis", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxr/isis.py#L22" + }, + "nxos": { + "class": "Isis", + "doc": "Isis Genie Ops Object", + "module_name": "isis.nxos.isis", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "isis", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/nxos/isis.py#L21" + } }, - "nxos": { - "class_name": "Isis", - "doc": "Isis Genie Ops Object", - "module_name": "isis.isis", - "package": "genie.libs.ops", - "uid": "isis", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/nxos/isis.py#L21" - } + "module_name": "isis.isis", + "package": "genie.libs.ops", + "uid": "isis", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/isis.py#L5" }, "lag": { - "ios": { - "class_name": "Lag", - "doc": null, - "module_name": "lag.lag", - "package": "genie.libs.ops", - "uid": "lag", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/ios/lag.py#L6" - }, - "iosxe": { - "class_name": "Lag", - "doc": "Lag Genie Ops Object", - "module_name": "lag.lag", - "package": "genie.libs.ops", - "uid": "lag", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxe/lag.py#L9" + "class": "Lag", + "doc": null, + "folders": { + "ios": { + "class": "Lag", + "doc": null, + "module_name": "lag.ios.lag", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "lag", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/ios/lag.py#L6" + }, + "iosxe": { + "class": "Lag", + "doc": "Lag Genie Ops Object", + "module_name": "lag.iosxe.lag", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "lag", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxe/lag.py#L9" + }, + "iosxr": { + "class": "Lag", + "doc": "LAG Genie Ops Object", + "module_name": "lag.iosxr.lag", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "lag", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxr/lag.py#L13" + } }, - "iosxr": { - "class_name": "Lag", - "doc": "LAG Genie Ops Object", - "module_name": "lag.lag", - "package": "genie.libs.ops", - "uid": "lag", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxr/lag.py#L13" - } + "module_name": "lag.lag", + "package": "genie.libs.ops", + "uid": "lag", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/lag.py#L5" }, "lisp": { - "ios": { - "class_name": "Lisp", - "doc": null, - "module_name": "lisp.lisp", - "package": "genie.libs.ops", - "uid": "lisp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lisp/ios/lisp.py#L6" + "class": "Lisp", + "doc": null, + "folders": { + "ios": { + "class": "Lisp", + "doc": null, + "module_name": "lisp.ios.lisp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "lisp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lisp/ios/lisp.py#L6" + }, + "iosxe": { + "class": "Lisp", + "doc": "Lisp Ops Object", + "module_name": "lisp.iosxe.lisp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "lisp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lisp/iosxe/lisp.py#L10" + } }, - "iosxe": { - "class_name": "Lisp", - "doc": "Lisp Ops Object", - "module_name": "lisp.lisp", - "package": "genie.libs.ops", - "uid": "lisp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lisp/iosxe/lisp.py#L10" - } + "module_name": "lisp.lisp", + "package": "genie.libs.ops", + "uid": "lisp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lisp/lisp.py#L3" }, "lldp": { - "ios": { - "class_name": "Lldp", - "doc": null, - "module_name": "lldp.lldp", - "package": "genie.libs.ops", - "uid": "lldp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/ios/lldp.py#L6" - }, - "iosxe": { - "class_name": "Lldp", - "doc": "LLDP Genie Ops Object", - "module_name": "lldp.lldp", - "package": "genie.libs.ops", - "uid": "lldp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxe/lldp.py#L9" + "class": "Lldp", + "doc": null, + "folders": { + "ios": { + "class": "Lldp", + "doc": null, + "module_name": "lldp.ios.lldp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "lldp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/ios/lldp.py#L6" + }, + "iosxe": { + "class": "Lldp", + "doc": "LLDP Genie Ops Object", + "module_name": "lldp.iosxe.lldp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "lldp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxe/lldp.py#L9" + }, + "iosxr": { + "class": "Lldp", + "doc": "LLDP Genie Ops Object", + "module_name": "lldp.iosxr.lldp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "lldp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxr/lldp.py#L16" + }, + "nxos": { + "class": "Lldp", + "doc": "LLDP Genie Ops Object", + "module_name": "lldp.nxos.lldp", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "lldp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/nxos/lldp.py#L14" + } }, - "iosxr": { - "class_name": "Lldp", - "doc": "LLDP Genie Ops Object", - "module_name": "lldp.lldp", - "package": "genie.libs.ops", - "uid": "lldp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxr/lldp.py#L16" + "module_name": "lldp.lldp", + "package": "genie.libs.ops", + "uid": "lldp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/lldp.py#L5" + }, + "management": { + "class": "Management", + "doc": null, + "folders": { + "iosxr": { + "class": "Management", + "doc": "Management Genie Ops Object", + "module_name": "management.iosxr.management", + "package": "genie.libs.ops", + "tokens": { + "origin": "iosxr" + }, + "uid": "management", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/management/iosxr/management.py#L12" + } }, - "nxos": { - "class_name": "Lldp", - "doc": "LLDP Genie Ops Object", - "module_name": "lldp.lldp", - "package": "genie.libs.ops", - "uid": "lldp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/nxos/lldp.py#L14" - } + "module_name": "management.management", + "package": "genie.libs.ops", + "uid": "management", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/management/management.py#L7" }, "mcast": { - "ios": { - "class_name": "Mcast", - "doc": null, - "module_name": "mcast.mcast", - "package": "genie.libs.ops", - "uid": "mcast", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/ios/mcast.py#L6" - }, - "iosxe": { - "class_name": "Mcast", - "doc": "Mcast Genie Ops Object", - "module_name": "mcast.mcast", - "package": "genie.libs.ops", - "uid": "mcast", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxe/mcast.py#L17" - }, - "iosxr": { - "class_name": "Mcast", - "doc": "Mcast Genie Ops Object", - "module_name": "mcast.mcast", - "package": "genie.libs.ops", - "uid": "mcast", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxr/mcast.py#L17" + "class": "Mcast", + "doc": null, + "folders": { + "ios": { + "class": "Mcast", + "doc": null, + "module_name": "mcast.ios.mcast", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "mcast", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/ios/mcast.py#L6" + }, + "iosxe": { + "class": "Mcast", + "doc": "Mcast Genie Ops Object", + "module_name": "mcast.iosxe.mcast", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "mcast", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxe/mcast.py#L17" + }, + "iosxr": { + "class": "Mcast", + "doc": "Mcast Genie Ops Object", + "module_name": "mcast.iosxr.mcast", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "mcast", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxr/mcast.py#L17" + }, + "nxos": { + "class": "Mcast", + "doc": "Mcast Genie Ops Object", + "module_name": "mcast.nxos.mcast", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "mcast", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/nxos/mcast.py#L16" + } }, - "nxos": { - "class_name": "Mcast", - "doc": "Mcast Genie Ops Object", - "module_name": "mcast.mcast", - "package": "genie.libs.ops", - "uid": "mcast", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/nxos/mcast.py#L16" - } + "module_name": "mcast.mcast", + "package": "genie.libs.ops", + "uid": "mcast", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/mcast.py#L5" }, "mld": { - "ios": { - "class_name": "Mld", - "doc": null, - "module_name": "mld.mld", - "package": "genie.libs.ops", - "uid": "mld", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/ios/mld.py#L6" - }, - "iosxe": { - "class_name": "Mld", - "doc": "MLD Genie Ops Object", - "module_name": "mld.mld", - "package": "genie.libs.ops", - "uid": "mld", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxe/mld.py#L11" - }, - "iosxr": { - "class_name": "Mld", - "doc": "MLD Genie Ops Object", - "module_name": "mld.mld", - "package": "genie.libs.ops", - "uid": "mld", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxr/mld.py#L16" + "class": "Mld", + "doc": null, + "folders": { + "ios": { + "class": "Mld", + "doc": null, + "module_name": "mld.ios.mld", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "mld", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/ios/mld.py#L6" + }, + "iosxe": { + "class": "Mld", + "doc": "MLD Genie Ops Object", + "module_name": "mld.iosxe.mld", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "mld", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxe/mld.py#L11" + }, + "iosxr": { + "class": "Mld", + "doc": "MLD Genie Ops Object", + "module_name": "mld.iosxr.mld", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "mld", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxr/mld.py#L16" + }, + "nxos": { + "class": "Mld", + "doc": "MLD Genie Ops Object", + "module_name": "mld.nxos.mld", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "mld", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/nxos/mld.py#L12" + } }, - "nxos": { - "class_name": "Mld", - "doc": "MLD Genie Ops Object", - "module_name": "mld.mld", - "package": "genie.libs.ops", - "uid": "mld", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/nxos/mld.py#L12" - } + "module_name": "mld.mld", + "package": "genie.libs.ops", + "uid": "mld", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/mld.py#L5" }, "msdp": { - "ios": { - "class_name": "Msdp", - "doc": "\n Msdp Ops Object\n ", - "module_name": "msdp.msdp", - "package": "genie.libs.ops", - "uid": "msdp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/ios/msdp.py#L4" - }, - "iosxe": { - "class_name": "Msdp", - "doc": "\n Msdp Ops Object\n ", - "module_name": "msdp.msdp", - "package": "genie.libs.ops", - "uid": "msdp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxe/msdp.py#L9" - }, - "iosxr": { - "class_name": "Msdp", - "doc": "\n Msdp Ops Object\n ", - "module_name": "msdp.msdp", - "package": "genie.libs.ops", - "uid": "msdp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxr/msdp.py#L13" + "class": "Msdp", + "doc": null, + "folders": { + "ios": { + "class": "Msdp", + "doc": "\n Msdp Ops Object\n ", + "module_name": "msdp.ios.msdp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "msdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/ios/msdp.py#L4" + }, + "iosxe": { + "class": "Msdp", + "doc": "\n Msdp Ops Object\n ", + "module_name": "msdp.iosxe.msdp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "msdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxe/msdp.py#L9" + }, + "iosxr": { + "class": "Msdp", + "doc": "\n Msdp Ops Object\n ", + "module_name": "msdp.iosxr.msdp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "msdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxr/msdp.py#L13" + }, + "nxos": { + "class": "Msdp", + "doc": "Msdp Ops Object", + "module_name": "msdp.nxos.msdp", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "msdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/nxos/msdp.py#L10" + } }, - "nxos": { - "class_name": "Msdp", - "doc": "Msdp Ops Object", - "module_name": "msdp.msdp", - "package": "genie.libs.ops", - "uid": "msdp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/nxos/msdp.py#L10" - } + "module_name": "msdp.msdp", + "package": "genie.libs.ops", + "uid": "msdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/msdp.py#L5" }, "nd": { - "iosxe": { - "class_name": "Nd", - "doc": "Nd Ops Object", - "module_name": "nd.nd", - "package": "genie.libs.ops", - "uid": "nd", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxe/nd.py#L9" - }, - "iosxr": { - "class_name": "Nd", - "doc": "Nd Ops Object", - "module_name": "nd.nd", - "package": "genie.libs.ops", - "uid": "nd", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxr/nd.py#L10" + "class": "Nd", + "doc": null, + "folders": { + "iosxe": { + "class": "Nd", + "doc": "Nd Ops Object", + "module_name": "nd.iosxe.nd", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "nd", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxe/nd.py#L9" + }, + "iosxr": { + "class": "Nd", + "doc": "Nd Ops Object", + "module_name": "nd.iosxr.nd", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "nd", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxr/nd.py#L10" + }, + "nxos": { + "class": "Nd", + "doc": "Nd Ops Object", + "module_name": "nd.nxos.nd", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "nd", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/nxos/nd.py#L10" + } }, - "nxos": { - "class_name": "Nd", - "doc": "Nd Ops Object", - "module_name": "nd.nd", - "package": "genie.libs.ops", - "uid": "nd", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/nxos/nd.py#L10" - } + "module_name": "nd.nd", + "package": "genie.libs.ops", + "uid": "nd", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/nd.py#L5" }, "ntp": { - "ios": { - "class_name": "Ntp", - "doc": "NTP Genie Ops Object", - "module_name": "ntp.ntp", - "package": "genie.libs.ops", - "uid": "ntp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/ios/ntp.py#L15" - }, - "iosxe": { - "class_name": "Ntp", - "doc": "NTP Genie Ops Object", - "module_name": "ntp.ntp", - "package": "genie.libs.ops", - "uid": "ntp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/ntp.py#L15" - }, - "iosxr": { - "class_name": "Ntp", - "doc": "NTP Genie Ops Object", - "module_name": "ntp.ntp", - "package": "genie.libs.ops", - "uid": "ntp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxr/ntp.py#L15" - }, - "junos": { - "class_name": "Ntp", - "doc": "NTP Genie Ops Object", - "module_name": "ntp.ntp", - "package": "genie.libs.ops", - "uid": "ntp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/junos/ntp.py#L13" + "class": "Ntp", + "doc": null, + "folders": { + "ios": { + "class": "Ntp", + "doc": "NTP Genie Ops Object", + "module_name": "ntp.ios.ntp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/ios/ntp.py#L15" + }, + "iosxe": { + "class": "Ntp", + "doc": "NTP Genie Ops Object", + "module_name": "ntp.iosxe.ntp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/ntp.py#L15" + }, + "iosxr": { + "class": "Ntp", + "doc": "NTP Genie Ops Object", + "module_name": "ntp.iosxr.ntp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxr/ntp.py#L15" + }, + "junos": { + "class": "Ntp", + "doc": "NTP Genie Ops Object", + "module_name": "ntp.junos.ntp", + "package": "genie.libs.ops", + "tokens": { + "os": "junos" + }, + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/junos/ntp.py#L13" + }, + "nxos": { + "class": "Ntp", + "doc": "NTP Genie Ops Object", + "module_name": "ntp.nxos.ntp", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/nxos/ntp.py#L12" + } }, - "nxos": { - "class_name": "Ntp", - "doc": "NTP Genie Ops Object", - "module_name": "ntp.ntp", - "package": "genie.libs.ops", - "uid": "ntp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/nxos/ntp.py#L12" - } + "module_name": "ntp.ntp", + "package": "genie.libs.ops", + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/ntp.py#L5" }, "ospf": { - "ios": { - "class_name": "Ospf", - "doc": null, - "module_name": "ospf.ospf", - "package": "genie.libs.ops", - "uid": "ospf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/ios/ospf.py#L6" - }, - "iosxe": { - "class_name": "Ospf", - "doc": "Ospf Ops Object", - "module_name": "ospf.ospf", - "package": "genie.libs.ops", - "uid": "ospf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/ospf.py#L11", - "yang": { - "class_name": "Ospf", + "class": "Ospf", + "doc": null, + "folders": { + "ios": { + "class": "Ospf", + "doc": null, + "module_name": "ospf.ios.ospf", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/ios/ospf.py#L6" + }, + "iosxe": { + "class": "Ospf", "doc": "Ospf Ops Object", - "module_name": "ospf.ospf", + "folders": { + "yang": { + "class": "Ospf", + "doc": "Ospf Ops Object", + "module_name": "ospf.iosxe.yang.ospf", + "package": "genie.libs.ops", + "tokens": { + "platform": "yang" + }, + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/yang/ospf.py#L5" + } + }, + "module_name": "ospf.iosxe.ospf", "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, "uid": "ospf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/yang/ospf.py#L5" - } - }, - "iosxr": { - "class_name": "Ospf", - "doc": "Ospf Ops Object", - "module_name": "ospf.ospf", - "package": "genie.libs.ops", - "uid": "ospf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/ospf.py#L25", - "yang": { - "class_name": "Ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/ospf.py#L11" + }, + "iosxr": { + "class": "Ospf", "doc": "Ospf Ops Object", - "module_name": "ospf.ospf", + "folders": { + "yang": { + "class": "Ospf", + "doc": "Ospf Ops Object", + "module_name": "ospf.iosxr.yang.ospf", + "package": "genie.libs.ops", + "tokens": { + "platform": "yang" + }, + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/yang/ospf.py#L4" + } + }, + "module_name": "ospf.iosxr.ospf", "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, "uid": "ospf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/yang/ospf.py#L4" - } - }, - "nxos": { - "class_name": "Ospf", - "doc": "Ospf Ops Object", - "module_name": "ospf.ospf", - "package": "genie.libs.ops", - "uid": "ospf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/ospf.py#L25", - "yang": { - "class_name": "Ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/ospf.py#L25" + }, + "nxos": { + "class": "Ospf", "doc": "Ospf Ops Object", - "module_name": "ospf.ospf", + "folders": { + "yang": { + "class": "Ospf", + "doc": "Ospf Ops Object", + "module_name": "ospf.nxos.yang.ospf", + "package": "genie.libs.ops", + "tokens": { + "platform": "yang" + }, + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/yang/ospf.py#L5" + } + }, + "module_name": "ospf.nxos.ospf", "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, "uid": "ospf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/yang/ospf.py#L5" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/ospf.py#L25" } - } + }, + "module_name": "ospf.ospf", + "package": "genie.libs.ops", + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/ospf.py#L5" }, "pim": { - "ios": { - "class_name": "Pim", - "doc": "Pim Genie Ops Object", - "module_name": "pim.pim", - "package": "genie.libs.ops", - "uid": "pim", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/ios/pim.py#L14" - }, - "iosxe": { - "class_name": "Pim", - "doc": "Pim Genie Ops Object", - "module_name": "pim.pim", - "package": "genie.libs.ops", - "uid": "pim", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/iosxe/pim.py#L14" + "class": "Pim", + "doc": null, + "folders": { + "ios": { + "class": "Pim", + "doc": "Pim Genie Ops Object", + "module_name": "pim.ios.pim", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "pim", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/ios/pim.py#L14" + }, + "iosxe": { + "class": "Pim", + "doc": "Pim Genie Ops Object", + "module_name": "pim.iosxe.pim", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "pim", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/iosxe/pim.py#L14" + }, + "nxos": { + "class": "Pim", + "doc": "Pim Genie Ops Object", + "module_name": "pim.nxos.pim", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "pim", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/nxos/pim.py#L30" + } }, - "nxos": { - "class_name": "Pim", - "doc": "Pim Genie Ops Object", - "module_name": "pim.pim", - "package": "genie.libs.ops", - "uid": "pim", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/nxos/pim.py#L30" - } + "module_name": "pim.pim", + "package": "genie.libs.ops", + "uid": "pim", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/pim.py#L5" }, "platform": { - "cheetah": { - "ap": { - "class_name": "Platform", - "doc": "Platform Ops Object", - "module_name": "platform.platform", - "package": "genie.libs.ops", - "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/cheetah/ap/platform.py#L7" - }, - "class_name": "Platform", - "doc": "Platform Ops Object", - "module_name": "platform.platform", - "package": "genie.libs.ops", - "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/cheetah/ap/platform.py#L7" - }, - "ios": { - "cat6k": { - "class_name": "Platform", + "class": "Platform", + "doc": null, + "folders": { + "cheetah": { + "folders": { + "ap": { + "class": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.cheetah.ap.platform", + "package": "genie.libs.ops", + "tokens": { + "os": "ap" + }, + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/cheetah/ap/platform.py#L7" + } + }, + "tokens": { + "origin": "cheetah" + } + }, + "ios": { + "class": "Platform", "doc": "Platform Ops Object", - "module_name": "platform.platform", + "folders": { + "cat6k": { + "class": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.ios.cat6k.platform", + "package": "genie.libs.ops", + "tokens": { + "platform": "cat6k" + }, + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/cat6k/platform.py#L12" + } + }, + "module_name": "platform.ios.platform", "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/cat6k/platform.py#L12" - }, - "class_name": "Platform", - "doc": "Platform Ops Object", - "module_name": "platform.platform", - "package": "genie.libs.ops", - "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/platform.py#L6" - }, - "iosxe": { - "asr900": { - "class_name": "Platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/platform.py#L6" + }, + "iosxe": { + "class": "Platform", "doc": "Platform Ops Object", - "module_name": "platform.platform", + "folders": { + "asr900": { + "class": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.iosxe.asr900.platform", + "package": "genie.libs.ops", + "tokens": { + "platform": "asr900" + }, + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/asr900/platform.py#L15" + }, + "c8200": { + "class": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.iosxe.c8200.platform", + "package": "genie.libs.ops", + "tokens": { + "model": "c8200", + "platform": "cat8k" + }, + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c8200/platform.py#L16" + }, + "c9500": { + "class": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.iosxe.c9500.platform", + "package": "genie.libs.ops", + "tokens": { + "model": "c9500", + "platform": "cat9k" + }, + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/platform.py#L17" + } + }, + "module_name": "platform.iosxe.platform", "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/asr900/platform.py#L15" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/platform.py#L15" }, - "c8200": { - "class_name": "Platform", - "doc": "Platform Ops Object", - "module_name": "platform.platform", + "iosxr": { + "class": "Platform", + "doc": "Platform Genie Ops Object", + "module_name": "platform.iosxr.platform", "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c8200/platform.py#L16" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/platform.py#L16" }, - "c9500": { - "class_name": "Platform", + "nxos": { + "class": "Platform", "doc": "Platform Ops Object", - "module_name": "platform.platform", + "module_name": "platform.nxos.platform", "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/platform.py#L17" - }, - "class_name": "Platform", - "doc": "Platform Ops Object", - "module_name": "platform.platform", - "package": "genie.libs.ops", - "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/platform.py#L15" - }, - "iosxr": { - "class_name": "Platform", - "doc": "Platform Genie Ops Object", - "module_name": "platform.platform", - "package": "genie.libs.ops", - "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/platform.py#L16" + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/nxos/platform.py#L13" + } }, - "nxos": { - "class_name": "Platform", - "doc": "Platform Ops Object", - "module_name": "platform.platform", - "package": "genie.libs.ops", - "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/nxos/platform.py#L13" - } + "module_name": "platform.platform", + "package": "genie.libs.ops", + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/platform.py#L7" }, "prefix_list": { - "ios": { - "class_name": "PrefixList", - "doc": null, - "module_name": "prefix_list.prefix_list", - "package": "genie.libs.ops", - "uid": "prefixlist", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/ios/prefix_list.py#L6" - }, - "iosxe": { - "class_name": "PrefixList", - "doc": "Prefix-list Genie Ops Object", - "module_name": "prefix_list.prefix_list", - "package": "genie.libs.ops", - "uid": "prefixlist", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/iosxe/prefix_list.py#L15" + "class": "PrefixList", + "doc": null, + "folders": { + "ios": { + "class": "PrefixList", + "doc": null, + "module_name": "prefix_list.ios.prefix_list", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "prefixlist", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/ios/prefix_list.py#L6" + }, + "iosxe": { + "class": "PrefixList", + "doc": "Prefix-list Genie Ops Object", + "module_name": "prefix_list.iosxe.prefix_list", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "prefixlist", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/iosxe/prefix_list.py#L15" + }, + "nxos": { + "class": "PrefixList", + "doc": "Prefix-list Genie Ops Object", + "module_name": "prefix_list.nxos.prefix_list", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "prefixlist", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/nxos/prefix_list.py#L15" + } }, - "nxos": { - "class_name": "PrefixList", - "doc": "Prefix-list Genie Ops Object", - "module_name": "prefix_list.prefix_list", - "package": "genie.libs.ops", - "uid": "prefixlist", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/nxos/prefix_list.py#L15" - } + "module_name": "prefix_list.prefix_list", + "package": "genie.libs.ops", + "uid": "prefixlist", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/prefix_list.py#L4" }, "rip": { - "ios": { - "class_name": "Rip", - "doc": null, - "module_name": "rip.rip", - "package": "genie.libs.ops", - "uid": "rip", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/ios/rip.py#L6" - }, - "iosxe": { - "class_name": "Rip", - "doc": "Rip Genie Ops Object", - "module_name": "rip.rip", - "package": "genie.libs.ops", - "uid": "rip", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxe/rip.py#L18" + "class": "Rip", + "doc": null, + "folders": { + "ios": { + "class": "Rip", + "doc": null, + "module_name": "rip.ios.rip", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "rip", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/ios/rip.py#L6" + }, + "iosxe": { + "class": "Rip", + "doc": "Rip Genie Ops Object", + "module_name": "rip.iosxe.rip", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "rip", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxe/rip.py#L18" + }, + "iosxr": { + "class": "Rip", + "doc": "Rip Genie Ops Object", + "module_name": "rip.iosxr.rip", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "rip", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxr/rip.py#L15" + } }, - "iosxr": { - "class_name": "Rip", - "doc": "Rip Genie Ops Object", - "module_name": "rip.rip", - "package": "genie.libs.ops", - "uid": "rip", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxr/rip.py#L15" - } + "module_name": "rip.rip", + "package": "genie.libs.ops", + "uid": "rip", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/rip.py#L5" }, "route_policy": { - "ios": { - "class_name": "RoutePolicy", - "doc": null, - "module_name": "route_policy.route_policy", - "package": "genie.libs.ops", - "uid": "routepolicy", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/ios/route_policy.py#L6" - }, - "iosxe": { - "class_name": "RoutePolicy", - "doc": "RoutePolicy Genie Ops Object", - "module_name": "route_policy.route_policy", - "package": "genie.libs.ops", - "uid": "routepolicy", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxe/route_policy.py#L9" - }, - "iosxr": { - "class_name": "RoutePolicy", - "doc": "RoutePolicy Genie Ops Object", - "module_name": "route_policy.route_policy", - "package": "genie.libs.ops", - "uid": "routepolicy", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxr/route_policy.py#L11" + "class": "RoutePolicy", + "doc": null, + "folders": { + "ios": { + "class": "RoutePolicy", + "doc": null, + "module_name": "route_policy.ios.route_policy", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "routepolicy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/ios/route_policy.py#L6" + }, + "iosxe": { + "class": "RoutePolicy", + "doc": "RoutePolicy Genie Ops Object", + "module_name": "route_policy.iosxe.route_policy", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "routepolicy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxe/route_policy.py#L9" + }, + "iosxr": { + "class": "RoutePolicy", + "doc": "RoutePolicy Genie Ops Object", + "module_name": "route_policy.iosxr.route_policy", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "routepolicy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxr/route_policy.py#L11" + }, + "nxos": { + "class": "RoutePolicy", + "doc": "RoutePolicy Genie Ops Object", + "module_name": "route_policy.nxos.route_policy", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "routepolicy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/nxos/route_policy.py#L12" + } }, - "nxos": { - "class_name": "RoutePolicy", - "doc": "RoutePolicy Genie Ops Object", - "module_name": "route_policy.route_policy", - "package": "genie.libs.ops", - "uid": "routepolicy", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/nxos/route_policy.py#L12" - } + "module_name": "route_policy.route_policy", + "package": "genie.libs.ops", + "uid": "routepolicy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/route_policy.py#L4" }, "routing": { - "ios": { - "class_name": "Routing", - "doc": null, - "module_name": "routing.routing", - "package": "genie.libs.ops", - "uid": "routing", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/ios/routing.py#L6" - }, - "iosxe": { - "class_name": "Routing", - "doc": "Routing Ops Object", - "module_name": "routing.routing", - "package": "genie.libs.ops", - "uid": "routing", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxe/routing.py#L13" - }, - "iosxr": { - "class_name": "Routing", - "doc": "Routing Ops Object", - "module_name": "routing.routing", - "package": "genie.libs.ops", - "uid": "routing", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxr/routing.py#L11" + "class": "Routing", + "doc": null, + "folders": { + "ios": { + "class": "Routing", + "doc": null, + "module_name": "routing.ios.routing", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "routing", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/ios/routing.py#L6" + }, + "iosxe": { + "class": "Routing", + "doc": "Routing Ops Object", + "module_name": "routing.iosxe.routing", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "routing", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxe/routing.py#L13" + }, + "iosxr": { + "class": "Routing", + "doc": "Routing Ops Object", + "module_name": "routing.iosxr.routing", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "routing", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxr/routing.py#L11" + }, + "nxos": { + "class": "Routing", + "doc": "Routing Ops Object", + "module_name": "routing.nxos.routing", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "routing", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/nxos/routing.py#L8" + } }, - "nxos": { - "class_name": "Routing", - "doc": "Routing Ops Object", - "module_name": "routing.routing", - "package": "genie.libs.ops", - "uid": "routing", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/nxos/routing.py#L8" - } + "module_name": "routing.routing", + "package": "genie.libs.ops", + "uid": "routing", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/routing.py#L5" }, "static_routing": { - "ios": { - "class_name": "StaticRouting", - "doc": null, - "module_name": "static_routing.static_routing", - "package": "genie.libs.ops", - "uid": "staticrouting", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/ios/static_routing.py#L6" - }, - "iosxe": { - "class_name": "StaticRouting", - "doc": "StaticRouting Ops Object", - "module_name": "static_routing.static_routing", - "package": "genie.libs.ops", - "uid": "staticrouting", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxe/static_routing.py#L10" - }, - "iosxr": { - "class_name": "StaticRouting", - "doc": "StaticRouting Ops Object", - "module_name": "static_routing.static_routing", - "package": "genie.libs.ops", - "uid": "staticrouting", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxr/static_routing.py#L7" + "class": "StaticRouting", + "doc": null, + "folders": { + "ios": { + "class": "StaticRouting", + "doc": null, + "module_name": "static_routing.ios.static_routing", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "staticrouting", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/ios/static_routing.py#L6" + }, + "iosxe": { + "class": "StaticRouting", + "doc": "StaticRouting Ops Object", + "module_name": "static_routing.iosxe.static_routing", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "staticrouting", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxe/static_routing.py#L10" + }, + "iosxr": { + "class": "StaticRouting", + "doc": "StaticRouting Ops Object", + "module_name": "static_routing.iosxr.static_routing", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "staticrouting", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxr/static_routing.py#L7" + }, + "nxos": { + "class": "StaticRouting", + "doc": "StaticRouting Ops Object", + "module_name": "static_routing.nxos.static_routing", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "staticrouting", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/nxos/static_routing.py#L8" + } }, - "nxos": { - "class_name": "StaticRouting", - "doc": "StaticRouting Ops Object", - "module_name": "static_routing.static_routing", - "package": "genie.libs.ops", - "uid": "staticrouting", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/nxos/static_routing.py#L8" - } + "module_name": "static_routing.static_routing", + "package": "genie.libs.ops", + "uid": "staticrouting", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/static_routing.py#L4" }, "stp": { - "ios": { - "class_name": "Stp", - "doc": null, - "module_name": "stp.stp", - "package": "genie.libs.ops", - "uid": "stp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/ios/stp.py#L6" - }, - "iosxe": { - "class_name": "Stp", - "doc": "Spanning-tree Genie Ops Object", - "module_name": "stp.stp", - "package": "genie.libs.ops", - "uid": "stp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxe/stp.py#L9" + "class": "Stp", + "doc": null, + "folders": { + "ios": { + "class": "Stp", + "doc": null, + "module_name": "stp.ios.stp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "stp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/ios/stp.py#L6" + }, + "iosxe": { + "class": "Stp", + "doc": "Spanning-tree Genie Ops Object", + "module_name": "stp.iosxe.stp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "stp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxe/stp.py#L9" + }, + "iosxr": { + "class": "Stp", + "doc": "STP Genie Ops Object", + "module_name": "stp.iosxr.stp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "stp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxr/stp.py#L15" + } }, - "iosxr": { - "class_name": "Stp", - "doc": "STP Genie Ops Object", - "module_name": "stp.stp", - "package": "genie.libs.ops", - "uid": "stp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxr/stp.py#L15" - } + "module_name": "stp.stp", + "package": "genie.libs.ops", + "uid": "stp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/stp.py#L5" }, "terminal": { - "iosxe": { - "class_name": "Terminal", - "doc": "Show Terminal Genie Ops Object", - "module_name": "terminal.terminal", - "package": "genie.libs.ops", - "uid": "terminal", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/iosxe/terminal.py#L8" - }, - "iosxr": { - "class_name": "Terminal", - "doc": "Show Terminal Genie Ops Object", - "module_name": "terminal.terminal", - "package": "genie.libs.ops", - "uid": "terminal", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/iosxr/terminal.py#L8" + "class": "Terminal", + "doc": null, + "folders": { + "iosxe": { + "class": "Terminal", + "doc": "Show Terminal Genie Ops Object", + "module_name": "terminal.iosxe.terminal", + "package": "genie.libs.ops", + "tokens": { + "origin": "iosxe" + }, + "uid": "terminal", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/iosxe/terminal.py#L8" + }, + "iosxr": { + "class": "Terminal", + "doc": "Show Terminal Genie Ops Object", + "module_name": "terminal.iosxr.terminal", + "package": "genie.libs.ops", + "tokens": { + "origin": "iosxr" + }, + "uid": "terminal", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/iosxr/terminal.py#L8" + }, + "nxos": { + "class": "Terminal", + "doc": "Show Terminal Genie Ops Object", + "module_name": "terminal.nxos.terminal", + "package": "genie.libs.ops", + "tokens": { + "origin": "nxos" + }, + "uid": "terminal", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/nxos/terminal.py#L8" + } }, - "nxos": { - "class_name": "Terminal", - "doc": "Show Terminal Genie Ops Object", - "module_name": "terminal.terminal", - "package": "genie.libs.ops", - "uid": "terminal", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/nxos/terminal.py#L8" - } + "module_name": "terminal.terminal", + "package": "genie.libs.ops", + "uid": "terminal", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/terminal.py#L23" }, - "tokens": [ - "ap", - "asr1k", - "asr900", - "c3850", - "c8200", - "c9500", - "cat6k", - "cat9k", - "cheetah", - "ios", - "iosxe", - "iosxr", - "junos", - "nxos", - "xml", - "yang" + "token_order": [ + "origin", + "os", + "platform", + "model", + "submodel", + "pid", + "version", + "os_flavor", + "revision" ], + "tokens": { + "model": [ + "c3850", + "c8200", + "c9500" + ], + "origin": [ + "cheetah", + "iosxe", + "iosxr", + "nxos" + ], + "os": [ + "ap", + "cat9k", + "ios", + "iosxe", + "iosxr", + "junos", + "nxos" + ], + "platform": [ + "asr1k", + "asr900", + "cat3k", + "cat6k", + "cat8k", + "cat9k", + "xml", + "yang" + ] + }, "vlan": { - "ios": { - "class_name": "Vlan", - "doc": null, - "module_name": "vlan.vlan", - "package": "genie.libs.ops", - "uid": "vlan", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/ios/vlan.py#L6" - }, - "iosxe": { - "class_name": "Vlan", - "doc": "Vlan Ops Object", - "module_name": "vlan.vlan", - "package": "genie.libs.ops", - "uid": "vlan", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxe/vlan.py#L5" - }, - "iosxr": { - "class_name": "Vlan", - "doc": "Vlan Ops Object", - "module_name": "vlan.vlan", - "package": "genie.libs.ops", - "uid": "vlan", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxr/vlan.py#L8" + "class": "Vlan", + "doc": null, + "folders": { + "ios": { + "class": "Vlan", + "doc": null, + "module_name": "vlan.ios.vlan", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/ios/vlan.py#L6" + }, + "iosxe": { + "class": "Vlan", + "doc": "Vlan Ops Object", + "module_name": "vlan.iosxe.vlan", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxe/vlan.py#L5" + }, + "iosxr": { + "class": "Vlan", + "doc": "Vlan Ops Object", + "module_name": "vlan.iosxr.vlan", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxr/vlan.py#L8" + }, + "nxos": { + "class": "Vlan", + "doc": "Vlan Ops Object", + "module_name": "vlan.nxos.vlan", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/nxos/vlan.py#L13" + } }, - "nxos": { - "class_name": "Vlan", - "doc": "Vlan Ops Object", - "module_name": "vlan.vlan", - "package": "genie.libs.ops", - "uid": "vlan", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/nxos/vlan.py#L13" - } + "module_name": "vlan.vlan", + "package": "genie.libs.ops", + "uid": "vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/vlan.py#L5" }, "vrf": { - "ios": { - "class_name": "Vrf", - "doc": null, - "module_name": "vrf.vrf", - "package": "genie.libs.ops", - "uid": "vrf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/ios/vrf.py#L6" - }, - "iosxe": { - "class_name": "Vrf", - "doc": "Vrf Genie Ops Object", - "module_name": "vrf.vrf", - "package": "genie.libs.ops", - "uid": "vrf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxe/vrf.py#L10" - }, - "iosxr": { - "class_name": "Vrf", - "doc": "Vrf Genie Ops Object", - "module_name": "vrf.vrf", - "package": "genie.libs.ops", - "uid": "vrf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxr/vrf.py#L13" + "class": "Vrf", + "doc": null, + "folders": { + "ios": { + "class": "Vrf", + "doc": null, + "module_name": "vrf.ios.vrf", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "vrf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/ios/vrf.py#L6" + }, + "iosxe": { + "class": "Vrf", + "doc": "Vrf Genie Ops Object", + "module_name": "vrf.iosxe.vrf", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "vrf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxe/vrf.py#L10" + }, + "iosxr": { + "class": "Vrf", + "doc": "Vrf Genie Ops Object", + "module_name": "vrf.iosxr.vrf", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "vrf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxr/vrf.py#L13" + }, + "nxos": { + "class": "Vrf", + "doc": "Vrf Genie Ops Object", + "module_name": "vrf.nxos.vrf", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "vrf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/nxos/vrf.py#L13" + } }, - "nxos": { - "class_name": "Vrf", - "doc": "Vrf Genie Ops Object", - "module_name": "vrf.vrf", - "package": "genie.libs.ops", - "uid": "vrf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/nxos/vrf.py#L13" - } + "module_name": "vrf.vrf", + "package": "genie.libs.ops", + "uid": "vrf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/vrf.py#L5" }, "vxlan": { - "iosxe": { - "class_name": "Vxlan", - "doc": "Vxlan Ops Object", - "module_name": "vxlan.vxlan", - "package": "genie.libs.ops", - "uid": "vxlan", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vxlan/iosxe/vxlan.py#L8" + "class": "Vxlan", + "doc": null, + "folders": { + "iosxe": { + "class": "Vxlan", + "doc": "Vxlan Ops Object", + "module_name": "vxlan.iosxe.vxlan", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "vxlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vxlan/iosxe/vxlan.py#L8" + }, + "nxos": { + "class": "Vxlan", + "doc": "Vxlan Ops Object", + "module_name": "vxlan.nxos.vxlan", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "vxlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vxlan/nxos/vxlan.py#L33" + } }, - "nxos": { - "class_name": "Vxlan", - "doc": "Vxlan Ops Object", - "module_name": "vxlan.vxlan", - "package": "genie.libs.ops", - "uid": "vxlan", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vxlan/nxos/vxlan.py#L33" - } + "module_name": "vxlan.vxlan", + "package": "genie.libs.ops", + "uid": "vxlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vxlan/vxlan.py#L5" } } \ No newline at end of file diff --git a/pkgs/ops-pkg/src/genie/libs/ops/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/__init__.py index 7bedcad38..3041b3bd7 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/__init__.py @@ -7,11 +7,11 @@ ''' # metadata -__version__ = '24.3' +__version__ = '24.4' __author__ = 'Cisco Systems Inc.' __contact__ = ['pyats-support@cisco.com', 'pyats-support-ext@cisco.com'] __copyright__ = 'Copyright (c) 2018, Cisco Systems Inc.' from genie import abstract -abstract.declare_package(__name__) +abstract.declare_package(feature="ops") diff --git a/pkgs/ops-pkg/src/genie/libs/ops/acl/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/acl/ios/__init__.py index 592bc0c2f..1c4324a07 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/acl/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/acl/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/acl/ios/tests/test_acl.py b/pkgs/ops-pkg/src/genie/libs/ops/acl/ios/tests/test_acl.py index 8db4c361f..1ff3e60a9 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/acl/ios/tests/test_acl.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/acl/ios/tests/test_acl.py @@ -27,9 +27,11 @@ def setUp(self): self.device.custom['abstraction'] = {'order': ['os']} self.device.mapping = {} self.device.mapping['cli'] = 'cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -38,8 +40,7 @@ def test_complete_output(self): acl.maker.outputs[ShowAccessLists] = \ {'': AclOutput.ShowAccessLists} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature acl.learn() @@ -59,8 +60,7 @@ def test_empty_output(self): acl.maker.outputs[ShowAccessLists] = \ {'': {}} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature acl.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxe/tests/test_acl.py b/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxe/tests/test_acl.py index 7f0da05a4..6f8659604 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxe/tests/test_acl.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxe/tests/test_acl.py @@ -22,9 +22,9 @@ def setUp(self): self.device.custom['abstraction'] = {'order': ['os']} self.device.mapping = {} self.device.mapping['cli'] = 'cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None @@ -61,7 +61,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + acl = Acl(device=self.device) # Get outputs acl.maker.outputs[ShowAccessLists] = \ @@ -76,7 +76,7 @@ def test_incomplete_output(self): # Delete missing specific attribute values expect_dict = deepcopy(AclOutput.Acl_info) del(expect_dict['acls']['acl_name']['name']) - + # Verify Ops was created successfully self.assertEqual(acl.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxr/__init__.py index 592bc0c2f..481045c21 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxr/tests/test_acl.py b/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxr/tests/test_acl.py index 32a06aa65..cd32462e6 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxr/tests/test_acl.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxr/tests/test_acl.py @@ -21,9 +21,9 @@ def setUp(self): self.device.os = 'iosxr' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): acl = Acl(device=self.device) @@ -37,7 +37,7 @@ def test_complete_output(self): acl.learn() # Verify Ops was created successfully self.assertEqual(acl.info, AclOutput.aclOutput) - + # Check Selected Attributes self.assertEqual(acl.info['acls']['acl_name']['name'], 'acl_name') # info - ipv4_acl @@ -63,7 +63,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + acl = Acl(device=self.device) # Get outputs acl.maker.outputs[ShowAclAfiAll] = \ @@ -80,7 +80,7 @@ def test_incomplete_output(self): # Delete missing specific attribute values expect_dict = deepcopy(AclOutput.aclOutput) del(expect_dict['acls']['acl_name']['name']) - del(expect_dict['acls']['eth_acl']['name']) + del(expect_dict['acls']['eth_acl']['name']) # Verify Ops was created successfully self.assertEqual(acl.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/acl/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/acl/nxos/__init__.py index 3e76c8dbc..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/acl/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/acl/nxos/__init__.py @@ -1,6 +1,6 @@ -try: - from genie import abstract - abstract.declare_token(__name__) -except Exception as e: - import warnings - warnings.warn('Could not declare abstraction token: ' + str(e)) +try: + from genie import abstract + abstract.declare_token(os='nxos') +except Exception as e: + import warnings + warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/acl/nxos/tests/test_acl.py b/pkgs/ops-pkg/src/genie/libs/ops/acl/nxos/tests/test_acl.py index 509ceea1c..8bdcc3a9c 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/acl/nxos/tests/test_acl.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/acl/nxos/tests/test_acl.py @@ -21,9 +21,11 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping = {} self.device.mapping['cli'] = 'cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_empty_output(self): self.maxDiff = None diff --git a/pkgs/ops-pkg/src/genie/libs/ops/arp/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/arp/ios/__init__.py index 592bc0c2f..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/arp/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/arp/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/arp/ios/tests/test_arp.py b/pkgs/ops-pkg/src/genie/libs/ops/arp/ios/tests/test_arp.py index cdc0fa433..81a24ecd4 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/arp/ios/tests/test_arp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/arp/ios/tests/test_arp.py @@ -23,9 +23,11 @@ def setUp(self): self.device.os = 'ios' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -119,7 +121,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + arp = Arp(device=self.device) # Get outputs @@ -140,7 +142,7 @@ def test_incomplete_output(self): # Learn the feature arp.learn() - + # Check no attribute not found with self.assertRaises(KeyError): arp.info['statistics'] diff --git a/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxe/tests/test_arp.py b/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxe/tests/test_arp.py index 7ea156ed0..46151671e 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxe/tests/test_arp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxe/tests/test_arp.py @@ -30,9 +30,11 @@ def setUp(self): self.device.os = 'iosxe' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -53,8 +55,7 @@ def test_complete_output(self): arp.maker.outputs[ShowIpInterface] = \ {"": ArpOutput.ShowIpInterface} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature arp.learn() @@ -119,8 +120,7 @@ def test_empty_output(self): arp.maker.outputs[ShowIpInterface] = \ {"": {}} outputs['show ip arp']='' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature arp.learn() @@ -131,7 +131,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + arp = Arp(device=self.device) # Get outputs @@ -149,11 +149,10 @@ def test_incomplete_output(self): arp.maker.outputs[ShowIpInterface] = \ {"": ArpOutput.ShowIpInterface} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature arp.learn() - + # Check no attribute not found with self.assertRaises(KeyError): arp.info['statistics'] diff --git a/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxr/__init__.py index 592bc0c2f..481045c21 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxr/tests/test_arp.py b/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxr/tests/test_arp.py index 75525f248..a573f2e71 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxr/tests/test_arp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxr/tests/test_arp.py @@ -22,9 +22,11 @@ def setUp(self): self.device.os = 'iosxr' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -103,7 +105,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + arp = Arp(device=self.device) # Get outputs @@ -118,7 +120,7 @@ def test_incomplete_output(self): # Learn the feature arp.learn() - + # Check no attribute not found with self.assertRaises(KeyError): arp.info['statistics'] diff --git a/pkgs/ops-pkg/src/genie/libs/ops/arp/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/arp/nxos/__init__.py index 592bc0c2f..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/arp/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/arp/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/arp/nxos/tests/test_arp.py b/pkgs/ops-pkg/src/genie/libs/ops/arp/nxos/tests/test_arp.py index 06619282d..73bb6aab1 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/arp/nxos/tests/test_arp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/arp/nxos/tests/test_arp.py @@ -23,9 +23,11 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -111,7 +113,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + arp = Arp(device=self.device) # Get outputs @@ -129,7 +131,7 @@ def test_incomplete_output(self): # Learn the feature arp.learn() - + # Check no attribute not found with self.assertRaises(KeyError): arp.info['statistics'] diff --git a/pkgs/ops-pkg/src/genie/libs/ops/bgp/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/bgp/ios/__init__.py index 592bc0c2f..1c4324a07 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/bgp/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/bgp/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/bgp/ios/tests/test_bgp.py b/pkgs/ops-pkg/src/genie/libs/ops/bgp/ios/tests/test_bgp.py index 78417e9b3..852975cb8 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/bgp/ios/tests/test_bgp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/bgp/ios/tests/test_bgp.py @@ -66,7 +66,7 @@ def mapper(key): return outputs[key] - + class test_bgp(unittest.TestCase): @@ -76,17 +76,18 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None bgp = Bgp(device=self.device) # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature bgp.learn() @@ -101,8 +102,7 @@ def test_custom_output(self): bgp = Bgp(device=self.device) # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature bgp.learn(address_family='vpnv4 unicast', vrf='default', neighbor='2.2.2.2') @@ -122,8 +122,7 @@ def test_empty_output(self): outputs['show bgp all detail'] = '' outputs['show bgp all neighbors'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature bgp.learn() @@ -152,8 +151,7 @@ def test_selective_attribute(self): bgp = Bgp(device=self.device) # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature bgp.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxe/tests/test_bgp.py b/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxe/tests/test_bgp.py index cdea7130f..3d8b01f4b 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxe/tests/test_bgp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxe/tests/test_bgp.py @@ -66,7 +66,7 @@ def mapper(key): return outputs[key] - + class test_bgp(unittest.TestCase): @@ -76,17 +76,18 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None bgp = Bgp(device=self.device) # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature bgp.learn() @@ -101,8 +102,7 @@ def test_custom_output(self): bgp = Bgp(device=self.device) # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature bgp.learn(address_family='vpnv4 unicast', vrf='default', neighbor='2.2.2.2') @@ -122,8 +122,7 @@ def test_empty_output(self): outputs['show bgp all detail'] = '' outputs['show bgp all neighbors'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature bgp.learn() @@ -152,8 +151,7 @@ def test_selective_attribute(self): bgp = Bgp(device=self.device) # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature bgp.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/__init__.py index 592bc0c2f..481045c21 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/tests/test_bgp.py b/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/tests/test_bgp.py index 594a25bcf..4f854e9bd 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/tests/test_bgp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/tests/test_bgp.py @@ -71,9 +71,11 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): @@ -84,10 +86,9 @@ def test_complete_output(self): bgp.maker.outputs[ShowPlacementProgramAll] = {'':BgpOutput.ShowPlacementProgramAll} bgp.maker.outputs[ShowBgpInstanceAfGroupConfiguration] = {'':BgpOutput.ShowBgpInstanceAfGroupConfiguration} bgp.maker.outputs[ShowBgpInstanceSessionGroupConfiguration] = {'':BgpOutput.ShowBgpInstanceSessionGroupConfiguration} - + # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature bgp.learn() @@ -110,8 +111,6 @@ def test_custom_output(self): '': BgpOutput.ShowBgpInstanceSessionGroupConfiguration} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper # Learn the feature bgp.learn(vrf='VRF1', address_family='ipv4 unicast', neighbor='10.1.5.5', instance='default') @@ -129,11 +128,8 @@ def test_selective_attribute(self): bgp.maker.outputs[ShowPlacementProgramAll] = {'':BgpOutput.ShowPlacementProgramAll} bgp.maker.outputs[ShowBgpInstanceAfGroupConfiguration] = {'':BgpOutput.ShowBgpInstanceAfGroupConfiguration} bgp.maker.outputs[ShowBgpInstanceSessionGroupConfiguration] = {'':BgpOutput.ShowBgpInstanceSessionGroupConfiguration} - - # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Return outputs above as inputs to parser when called # Learn the feature bgp.learn() @@ -141,11 +137,11 @@ def test_selective_attribute(self): # Check specific attribute values # bgp.info - bgp_id self.assertEqual(bgp.info['instance']['default']['bgp_id'], 100) - + # bgp.table - bgp_table_version self.assertEqual(bgp.table['instance']['default']['vrf']['VRF1']\ ['address_family']['vpnv4 unicast']['bgp_table_version'], 47) - + # bgp.routes_per_peer - remote_as self.assertEqual(bgp.routes_per_peer['instance']['default']['vrf']\ ['default']['neighbor']['10.16.2.2']['remote_as'], 100) @@ -154,7 +150,7 @@ def test_selective_attribute(self): def test_empty_output(self): self.maxDiff = None bgp = Bgp(device=self.device) - + # Set outputs bgp.maker.outputs[ShowBgpInstances] = {'':''} bgp.maker.outputs[ShowPlacementProgramAll] = {'':''} @@ -162,25 +158,25 @@ def test_empty_output(self): bgp.maker.outputs[ShowBgpInstanceSessionGroupConfiguration] = {'':''} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = ['', '', '', '', '', '', '', '', - '', '', '', '', '', '', '', '', - '', '', '', '', '', '', '', ''] + self.device_connection.execute.side_effect = [ + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + '', '', '', '', '', '', '', '' + ] # Learn the feature bgp.learn() # Check no attribute not found - + # bgp.info - bgp_id with self.assertRaises(AttributeError): bgp_id = (bgp.info['instance']['default']['bgp_id']) - + # bgp.table - bgp_table_version with self.assertRaises(AttributeError): bgp_table_version = (bgp.table['instance']['default']['vrf']\ ['VRF1']['address_family']['vpnv4 unicast']['bgp_table_version']) - + # bgp.routes_per_peer - remote_as with self.assertRaises(AttributeError): remote_as = (bgp.routes_per_peer['instance']['default']['vrf']\ @@ -190,7 +186,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None bgp = Bgp(device=self.device) - + # Set outputs bgp.maker.outputs[ShowBgpInstances] = {'':BgpOutput.ShowBgpInstances} bgp.maker.outputs[ShowPlacementProgramAll] = {'':BgpOutput.ShowPlacementProgramAll} @@ -207,7 +203,7 @@ def test_incomplete_output(self): bgp.learn() # Check attribute values of output provided is found - + # bgp.info - protocol_state self.assertEqual(bgp.info['instance']['default']['protocol_state'], 'RUNNING') diff --git a/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/yang/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/yang/__init__.py index 592bc0c2f..749fd9d76 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/yang/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/yang/__init__.py @@ -1,6 +1,7 @@ try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='yang') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/yang/tests/test_bgp.py b/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/yang/tests/test_bgp.py index b716f1dab..09376070b 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/yang/tests/test_bgp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/yang/tests/test_bgp.py @@ -55,9 +55,11 @@ def setUp(self): self.device.mapping={} self.device.mapping['cli']='cli' self.device.mapping['yang']='yang' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper self.device.connectionmgr.connections['yang'] = self.device # Set context to YANG @@ -72,7 +74,7 @@ def test_complete_output(self): bgp.maker.outputs[ShowPlacementProgramAll] = {'':BgpOutput.ShowPlacementProgramAll} bgp.maker.outputs[ShowBgpInstanceAfGroupConfiguration] = {'':BgpOutput.ShowBgpInstanceAfGroupConfiguration} bgp.maker.outputs[ShowBgpInstanceSessionGroupConfiguration] = {'':BgpOutput.ShowBgpInstanceSessionGroupConfiguration} - + # Return outputs above as inputs to parser when called # Return outputs above as inputs to parser when called self.device.execute = Mock() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/__init__.py index 592bc0c2f..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/tests/test_bgp.py b/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/tests/test_bgp.py index 58a929c17..b6c05f46e 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/tests/test_bgp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/tests/test_bgp.py @@ -55,9 +55,11 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -77,8 +79,6 @@ def test_complete_output(self): bgp.maker.outputs[ShowBgpVrfAllAllDampeningParameters] =\ {"{'address_family':'all','vrf':'all'}":BgpOutput.ShowBgpVrfAllAllDampeningParameters} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper # Learn the feature bgp.learn() @@ -113,8 +113,6 @@ def test_custom_output(self): "{'address_family':'ipv4 unicast','vrf':'VRF1'}": BgpOutput.ShowBgpVrfAllAllDampeningParameters_vrf1} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper # Learn the feature bgp.learn(vrf='VRF1', address_family='ipv4 unicast', neighbor='10.16.2.10') @@ -140,8 +138,7 @@ def test_empty_output(self): bgp.maker.outputs[ShowBgpVrfAllAllNextHopDatabase] = {"{'address_family':'all','vrf':'all'}":''} bgp.maker.outputs[ShowBgpVrfAllAllSummary] = {"{'address_family':'all','vrf':'all'}":''} bgp.maker.outputs[ShowBgpVrfAllAllDampeningParameters] = {"{'address_family':'all','vrf':'all'}":''} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature bgp.learn() @@ -180,9 +177,7 @@ def test_selective_attribute(self): bgp.maker.outputs[ShowBgpVrfAllAllDampeningParameters] = \ {"{'address_family':'all','vrf':'all'}": BgpOutput.ShowBgpVrfAllAllDampeningParameters} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper - + # Learn the feature bgp.learn() @@ -221,12 +216,11 @@ def test_incomplete_output(self): bgp.maker.outputs[ShowBgpVrfAllNeighborsReceivedRoutes] = {'':''} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = ['', '', '', '', '', '', '', '', '',\ - '', '', '', '', '', '', '', '', '',\ - '', '', '', '', '', '', '', '', '',\ - '', '', '', '', '', '', '', '', '',\ - '', '', '', ''] + self.device_connection.execute.side_effect = [ + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + '', '', '', '', '', '' + ] # Learn the feature bgp.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/xml/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/xml/__init__.py index 592bc0c2f..ba096403c 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/xml/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/xml/__init__.py @@ -1,6 +1,7 @@ try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='xml') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/xml/tests/test_bgp.py b/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/xml/tests/test_bgp.py index 6d137f300..1c969e1d2 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/xml/tests/test_bgp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/xml/tests/test_bgp.py @@ -56,9 +56,11 @@ def setUp(self): self.device.mapping={} self.device.mapping['cli']='cli' self.device.mapping['xml']='xml' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper self.device.connectionmgr.connections['xml'] = self.device # Set context to XML @@ -89,9 +91,8 @@ def test_xml_cli_output(self): { "{'address_family':'all','vrf':'all'}": BgpOutput.ShowBgpVrfAllAllDampeningParameters} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper - + + # Learn the feature bgp.learn() @@ -117,7 +118,7 @@ def test_xml_cli_empty_output(self): "{'address_family':'all','vrf':'all'}": ''} bgp.maker.outputs[ShowBgpVrfAllAllDampeningParameters] = { "{'address_family':'all','vrf':'all'}": ''} - + # Learn the feature bgp.learn() @@ -158,9 +159,8 @@ def test_xml_cli_selective_attribute(self): "{'address_family':'all','vrf':'all'}": BgpOutput.ShowBgpVrfAllAllDampeningParameters} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper - + + # Learn the feature bgp.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/yang/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/yang/__init__.py index 592bc0c2f..749fd9d76 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/yang/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/yang/__init__.py @@ -1,6 +1,7 @@ try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='yang') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/yang/tests/test_bgp.py b/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/yang/tests/test_bgp.py index a91485591..605ecb007 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/yang/tests/test_bgp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/yang/tests/test_bgp.py @@ -54,9 +54,11 @@ def setUp(self): self.device.mapping={} self.device.mapping['cli']='cli' self.device.mapping['yang']='yang' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper self.device.connectionmgr.connections['yang'] = self.device # Set context to YANG diff --git a/pkgs/ops-pkg/src/genie/libs/ops/dot1x/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/dot1x/ios/__init__.py index 592bc0c2f..1c4324a07 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/dot1x/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/dot1x/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/dot1x/ios/tests/test_dot1x.py b/pkgs/ops-pkg/src/genie/libs/ops/dot1x/ios/tests/test_dot1x.py index 1c154cd85..c25a01c02 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/dot1x/ios/tests/test_dot1x.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/dot1x/ios/tests/test_dot1x.py @@ -25,9 +25,9 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None @@ -38,10 +38,10 @@ def test_complete_output(self): dot1x.maker.outputs[ShowDot1xAllStatistics] = \ {'': Dot1xOutput.ShowDot1xAllStatistics} - + dot1x.maker.outputs[ShowDot1xAllSummary] = \ {'': Dot1xOutput.ShowDot1xAllSummary} - + dot1x.maker.outputs[ShowDot1xAllCount] = \ {'': Dot1xOutput.ShowDot1xAllCount} @@ -63,13 +63,13 @@ def test_empty_output(self): dot1x.maker.outputs[ShowDot1xAllDetail] = \ {'': {}} - + dot1x.maker.outputs[ShowDot1xAllStatistics] = \ {'': {}} - + dot1x.maker.outputs[ShowDot1xAllSummary] = \ {'': {}} - + dot1x.maker.outputs[ShowDot1xAllCount] = \ {'': {}} @@ -83,18 +83,18 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + dot1x = Dot1X(device=self.device) # Get outputs dot1x.maker.outputs[ShowDot1xAllDetail] = \ {'': Dot1xOutput.ShowDot1xAllDetail} - + dot1x.maker.outputs[ShowDot1xAllStatistics] = \ {'': Dot1xOutput.ShowDot1xAllStatistics} - + dot1x.maker.outputs[ShowDot1xAllSummary] = \ {'': Dot1xOutput.ShowDot1xAllSummary} - + dot1x.maker.outputs[ShowDot1xAllCount] = \ {'': {}} @@ -104,7 +104,7 @@ def test_incomplete_output(self): # Delete missing specific attribute values expect_dict = deepcopy(Dot1xOutput.Dot1x_info) del(expect_dict['sessions']) - + # Verify Ops was created successfully self.assertEqual(dot1x.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/dot1x/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/dot1x/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/dot1x/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/dot1x/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/dot1x/iosxe/tests/test_dot1x.py b/pkgs/ops-pkg/src/genie/libs/ops/dot1x/iosxe/tests/test_dot1x.py index 98c61f80a..7b19c003d 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/dot1x/iosxe/tests/test_dot1x.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/dot1x/iosxe/tests/test_dot1x.py @@ -25,9 +25,9 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None @@ -38,10 +38,10 @@ def test_complete_output(self): dot1x.maker.outputs[ShowDot1xAllStatistics] = \ {'': Dot1xOutput.ShowDot1xAllStatistics} - + dot1x.maker.outputs[ShowDot1xAllSummary] = \ {'': Dot1xOutput.ShowDot1xAllSummary} - + dot1x.maker.outputs[ShowDot1xAllCount] = \ {'': Dot1xOutput.ShowDot1xAllCount} @@ -63,13 +63,13 @@ def test_empty_output(self): dot1x.maker.outputs[ShowDot1xAllDetail] = \ {'': {}} - + dot1x.maker.outputs[ShowDot1xAllStatistics] = \ {'': {}} - + dot1x.maker.outputs[ShowDot1xAllSummary] = \ {'': {}} - + dot1x.maker.outputs[ShowDot1xAllCount] = \ {'': {}} @@ -83,18 +83,18 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + dot1x = Dot1X(device=self.device) # Get outputs dot1x.maker.outputs[ShowDot1xAllDetail] = \ {'': Dot1xOutput.ShowDot1xAllDetail} - + dot1x.maker.outputs[ShowDot1xAllStatistics] = \ {'': Dot1xOutput.ShowDot1xAllStatistics} - + dot1x.maker.outputs[ShowDot1xAllSummary] = \ {'': Dot1xOutput.ShowDot1xAllSummary} - + dot1x.maker.outputs[ShowDot1xAllCount] = \ {'': {}} @@ -104,7 +104,7 @@ def test_incomplete_output(self): # Delete missing specific attribute values expect_dict = deepcopy(Dot1xOutput.Dot1x_info) del(expect_dict['sessions']) - + # Verify Ops was created successfully self.assertEqual(dot1x.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/eigrp/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/eigrp/ios/__init__.py index 3e76c8dbc..1c4324a07 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/eigrp/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/eigrp/ios/__init__.py @@ -1,6 +1,6 @@ -try: - from genie import abstract - abstract.declare_token(__name__) -except Exception as e: - import warnings - warnings.warn('Could not declare abstraction token: ' + str(e)) +try: + from genie import abstract + abstract.declare_token(os='ios') +except Exception as e: + import warnings + warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/eigrp/ios/tests/test_eigrp.py b/pkgs/ops-pkg/src/genie/libs/ops/eigrp/ios/tests/test_eigrp.py index 96f14c4b1..7349b3027 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/eigrp/ios/tests/test_eigrp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/eigrp/ios/tests/test_eigrp.py @@ -28,9 +28,12 @@ def setUp(self): self.device.os = 'ios' self.device.mapping = {} self.device.mapping['cli'] = 'cli' - # Give the device as as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper + def test_complete_output(self): self.maxDiff = None @@ -41,8 +44,7 @@ def test_complete_output(self): eigrp.maker.outputs[ShowIpv6EigrpNeighborsDetail] = {'': EigrpOutput.ShowIpv6EigrpNeighborsDetail} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature eigrp.learn() @@ -59,8 +61,7 @@ def test_selective_attribute(self): eigrp.maker.outputs[ShowIpv6EigrpNeighborsDetail] = {'': EigrpOutput.ShowIpv6EigrpNeighborsDetail} # Return outputd above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature eigrp.learn() @@ -78,8 +79,7 @@ def test_empty_output(self): eigrp.maker.outputs[ShowIpv6EigrpNeighborsDetail] = {'': {}} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature eigrp.learn() @@ -97,8 +97,7 @@ def test_missing_attributes(self): eigrp.maker.outputs[ShowIpv6EigrpNeighborsDetail] = {'': {}} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature eigrp.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxe/__init__.py index 3e76c8dbc..3d16b9c3f 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxe/__init__.py @@ -1,6 +1,6 @@ -try: - from genie import abstract - abstract.declare_token(__name__) -except Exception as e: - import warnings - warnings.warn('Could not declare abstraction token: ' + str(e)) +try: + from genie import abstract + abstract.declare_token(os='iosxe') +except Exception as e: + import warnings + warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxe/tests/test_eigrp.py b/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxe/tests/test_eigrp.py index 242935935..4ee693828 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxe/tests/test_eigrp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxe/tests/test_eigrp.py @@ -28,9 +28,11 @@ def setUp(self): self.device.os = 'iosxe' self.device.mapping = {} self.device.mapping['cli'] = 'cli' - # Give the device as as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -41,8 +43,7 @@ def test_complete_output(self): eigrp.maker.outputs[ShowIpv6EigrpNeighborsDetail] = {'': EigrpOutput.ShowIpv6EigrpNeighborsDetail} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature eigrp.learn() @@ -59,8 +60,7 @@ def test_selective_attribute(self): eigrp.maker.outputs[ShowIpv6EigrpNeighborsDetail] = {'': EigrpOutput.ShowIpv6EigrpNeighborsDetail} # Return outputd above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature eigrp.learn() @@ -80,8 +80,7 @@ def test_empty_output(self): eigrp.maker.outputs[ShowIpv6EigrpNeighborsDetail] = {'': {}} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature eigrp.learn() @@ -99,8 +98,7 @@ def test_missing_attributes(self): eigrp.maker.outputs[ShowIpv6EigrpNeighborsDetail] = {'': {}} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature eigrp.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxr/__init__.py index f9f26b0c5..481045c21 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxr/__init__.py @@ -1,6 +1,6 @@ -try: - from genie import abstract - abstract.declare_token(__name__) -except Exception as e: - import warnings +try: + from genie import abstract + abstract.declare_token(os='iosxr') +except Exception as e: + import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxr/tests/test_eigrp.py b/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxr/tests/test_eigrp.py index 63b7aa23e..8198df07f 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxr/tests/test_eigrp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxr/tests/test_eigrp.py @@ -20,7 +20,7 @@ outputs['show eigrp ipv6 vrf all neighbors detail'] = EigrpOutput.ShowEigrpIpv6NeighborsDetailAllVrf def mapper(key): - + return outputs[key] @@ -31,7 +31,11 @@ def setUp(self): self.device.os = 'iosxr' self.device.mapping = {} self.device.mapping['cli'] = 'cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -47,11 +51,6 @@ def test_complete_output(self): '{"vrf":"all"}': EigrpOutput.ShowEigrpIpv6NeighborsDetailAllVrf, } - - - self.device.execute = Mock() - self.device.execute.side_effect = mapper - eigrp.learn() self.assertEqual(eigrp.info, EigrpOutput.EigrpInfo) @@ -70,9 +69,6 @@ def test_selective_attribute(self): '{"vrf":"all"}': EigrpOutput.ShowEigrpIpv6NeighborsDetailAllVrf, } - self.device.execute = Mock() - self.device.execute.side_effect = mapper - eigrp.learn() self.assertEqual(13, eigrp.info['eigrp_instance']['100']['vrf']\ @@ -103,8 +99,7 @@ def empty_mapper(key): '{"vrf":"all"}': {}, } - self.device.execute = Mock() - self.device.execute.side_effect = empty_mapper + self.device_connection.execute.side_effect = empty_mapper eigrp.learn() @@ -119,9 +114,6 @@ def test_missing_attribute(self): eigrp.maker.outputs[ShowEigrpIpv4NeighborsDetail] = {'': EigrpOutput.ShowEigrpIpv4NeighborsDetail} eigrp.maker.outputs[ShowEigrpIpv6NeighborsDetail] = {'': {}} - self.device.execute = Mock() - self.device.execute.side_effect = mapper - eigrp.learn() with self.assertRaises(KeyError): diff --git a/pkgs/ops-pkg/src/genie/libs/ops/eigrp/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/eigrp/nxos/__init__.py index f9f26b0c5..ef95f9476 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/eigrp/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/eigrp/nxos/__init__.py @@ -1,6 +1,6 @@ -try: - from genie import abstract - abstract.declare_token(__name__) -except Exception as e: - import warnings +try: + from genie import abstract + abstract.declare_token(os='nxos') +except Exception as e: + import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/eigrp/nxos/tests/test_eigrp.py b/pkgs/ops-pkg/src/genie/libs/ops/eigrp/nxos/tests/test_eigrp.py index afe9c97d9..4943f5e3d 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/eigrp/nxos/tests/test_eigrp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/eigrp/nxos/tests/test_eigrp.py @@ -29,7 +29,11 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping = {} self.device.mapping['cli'] = 'cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -39,8 +43,7 @@ def test_complete_output(self): eigrp.maker.outputs[ShowIpv4EigrpNeighborsDetail] = {'': EigrpOutput.ShowIpv4EigrpNeighborsDetail} eigrp.maker.outputs[ShowIpv6EigrpNeighborsDetail] = {'': EigrpOutput.ShowIpv6EigrpNeighborsDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + eigrp.learn() @@ -53,8 +56,7 @@ def test_selective_attribute(self): eigrp.maker.outputs[ShowIpv4EigrpNeighborsDetail] = {'': EigrpOutput.ShowIpv4EigrpNeighborsDetail} eigrp.maker.outputs[ShowIpv6EigrpNeighborsDetail] = {'': EigrpOutput.ShowIpv6EigrpNeighborsDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + eigrp.learn() @@ -70,8 +72,7 @@ def test_empty_output(self): eigrp.maker.outputs[ShowIpv4EigrpNeighborsDetail] = {'': {}} eigrp.maker.outputs[ShowIpv6EigrpNeighborsDetail] = {'': {}} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + eigrp.learn() @@ -85,8 +86,7 @@ def test_missing_attributes(self): eigrp.maker.outputs[ShowIpv4EigrpNeighborsDetail] = {'': EigrpOutput.ShowIpv4EigrpNeighborsDetail} eigrp.maker.outputs[ShowIpv6EigrpNeighborsDetail] = {'': {}} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + eigrp.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/fdb/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/fdb/ios/__init__.py index 592bc0c2f..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/fdb/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/fdb/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/fdb/ios/tests/test_fdb.py b/pkgs/ops-pkg/src/genie/libs/ops/fdb/ios/tests/test_fdb.py index 05e57f3be..746999b48 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/fdb/ios/tests/test_fdb.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/fdb/ios/tests/test_fdb.py @@ -24,9 +24,9 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None @@ -73,7 +73,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + fdb = Fdb(device=self.device) # Get outputs fdb.maker.outputs[ShowMacAddressTable] = \ @@ -92,7 +92,7 @@ def test_incomplete_output(self): expect_dict = deepcopy(FdbOutput.Fdb_info) del(expect_dict['mac_aging_time']) del(expect_dict['mac_table']['vlans']['10']['mac_aging_time']) - + # Verify Ops was created successfully self.assertEqual(fdb.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/fdb/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/fdb/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/fdb/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/fdb/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/fdb/iosxe/tests/test_fdb.py b/pkgs/ops-pkg/src/genie/libs/ops/fdb/iosxe/tests/test_fdb.py index 0aa5c1da4..c8ad88b32 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/fdb/iosxe/tests/test_fdb.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/fdb/iosxe/tests/test_fdb.py @@ -24,9 +24,9 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None @@ -73,7 +73,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + fdb = Fdb(device=self.device) # Get outputs fdb.maker.outputs[ShowMacAddressTable] = \ @@ -92,7 +92,7 @@ def test_incomplete_output(self): expect_dict = deepcopy(FdbOutput.Fdb_info) del(expect_dict['mac_aging_time']) del(expect_dict['mac_table']['vlans']['10']['mac_aging_time']) - + # Verify Ops was created successfully self.assertEqual(fdb.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/fdb/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/fdb/nxos/__init__.py index 592bc0c2f..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/fdb/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/fdb/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/fdb/nxos/tests/test_fdb.py b/pkgs/ops-pkg/src/genie/libs/ops/fdb/nxos/tests/test_fdb.py index 1a7d5e911..af1fe096e 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/fdb/nxos/tests/test_fdb.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/fdb/nxos/tests/test_fdb.py @@ -27,14 +27,15 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None - self.device.execute = Mock() - self.device.execute.side_effect = mapper + fdb = Fdb(device=self.device) # Learn the feature @@ -46,8 +47,7 @@ def test_complete_output(self): def test_custom_output(self): self.maxDiff = None - self.device.execute = Mock() - self.device.execute.side_effect = mapper + fdb = Fdb(device=self.device) # Learn the feature diff --git a/pkgs/ops-pkg/src/genie/libs/ops/hsrp/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/hsrp/ios/__init__.py index 3e76c8dbc..1c4324a07 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/hsrp/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/hsrp/ios/__init__.py @@ -1,6 +1,6 @@ -try: - from genie import abstract - abstract.declare_token(__name__) -except Exception as e: - import warnings - warnings.warn('Could not declare abstraction token: ' + str(e)) +try: + from genie import abstract + abstract.declare_token(os='ios') +except Exception as e: + import warnings + warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/hsrp/ios/tests/test_hsrp.py b/pkgs/ops-pkg/src/genie/libs/ops/hsrp/ios/tests/test_hsrp.py index fc201a154..bd8ce97de 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/hsrp/ios/tests/test_hsrp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/hsrp/ios/tests/test_hsrp.py @@ -33,9 +33,11 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_full(self): self.maxDiff = None @@ -49,8 +51,7 @@ def test_full(self): # Get 'show standby delay' output hsrp.maker.outputs[ShowStandbyDelay] = {"": HsrpOutput.showStandbyDelayOutput} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature hsrp.learn() @@ -70,12 +71,11 @@ def test_selective_attribute(self): hsrp.maker.outputs[ShowStandbyDelay] = {"": HsrpOutput.showStandbyDelayOutput} # Get 'show standby delay' output hsrp.maker.outputs[ShowStandbyDelay] = {"": HsrpOutput.showStandbyDelayOutput} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature hsrp.learn() - + self.assertEqual( 99, hsrp.info["GigabitEthernet1"]["delay"]["minimum_delay"] @@ -93,8 +93,7 @@ def test_missing_attributes(self): # Get 'show standby delay' output hsrp.maker.outputs[ShowStandbyDelay] = {"": HsrpOutput.showStandbyDelayOutput} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature hsrp.learn() @@ -114,8 +113,7 @@ def test_incomplete_output(self): # Get 'show standby delay' output hsrp.maker.outputs[ShowStandbyDelay] = {"": HsrpOutput.showStandbyDelayOutput} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature hsrp.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxr/__init__.py index 592bc0c2f..481045c21 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/hsrp/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/hsrp/nxos/__init__.py index 592bc0c2f..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/hsrp/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/hsrp/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/igmp/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/igmp/ios/__init__.py index 592bc0c2f..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/igmp/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/igmp/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/igmp/ios/tests/test_igmp.py b/pkgs/ops-pkg/src/genie/libs/ops/igmp/ios/tests/test_igmp.py index f0f96cb51..728dd58e9 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/igmp/ios/tests/test_igmp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/igmp/ios/tests/test_igmp.py @@ -56,9 +56,11 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -68,8 +70,7 @@ def test_complete_output(self): {'': IgmpOutput.ShowVrfDetail} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature igmp.learn() @@ -118,11 +119,10 @@ def test_selective_attribute(self): {'': IgmpOutput.ShowVrfDetail} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature - igmp.learn() + igmp.learn() # Check specific attribute values # info - default vrf @@ -133,7 +133,7 @@ def test_selective_attribute(self): def test_incomplete_output(self): self.maxDiff = None - + igmp = Igmp(device=self.device) # Get outputs @@ -159,7 +159,7 @@ def test_incomplete_output(self): del(expect_dict['vrfs']['VRF1']['interfaces']['GigabitEthernet2']['group']) del(expect_dict['vrfs']['VRF1']['ssm_map']) - + # Verify Ops was created successfully self.assertEqual(igmp.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxe/tests/test_igmp.py b/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxe/tests/test_igmp.py index 92b31616d..06e8251bf 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxe/tests/test_igmp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxe/tests/test_igmp.py @@ -56,9 +56,11 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -68,8 +70,7 @@ def test_complete_output(self): {'': IgmpOutput.ShowVrfDetail} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature igmp.learn() @@ -118,11 +119,10 @@ def test_selective_attribute(self): {'': IgmpOutput.ShowVrfDetail} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature - igmp.learn() + igmp.learn() # Check specific attribute values # info - default vrf @@ -133,7 +133,7 @@ def test_selective_attribute(self): def test_incomplete_output(self): self.maxDiff = None - + igmp = Igmp(device=self.device) # Get outputs @@ -159,7 +159,7 @@ def test_incomplete_output(self): del(expect_dict['vrfs']['VRF1']['interfaces']['GigabitEthernet2']['group']) del(expect_dict['vrfs']['VRF1']['ssm_map']) - + # Verify Ops was created successfully self.assertEqual(igmp.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxr/__init__.py index 592bc0c2f..481045c21 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxr/tests/test_igmp.py b/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxr/tests/test_igmp.py index 599bf3c6a..01135ed34 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxr/tests/test_igmp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxr/tests/test_igmp.py @@ -13,10 +13,10 @@ from genie.libs.parser.iosxr.show_igmp import ShowIgmpInterface, \ ShowIgmpSummary, \ ShowIgmpGroupsDetail - + # iosxr show_vrf from genie.libs.parser.iosxr.show_vrf import ShowVrfAllDetail - + class test_igmp(unittest.TestCase): def setUp(self): @@ -24,7 +24,11 @@ def setUp(self): self.device.os = 'iosxr' self.device.mapping = {} self.device.mapping['cli'] = 'cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_full_igmp(self): self.maxDiff = None @@ -43,7 +47,7 @@ def test_full_igmp(self): # Verify Ops was created successfully self.assertEqual(igmp.info, IgmpOutput.IgmpOpsOutput) - + def test_selective_attribute_igmp(self): self.maxDiff = None igmp = Igmp(device=self.device) @@ -65,7 +69,7 @@ def test_selective_attribute_igmp(self): # Check does not match self.assertNotEqual('disabled', igmp.info['vrfs']['default']['interfaces']['Loopback0']['enable']) - + def test_missing_attributes_igmp(self): igmp = Igmp(device=self.device) # Get outputs @@ -82,7 +86,7 @@ def test_missing_attributes_igmp(self): with self.assertRaises(KeyError): status = igmp.info['robustness_value'] - + def test_empty_output_igmp(self): self.maxDiff = None igmp = Igmp(device=self.device) @@ -120,6 +124,6 @@ def test_igmp_groups_detail(self): # Verify Ops was created successfully self.assertEqual(igmp.info, IgmpOutput.IgmpOpsOutputSourceList) - + if __name__ == '__main__': unittest.main() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/igmp/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/igmp/nxos/__init__.py index 592bc0c2f..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/igmp/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/igmp/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/igmp/nxos/tests/test_igmp.py b/pkgs/ops-pkg/src/genie/libs/ops/igmp/nxos/tests/test_igmp.py index 90745652c..2616661aa 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/igmp/nxos/tests/test_igmp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/igmp/nxos/tests/test_igmp.py @@ -23,9 +23,9 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None @@ -81,7 +81,7 @@ def test_selective_attribute(self): {"{'vrf':'all'}": IgmpOutput.ShowIpIgmpLocalGroups} # Learn the feature - igmp.learn() + igmp.learn() # Check specific attribute values # info - default vrf @@ -93,7 +93,7 @@ def test_selective_attribute(self): def test_incomplete_output(self): self.maxDiff = None - + igmp = Igmp(device=self.device) # Get outputs @@ -116,7 +116,7 @@ def test_incomplete_output(self): del(expect_dict['vrfs']['VRF1']['interfaces']['Ethernet2/4']['join_group']) del(expect_dict['vrfs']['VRF1']['interfaces']['Ethernet2/4']['static_group']) - + # Verify Ops was created successfully self.assertEqual(igmp.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/interface/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/interface/ios/__init__.py index 592bc0c2f..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/interface/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/interface/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/interface/ios/tests/test_interface.py b/pkgs/ops-pkg/src/genie/libs/ops/interface/ios/tests/test_interface.py index 3782ef677..be04afd78 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/interface/ios/tests/test_interface.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/interface/ios/tests/test_interface.py @@ -43,16 +43,25 @@ def setUp(self): self.device.os = 'ios' self.device.mapping={} self.device.mapping['cli']='cli' + + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper + self.device.custom = AttrDict(abstraction=AttrDict(order=['os', 'platform'])) - self.device.connectionmgr.connections['cli'] = self.device + + # ! Removed due to causing a recursion error. + # ! This is not standard practice when mocking a device. + # self.device.connectionmgr.connections['cli'] = self.device def test_complete_output(self): self.maxDiff = None intf = Interface(device=self.device) # Get outputs - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() # Verify Ops was created successfully @@ -76,8 +85,7 @@ def test_empty_output(self): outputs['show ip interface'] = '' outputs['show ipv6 interface'] = '' outputs['show interfaces accounting'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() @@ -108,8 +116,7 @@ def test_incomplete_output(self): intf = Interface(device=self.device) outputs['show ip interface'] = '' outputs['show ipv6 interface'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/asr1k/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/asr1k/__init__.py index 592bc0c2f..a8ccaf962 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/asr1k/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/asr1k/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='asr1k') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/asr1k/tests/test_interface.py b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/asr1k/tests/test_interface.py index f62cc9c36..bbf6fc2d1 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/asr1k/tests/test_interface.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/asr1k/tests/test_interface.py @@ -15,7 +15,7 @@ ShowIpInterface, \ ShowIpv6Interface, \ ShowInterfacesAccounting - + from genie.libs.parser.iosxe.show_vrf import ShowVrf from genie.libs.parser.iosxe.show_lag import ShowEtherchannelSummary @@ -41,16 +41,17 @@ def setUp(self): self.device.os = 'iosxe' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None intf = Interface(device=self.device) # Get outputs - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() @@ -60,8 +61,7 @@ def test_complete_output(self): def test_custom_output(self): intf = Interface(device=self.device) - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn(interface='GigabitEthernet1/0/1', address_family='ipv4') @@ -82,8 +82,7 @@ def test_empty_output(self): outputs['show ipv6 interface'] = '' outputs['show interfaces accounting'] = '' outputs['show etherchannel summary'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() @@ -114,8 +113,7 @@ def test_selective_attribute(self): self.maxDiff = None intf = Interface(device=self.device) # Get outputs - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() @@ -141,8 +139,7 @@ def test_incomplete_output(self): intf.maker.outputs[ShowInterfacesAccounting] = \ {'':InterfaceOutput.ShowInterfacesAccountingCustom} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn(custom=custom) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/c3850/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/c3850/__init__.py index 592bc0c2f..e35102dca 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/c3850/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/c3850/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='cat3k', model='c3850') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/c3850/tests/test_interface.py b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/c3850/tests/test_interface.py index e34eed50b..32453831a 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/c3850/tests/test_interface.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/c3850/tests/test_interface.py @@ -16,7 +16,7 @@ ShowIpInterface, \ ShowIpv6Interface, \ ShowInterfacesAccounting - + from genie.libs.parser.iosxe.show_vrf import ShowVrf @@ -43,16 +43,17 @@ def setUp(self): self.device.os = 'iosxe' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None intf = Interface(device=self.device) - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() # Verify Ops was created successfully @@ -73,8 +74,7 @@ def test_empty_output(self): outputs['show ipv6 interface'] = '' outputs['show interfaces accounting'] = '' outputs['show interfaces switchport'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() @@ -110,8 +110,7 @@ def test_empty_output(self): def test_custom_output(self): intf = Interface(device=self.device) - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn(interface='GigabitEthernet1/0/1', address_family='ipv4') @@ -123,8 +122,7 @@ def test_selective_attribute(self): self.maxDiff = None intf = Interface(device=self.device) - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() @@ -146,8 +144,7 @@ def test_incomplete_output(self): outputs['show ip interface'] = '' intf.maker.outputs[ShowInterfacesAccounting] = \ {'':InterfaceOutput.ShowInterfacesAccountingCustom} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn(custom=custom) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/tests/test_interface.py b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/tests/test_interface.py index d6e1ee59f..ed5836b72 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/tests/test_interface.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/tests/test_interface.py @@ -42,17 +42,24 @@ def setUp(self): self.device.os = 'iosxe' self.device.mapping={} self.device.mapping['cli']='cli' + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper self.device.custom = AttrDict(abstraction=AttrDict(order=['os', 'platform'])) + + # ! Removed due to causing a recursion error. + # ! This is not standard practice when mocking a device. # Give the device as a connection type # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # self.device.connectionmgr.connections['cli'] = self.device def test_complete_output(self): self.maxDiff = None intf = Interface(device=self.device) - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() # Verify Ops was created successfully @@ -71,8 +78,7 @@ def test_empty_output(self): outputs['show ip interface'] = '' outputs['show ipv6 interface'] = '' outputs['show interfaces accounting'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() @@ -101,8 +107,7 @@ def test_empty_output(self): def test_custom_output(self): intf = Interface(device=self.device) - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn(interface='GigabitEthernet1/0/1', vrf='VRF1', address_family='ipv4') @@ -114,8 +119,7 @@ def test_selective_attribute(self): self.maxDiff = None intf = Interface(device=self.device) - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() @@ -138,8 +142,7 @@ def test_incomplete_output(self): intf.maker.outputs[ShowInterfacesAccounting] = \ {'':InterfaceOutput.ShowInterfacesAccountingCustom} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn(custom=custom) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/__init__.py index 592bc0c2f..481045c21 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/interface.py b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/interface.py index bb0fda28e..0985a37d4 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/interface.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/interface.py @@ -1,4 +1,4 @@ -''' +''' Interface Genie Ops Object for IOSXR - CLI. ''' # python diff --git a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/tests/test_interface.py b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/tests/test_interface.py index 882999623..47c9033fd 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/tests/test_interface.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/tests/test_interface.py @@ -48,9 +48,11 @@ def setUp(self): self.device.os = 'iosxr' self.device.mapping = {} self.device.mapping['cli'] = 'cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -67,8 +69,7 @@ def test_complete_output(self): intf.maker.outputs[ShowInterfacesAccounting] = \ {"{'interface':''}": InterfaceOutput.ShowInterfacesAccounting} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() @@ -87,8 +88,7 @@ def test_empty_output(self): intf.maker.outputs[ShowInterfacesAccounting] = {"{'interface':''}": ''} outputs['show ipv4 vrf all interface'] = '' outputs['show ipv6 vrf all interface'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() @@ -112,8 +112,7 @@ def test_custom_output(self): intf.maker.outputs[ShowVrfAllDetail] = \ {"{'vrf':''}": InterfaceOutput.ShowVrfAllDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn(interface='GigabitEthernet0/0/0/1', address_family='ipv6', vrf='VRF1') @@ -142,8 +141,7 @@ def test_selective_attribute(self): intf.maker.outputs[ShowInterfacesAccounting] = \ {"{'interface':''}": InterfaceOutput.ShowInterfacesAccounting} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() @@ -167,8 +165,7 @@ def test_incomplete_output(self): intf.maker.outputs[ShowInterfacesAccounting] = \ {"{'interface':''}": InterfaceOutput.ShowInterfacesAccounting} outputs['show ipv4 vrf all interface'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/interface/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/interface/nxos/__init__.py index 592bc0c2f..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/interface/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/interface/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/interface/nxos/tests/test_interface.py b/pkgs/ops-pkg/src/genie/libs/ops/interface/nxos/tests/test_interface.py index f7e3d5f6e..39da66b8e 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/interface/nxos/tests/test_interface.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/interface/nxos/tests/test_interface.py @@ -36,9 +36,11 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -50,8 +52,7 @@ def test_complete_output(self): intf.maker.outputs[ShowRoutingIpv6VrfAll] = \ {"{'vrf':''}":InterfaceOutput.ShowRoutingIpv6VrfAll} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() @@ -66,8 +67,7 @@ def test_custom_output(self): intf.maker.outputs[ShowRoutingVrfAll] = \ {"{'vrf':'VRF1'}":InterfaceOutput.ShowRoutingVrfAll_vrf1} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn(interface='Ethernet2/1', vrf='VRF1', address_family='ipv4') @@ -86,8 +86,7 @@ def test_empty_output(self): 'show ipv6 interface vrf all'] = '' intf.maker.outputs[ShowRoutingVrfAll] = {"{'vrf':''}":''} intf.maker.outputs[ShowRoutingIpv6VrfAll] = {"{'vrf':''}":''} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature intf.learn() @@ -111,10 +110,9 @@ def test_selective_attribute(self): intf.maker.outputs[ShowRoutingIpv6VrfAll] = \ {"{'vrf':''}":InterfaceOutput.ShowRoutingIpv6VrfAll} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature - intf.learn() + intf.learn() # Check specific attribute values # info - vrf @@ -133,16 +131,15 @@ def test_incomplete_output(self): intf.maker.outputs[ShowRoutingIpv6VrfAll] = \ {"{'vrf':''}":InterfaceOutput.ShowRoutingIpv6VrfAll} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature - intf.learn() + intf.learn() # Delete missing specific attribute values expect_dict = deepcopy(InterfaceOutput.InterfaceOpsOutput_info) del(expect_dict['Ethernet2/1']['ipv4']['10.2.2.2/24']['route_tag']) del(expect_dict['Ethernet2/1']['ipv4']['10.2.2.2/24']['origin']) - + # Verify Ops was created successfully self.assertDictEqual(intf.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/isis/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/isis/ios/__init__.py index 3e76c8dbc..1c4324a07 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/isis/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/isis/ios/__init__.py @@ -1,6 +1,6 @@ -try: - from genie import abstract - abstract.declare_token(__name__) -except Exception as e: - import warnings - warnings.warn('Could not declare abstraction token: ' + str(e)) +try: + from genie import abstract + abstract.declare_token(os='ios') +except Exception as e: + import warnings + warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/isis/ios/tests/test_isis.py b/pkgs/ops-pkg/src/genie/libs/ops/isis/ios/tests/test_isis.py index b3c98b564..084276add 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/isis/ios/tests/test_isis.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/isis/ios/tests/test_isis.py @@ -40,15 +40,18 @@ def setUp(self): self.device.os = 'ios' self.device.mapping = {} self.device.mapping['cli'] = 'cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_full_isis(self): f = Isis(device=self.device) f.maker.outputs[ShowRunSectionIsis] = {'': IsisOutput.showRunSectionIsis} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() self.maxDiff = None @@ -59,8 +62,7 @@ def test_selective_attribute_isis(self): f = Isis(device=self.device) f.maker.outputs[ShowRunSectionIsis] = {'': IsisOutput.showRunSectionIsis} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -82,8 +84,7 @@ def test_missing_attributes_Isis(self): f.maker.outputs[ShowRunSectionIsis] = {'': IsisOutput.showRunSectionIsis} # Get 'show ip static route' output - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -110,8 +111,7 @@ def test_empty_output_Isis(self): outputs['show clns traffic'] = {'': {}} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxe/tests/test_isis.py b/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxe/tests/test_isis.py index 9d94c1bbb..771af8bc1 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxe/tests/test_isis.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxe/tests/test_isis.py @@ -40,15 +40,18 @@ def setUp(self): self.device.os = 'iosxe' self.device.mapping = {} self.device.mapping['cli'] = 'cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_full_isis(self): f = Isis(device=self.device) f.maker.outputs[ShowRunSectionIsis] = {'': IsisOutput.showRunSectionIsis} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() self.maxDiff = None @@ -59,8 +62,7 @@ def test_selective_attribute_isis(self): f = Isis(device=self.device) f.maker.outputs[ShowRunSectionIsis] = {'': IsisOutput.showRunSectionIsis} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -82,8 +84,7 @@ def test_missing_attributes_Isis(self): f.maker.outputs[ShowRunSectionIsis] = {'': IsisOutput.showRunSectionIsis} # Get 'show ip static route' output - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -110,8 +111,7 @@ def test_empty_output_Isis(self): outputs['show clns traffic'] = {'': {}} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxr/__init__.py index 592bc0c2f..481045c21 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxr/tests/test_isis.py b/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxr/tests/test_isis.py index c2777bfe4..798675f4c 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxr/tests/test_isis.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxr/tests/test_isis.py @@ -39,12 +39,15 @@ def setUp(self): self.device.os = 'iosxr' self.device.mapping = {} self.device.mapping['cli'] = 'cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_full_isis(self): isis = Isis(device=self.device) - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature isis.learn() @@ -55,8 +58,7 @@ def test_full_isis(self): def test_selective_attribute_isis(self): isis = Isis(device=self.device) - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature isis.learn() @@ -78,8 +80,7 @@ def test_missing_attributes_Isis(self): outputs['show isis hostname'] = '' outputs['show isis database detail'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature isis.learn() @@ -105,8 +106,7 @@ def test_empty_output_Isis(self): outputs['show isis statistics'] = '' outputs['show isis database detail'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature isis.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/isis/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/isis/nxos/__init__.py index 592bc0c2f..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/isis/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/isis/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/isis/nxos/tests/test_isis.py b/pkgs/ops-pkg/src/genie/libs/ops/isis/nxos/tests/test_isis.py index 43d58040f..3217e8e82 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/isis/nxos/tests/test_isis.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/isis/nxos/tests/test_isis.py @@ -32,12 +32,15 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping = {} self.device.mapping['cli'] = 'cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_full_isis(self): isis = Isis(device=self.device) - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature isis.learn(vrf='all') self.maxDiff = None @@ -46,8 +49,7 @@ def test_full_isis(self): def test_selective_attribute_isis(self): isis = Isis(device=self.device) - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature isis.learn() @@ -69,8 +71,7 @@ def test_missing_attributes_Isis(self): outputs['show isis hostname detail vrf all'] = '' outputs['show isis database detail vrf all'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature isis.learn() @@ -93,8 +94,7 @@ def test_empty_output_Isis(self): outputs['show isis hostname detail vrf all'] = '' outputs['show isis database detail vrf all'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature isis.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lag/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/lag/ios/__init__.py index 592bc0c2f..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/lag/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lag/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lag/ios/tests/test_lag.py b/pkgs/ops-pkg/src/genie/libs/ops/lag/ios/tests/test_lag.py index 2d82f6aa9..6d6641604 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/lag/ios/tests/test_lag.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lag/ios/tests/test_lag.py @@ -29,9 +29,9 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None @@ -92,7 +92,7 @@ def test_empty_output(self): lag.maker.outputs[ShowPagpNeighbor] = \ {'': {}} - + lag.maker.outputs[ShowPagpInternal] = \ {'': {}} @@ -106,7 +106,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + lag = Lag(device=self.device) # Get outputs lag.maker.outputs[ShowLacpSysId] = \ @@ -126,7 +126,7 @@ def test_incomplete_output(self): lag.maker.outputs[ShowPagpNeighbor] = \ {'': LagOutput.ShowPagpNeighbor} - + lag.maker.outputs[ShowPagpInternal] = \ {'': {}} diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxe/tests/test_lag.py b/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxe/tests/test_lag.py index 3951e62b5..08cb36309 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxe/tests/test_lag.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxe/tests/test_lag.py @@ -29,9 +29,9 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None @@ -92,7 +92,7 @@ def test_empty_output(self): lag.maker.outputs[ShowPagpNeighbor] = \ {'': {}} - + lag.maker.outputs[ShowPagpInternal] = \ {'': {}} @@ -106,7 +106,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + lag = Lag(device=self.device) # Get outputs lag.maker.outputs[ShowLacpSysId] = \ @@ -126,7 +126,7 @@ def test_incomplete_output(self): lag.maker.outputs[ShowPagpNeighbor] = \ {'': LagOutput.ShowPagpNeighbor} - + lag.maker.outputs[ShowPagpInternal] = \ {'': {}} diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxr/__init__.py index 592bc0c2f..481045c21 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxr/tests/test_lag.py b/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxr/tests/test_lag.py index 7adcf6431..dfa40798b 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxr/tests/test_lag.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxr/tests/test_lag.py @@ -21,7 +21,9 @@ def setUp(self): self.device.os = 'iosxr' self.device.mapping = {} self.device.mapping['cli'] = 'cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_full_lag(self): self.maxDiff = None diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lisp/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/lisp/ios/__init__.py index 592bc0c2f..1c4324a07 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/lisp/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lisp/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lisp/ios/tests/test_lisp.py b/pkgs/ops-pkg/src/genie/libs/ops/lisp/ios/tests/test_lisp.py index c50b14320..223faafb3 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/lisp/ios/tests/test_lisp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lisp/ios/tests/test_lisp.py @@ -100,9 +100,11 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): @@ -110,8 +112,7 @@ def test_complete_output(self): lisp = Lisp(device=self.device) # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature lisp.learn() @@ -125,8 +126,7 @@ def test_selective_attribute(self): lisp = Lisp(device=self.device) # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature lisp.learn() @@ -145,6 +145,7 @@ def test_empty_output(self): # Return outputs above as inputs to parser when called self.device.execute = Mock() self.device.execute.side_effect = empty_mapper + self.device_connection.execute.side_effect = empty_mapper # Learn the feature lisp.learn() @@ -161,6 +162,7 @@ def test_missing_attributes(self): # Return outputs above as inputs to parser when called self.device.execute = Mock() self.device.execute.side_effect = incomplete_mapper + self.device_connection.execute.side_effect = incomplete_mapper # Learn the feature lisp.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lisp/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/lisp/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/lisp/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lisp/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lisp/iosxe/tests/test_lisp.py b/pkgs/ops-pkg/src/genie/libs/ops/lisp/iosxe/tests/test_lisp.py index 3e750fd8b..475179e14 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/lisp/iosxe/tests/test_lisp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lisp/iosxe/tests/test_lisp.py @@ -100,9 +100,11 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): @@ -110,8 +112,7 @@ def test_complete_output(self): lisp = Lisp(device=self.device) # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature lisp.learn() @@ -124,8 +125,7 @@ def test_selective_attribute(self): lisp = Lisp(device=self.device) # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature lisp.learn() @@ -144,6 +144,7 @@ def test_empty_output(self): # Return outputs above as inputs to parser when called self.device.execute = Mock() self.device.execute.side_effect = empty_mapper + self.device_connection.execute.side_effect = empty_mapper # Learn the feature lisp.learn() @@ -160,6 +161,7 @@ def test_missing_attributes(self): # Return outputs above as inputs to parser when called self.device.execute = Mock() self.device.execute.side_effect = incomplete_mapper + self.device_connection.execute.side_effect = incomplete_mapper # Learn the feature lisp.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lldp/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/lldp/ios/__init__.py index 592bc0c2f..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/lldp/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lldp/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lldp/ios/tests/test_lldp.py b/pkgs/ops-pkg/src/genie/libs/ops/lldp/ios/tests/test_lldp.py index 05bae0d89..bc45424e6 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/lldp/ios/tests/test_lldp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lldp/ios/tests/test_lldp.py @@ -26,9 +26,9 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None @@ -88,7 +88,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + lldp = Lldp(device=self.device) # Get outputs lldp.maker.outputs[ShowLldp] = \ @@ -96,7 +96,7 @@ def test_incomplete_output(self): lldp.maker.outputs[ShowLldpEntry] = \ {'': LldpOutput.ShowLldpEntry} - + lldp.maker.outputs[ShowLldpNeighborsDetail] = \ {'': LldpOutput.ShowLldpNeighborsDetail} @@ -115,7 +115,7 @@ def test_incomplete_output(self): del(expect_dict['interfaces']['GigabitEthernet1/0/16']['enabled']) del(expect_dict['interfaces']['GigabitEthernet1/0/17']['enabled']) del(expect_dict['interfaces']['GigabitEthernet2/0/15']['enabled']) - + # Verify Ops was created successfully self.assertEqual(lldp.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxe/tests/test_lldp.py b/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxe/tests/test_lldp.py index 720a117bc..9ffae9595 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxe/tests/test_lldp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxe/tests/test_lldp.py @@ -26,9 +26,9 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None @@ -88,7 +88,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + lldp = Lldp(device=self.device) # Get outputs lldp.maker.outputs[ShowLldp] = \ @@ -96,7 +96,7 @@ def test_incomplete_output(self): lldp.maker.outputs[ShowLldpEntry] = \ {'': LldpOutput.ShowLldpEntry} - + lldp.maker.outputs[ShowLldpNeighborsDetail] = \ {'': LldpOutput.ShowLldpNeighborsDetail} @@ -115,7 +115,7 @@ def test_incomplete_output(self): del(expect_dict['interfaces']['GigabitEthernet1/0/16']['enabled']) del(expect_dict['interfaces']['GigabitEthernet1/0/17']['enabled']) del(expect_dict['interfaces']['GigabitEthernet2/0/15']['enabled']) - + # Verify Ops was created successfully self.assertEqual(lldp.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxr/__init__.py index 592bc0c2f..481045c21 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxr/tests/test_lldp.py b/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxr/tests/test_lldp.py index 0c3fa83ff..a91ef8e81 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxr/tests/test_lldp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxr/tests/test_lldp.py @@ -24,9 +24,9 @@ def setUp(self): self.device.os = 'iosxr' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None @@ -49,7 +49,7 @@ def test_complete_output(self): # Learn the feature lldp.learn() - + # Verify Ops was created successfully self.assertEqual(lldp.info, LldpOutput.lldpOutput) @@ -89,7 +89,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + lldp = Lldp(device=self.device) # Get outputs lldp.maker.outputs[ShowLldp] = \ @@ -111,10 +111,10 @@ def test_incomplete_output(self): del(LldpOutput.ShowLldp['hello_timer']) # Learn the feature lldp.learn() - + # Delete missing specific attribute values expect_dict = deepcopy(LldpOutput.lldpOutput) - del(expect_dict['hello_timer']) + del(expect_dict['hello_timer']) # Verify Ops was created successfully self.assertEqual(lldp.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lldp/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/lldp/nxos/__init__.py index 3e76c8dbc..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/lldp/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lldp/nxos/__init__.py @@ -1,6 +1,6 @@ -try: - from genie import abstract - abstract.declare_token(__name__) -except Exception as e: - import warnings - warnings.warn('Could not declare abstraction token: ' + str(e)) +try: + from genie import abstract + abstract.declare_token(os='nxos') +except Exception as e: + import warnings + warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/lldp/nxos/tests/test_lldp.py b/pkgs/ops-pkg/src/genie/libs/ops/lldp/nxos/tests/test_lldp.py index 520eea9c6..4a51da7da 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/lldp/nxos/tests/test_lldp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/lldp/nxos/tests/test_lldp.py @@ -22,7 +22,9 @@ def setUp(self): self.device.os = 'iosxe' self.device.mapping={} self.device.mapping['cli']='cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None diff --git a/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/cat9500/platform/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/management/__init__.py similarity index 100% rename from pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/cat9500/platform/__init__.py rename to pkgs/ops-pkg/src/genie/libs/ops/management/__init__.py diff --git a/pkgs/ops-pkg/src/genie/libs/ops/management/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/management/iosxr/__init__.py new file mode 100755 index 000000000..592bc0c2f --- /dev/null +++ b/pkgs/ops-pkg/src/genie/libs/ops/management/iosxr/__init__.py @@ -0,0 +1,6 @@ +try: + from genie import abstract + abstract.declare_token(__name__) +except Exception as e: + import warnings + warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/management/iosxr/management.py b/pkgs/ops-pkg/src/genie/libs/ops/management/iosxr/management.py new file mode 100644 index 000000000..c87709053 --- /dev/null +++ b/pkgs/ops-pkg/src/genie/libs/ops/management/iosxr/management.py @@ -0,0 +1,50 @@ +''' +Platform Genie Ops Object for IOSXR. +''' +import logging + +# super class +from genie.libs.ops.management.management import Management as SuperManagement + +logger = logging.getLogger(__name__) + + +class Management(SuperManagement): + '''Management Genie Ops Object''' + + def learn(self): + + self.add_leaf(cmd='show ipv4 virtual address status', + src='[virtual_address][virtual_ip]', + dest='info[management][ipv4][virtual_address]') + + self.add_leaf(cmd='show ipv4 virtual address status', + src='[virtual_address][active_interface_name]', + dest='info[management][interface]') + + self.add_leaf(cmd='show ipv4 virtual address status', + src='[virtual_address][vrf_name]', + dest='info[management][vrf]') + + self.make() + + if hasattr(self, 'info') and self.info: + + iface = self.info['management']['interface'] + + self.add_leaf(cmd=f'show route ipv4 next-hop {iface}', + src='[vrf][default][address_family][ipv4][routes]' + '[(?P.*)][next_hop][next_hop_list][(?P).*][next_hop]', + dest='info[routes][ipv4][(?P.*)][next_hop]', + next_hop=iface + ) + + self.add_leaf(cmd=f'show route ipv4 next-hop {iface}', + src='[vrf][default][address_family][ipv4][routes]' + '[(?P.*)][source_protocol]', + dest='info[routes][ipv4][(?P.*)][source_protocol]', + next_hop=iface + ) + + # Make Ops object + self.make(final_call=True) diff --git a/pkgs/sdk-pkg/src/genie/libs/sdk/apis/tests/iosxe/c960/configure/configure_datalink_flow_monitor/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/management/iosxr/tests/__init__.py similarity index 100% rename from pkgs/sdk-pkg/src/genie/libs/sdk/apis/tests/iosxe/c960/configure/configure_datalink_flow_monitor/__init__.py rename to pkgs/ops-pkg/src/genie/libs/ops/management/iosxr/tests/__init__.py diff --git a/pkgs/ops-pkg/src/genie/libs/ops/management/iosxr/tests/management_output.py b/pkgs/ops-pkg/src/genie/libs/ops/management/iosxr/tests/management_output.py new file mode 100755 index 000000000..3166b800b --- /dev/null +++ b/pkgs/ops-pkg/src/genie/libs/ops/management/iosxr/tests/management_output.py @@ -0,0 +1,68 @@ +class ManagementOutput(object): + + # Show Ipv4 Virtual Address Status output + showIpv4VirtualAddressStatusOutput = ''' + VRF Name: default + Virtual IP: 5.2.21.22/16 + Active Interface Name: MgmtEth0/RP0/CPU0/0 + Active Interface MAC Address: 88fc.5dc4.9d90 + + VRF Node Create Timestamp : .7337 + ARP Add Timestamp : Sat Jul 01 2002241054 16:32:19.1471 + RIB Add Timestamp : .7337 + SNMAC Add Timestamp : N/A + ''' + + # Show Route Ipv4 output + showRouteIpv4Output = ''' + Codes: C - connected, S - static, R - RIP, B - BGP, (>) - Diversion path + D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area + N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 + E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP + i - ISIS, L1 - IS-IS level-1, L2 - IS-IS level-2 + ia - IS-IS inter area, su - IS-IS summary null, * - candidate default + U - per-user static route, o - ODR, L - local, G - DAGR, l - LISP + A - access/subscriber, a - Application route + M - mobile route, r - RPL, t - Traffic Engineering, (!) - FRR Backup path + Gateway of last resort is 5.4.0.1 to network 0.0.0.0 + + S* 0.0.0.0/0 [1/0] via 5.4.0.1, 1w1d + C 5.4.0.0/16 is directly connected, 1w1d, MgmtEth0/RP0/CPU0/0 + is directly connected, 1w1d, MgmtEth0/RP1/CPU0/0 + L 5.4.23.20/32 is directly connected, 1w1d, MgmtEth0/RP0/CPU0/0 + L 5.4.23.22/32 [0/0] via 5.4.23.22, 1w1d, MgmtEth0/RP0/CPU0/0 + S 5.255.253.6/32 [1/0] via 5.4.0.1, 1w1d + ''' + + # Ops output + ManagementOpsOutput = { + 'management': { + 'ipv4': { + 'virtual_address': '5.2.21.22/16' + }, + 'interface': 'MgmtEth0/RP0/CPU0/0', + 'vrf': 'default' + }, + 'routes': { + 'ipv4': { + '5.255.253.6/32': { + 'next_hop': '5.4.0.1', + 'source_protocol': 'static' + }, + '5.4.23.22/32': { + 'next_hop': '5.4.23.22', + 'source_protocol': 'local' + }, + '0.0.0.0/0': { + 'next_hop': '5.4.0.1', + 'source_protocol': 'static' + }, + '5.4.23.20/32': { + 'source_protocol': 'local' + }, + '5.4.0.0/16': { + 'source_protocol': 'connected' + } + } + } + } \ No newline at end of file diff --git a/pkgs/ops-pkg/src/genie/libs/ops/management/iosxr/tests/test_management.py b/pkgs/ops-pkg/src/genie/libs/ops/management/iosxr/tests/test_management.py new file mode 100755 index 000000000..c23faa5f5 --- /dev/null +++ b/pkgs/ops-pkg/src/genie/libs/ops/management/iosxr/tests/test_management.py @@ -0,0 +1,57 @@ +# Python +import unittest +from unittest.mock import Mock + +# ATS +from pyats.topology import Device + +from genie.libs.ops.management.iosxr.management import Management +from genie.libs.ops.management.iosxr.tests.management_output import ManagementOutput + +# Parser +from genie.libs.parser.iosxr.show_ipv4 import ShowIpv4VirtualAddressStatus +from genie.libs.parser.iosxr.show_routing import ShowRouteIpv4 + +outputs = { + 'show ipv4 virtual address status' : ManagementOutput.showIpv4VirtualAddressStatusOutput, + 'show route ipv4 next-hop MgmtEth0/RP0/CPU0/0': ManagementOutput.showRouteIpv4Output +} + +def mapper(key): + return outputs[key] + +class test_management(unittest.TestCase): + + def setUp(self): + self.device = Device(name='aDevice', os='iosxr') + self.device.custom.setdefault("abstraction", {})["order"] = ["os"] + self.device.mapping = {'cli': 'cli'} + self.device.connectionmgr.connections['cli'] = self.device + + def test_complete_output(self): + self.maxDiff = None + m = Management(device=self.device) + self.device.execute = Mock() + self.device.execute.side_effect = mapper + + # Learn the feature + m.learn() + + # Verify Ops was created successfully + self.assertEqual(m.info, ManagementOutput.ManagementOpsOutput) + + def test_selective_attribute(self): + self.maxDiff = None + m = Management(device=self.device) + + self.device.execute = Mock() + self.device.execute.side_effect = mapper + + # Learn the feature + m.learn() + + # Check selective attribute + self.assertEqual('5.4.0.1', m.info['routes']['ipv4']['5.255.253.6/32']['next_hop']) + +if __name__ == '__main__': + unittest.main() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/management/management.py b/pkgs/ops-pkg/src/genie/libs/ops/management/management.py new file mode 100644 index 000000000..ec4e61f52 --- /dev/null +++ b/pkgs/ops-pkg/src/genie/libs/ops/management/management.py @@ -0,0 +1,16 @@ +import re +# Genie +from genie.ops.base import Base +from genie.metaparser.util.schemaengine import Any + + +class Management(Base): + + schema = { + 'management': { + 'interface': str, + 'ipv4_address': Any(), + 'ipv4_gateway': Any(), + 'vrf': str, + } + } diff --git a/pkgs/ops-pkg/src/genie/libs/ops/mcast/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/mcast/ios/__init__.py index 592bc0c2f..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/mcast/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/mcast/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/mcast/ios/tests/test_mcast.py b/pkgs/ops-pkg/src/genie/libs/ops/mcast/ios/tests/test_mcast.py index 862b8e656..772cc917e 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/mcast/ios/tests/test_mcast.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/mcast/ios/tests/test_mcast.py @@ -48,9 +48,11 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): @@ -59,9 +61,6 @@ def test_complete_output(self): # Set outputs mcast.maker.outputs[ShowVrfDetail] = {'':McastOutput.ShowVrfDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper - # Learn the feature mcast.learn() self.maxDiff = None @@ -77,9 +76,6 @@ def test_selective_attribute(self): # Set outputs mcast.maker.outputs[ShowVrfDetail] = {'':McastOutput.ShowVrfDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper - # Learn the feature mcast.learn() @@ -99,8 +95,9 @@ def test_empty_output(self): # Set outputs mcast.maker.outputs[ShowVrfDetail] = {'':McastOutput.ShowVrfDetail} - self.device.execute = Mock() - self.device.execute.side_effect = ['','','','','','','','','','','',''] + self.device_connection.execute.side_effect = [ + '','','','','','','','','','','','' + ] # Learn the feature mcast.learn() @@ -123,12 +120,8 @@ def test_incomplete_output(self): # Set outputs mcast.maker.outputs[ShowVrfDetail] = {'':McastOutput.ShowVrfDetail} - - self.device.execute = Mock() outputs['show ip multicast'] = '' - self.device.execute.side_effect = mapper - # Learn the feature mcast.learn() @@ -136,7 +129,7 @@ def test_incomplete_output(self): expect_dict = deepcopy(McastOutput.McastInfo) del(expect_dict['vrf']['default']['address_family']['ipv4']['enable']) del(expect_dict['vrf']['default']['address_family']['ipv4']['multipath']) - + # Verify Ops was created successfully self.assertEqual(mcast.info, expect_dict) self.assertEqual(mcast.table, McastOutput.McastTable) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxe/tests/test_mcast.py b/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxe/tests/test_mcast.py index 225c7b872..5f83044b4 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxe/tests/test_mcast.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxe/tests/test_mcast.py @@ -48,9 +48,11 @@ def setUp(self): self.device.mapping={} self.device.custom['abstraction'] = {'order':['os']} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): @@ -59,9 +61,6 @@ def test_complete_output(self): # Set outputs mcast.maker.outputs[ShowVrfDetail] = {'':McastOutput.ShowVrfDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper - # Learn the feature mcast.learn() self.maxDiff = None @@ -77,9 +76,6 @@ def test_selective_attribute(self): # Set outputs mcast.maker.outputs[ShowVrfDetail] = {'':McastOutput.ShowVrfDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper - # Learn the feature mcast.learn() @@ -99,8 +95,9 @@ def test_empty_output(self): # Set outputs mcast.maker.outputs[ShowVrfDetail] = {'':McastOutput.ShowVrfDetail} - self.device.execute = Mock() - self.device.execute.side_effect = ['','','','','','','','','','','',''] + self.device_connection.execute.side_effect = [ + '','','','','','','','','','','','' + ] # Learn the feature mcast.learn() @@ -123,12 +120,8 @@ def test_incomplete_output(self): # Set outputs mcast.maker.outputs[ShowVrfDetail] = {'':McastOutput.ShowVrfDetail} - - self.device.execute = Mock() outputs['show ip multicast'] = '' - self.device.execute.side_effect = mapper - # Learn the feature mcast.learn() @@ -136,7 +129,7 @@ def test_incomplete_output(self): expect_dict = deepcopy(McastOutput.McastInfo) del(expect_dict['vrf']['default']['address_family']['ipv4']['enable']) del(expect_dict['vrf']['default']['address_family']['ipv4']['multipath']) - + # Verify Ops was created successfully self.assertEqual(mcast.info, expect_dict) self.assertEqual(mcast.table, McastOutput.McastTable) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxr/__init__.py index 592bc0c2f..481045c21 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxr/tests/test_mcast.py b/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxr/tests/test_mcast.py index ae8121042..e21b6ec56 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxr/tests/test_mcast.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxr/tests/test_mcast.py @@ -48,9 +48,11 @@ def setUp(self): self.device.os = 'iosxr' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper self.maxDiff = None def test_complete_output(self): @@ -58,10 +60,9 @@ def test_complete_output(self): # Set outputs mcast.maker.outputs[ShowVrfAllDetail] = {'':McastOutput.ShowVrfAllDetail} - + # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature mcast.learn() @@ -76,10 +77,8 @@ def test_selective_attribute(self): # Set outputs mcast.maker.outputs[ShowVrfAllDetail] = {'':McastOutput.ShowVrfAllDetail} - + # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper # Learn the feature mcast.learn() @@ -102,11 +101,10 @@ def test_empty_output(self): mcast.maker.outputs[ShowVrfAllDetail] = {'':McastOutput.ShowVrfAllDetail} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = ['', '', '', '', '', '', '', '', '',\ - '', '', '', '', '', '', '', '', '',\ - '', '', '', '', '', '', '', '', '',\ - '', '', '', '', ''] + self.device_connection.execute.side_effect = [ + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '' + ] # Learn the feature mcast.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/mcast/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/mcast/nxos/__init__.py index 592bc0c2f..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/mcast/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/mcast/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/mcast/nxos/tests/test_mcast.py b/pkgs/ops-pkg/src/genie/libs/ops/mcast/nxos/tests/test_mcast.py index d941a52ab..b52a9696a 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/mcast/nxos/tests/test_mcast.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/mcast/nxos/tests/test_mcast.py @@ -25,9 +25,9 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): diff --git a/pkgs/ops-pkg/src/genie/libs/ops/mld/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/mld/ios/__init__.py index 592bc0c2f..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/mld/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/mld/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/mld/ios/tests/test_mld.py b/pkgs/ops-pkg/src/genie/libs/ops/mld/ios/tests/test_mld.py index 35ad07d20..a706b2ff0 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/mld/ios/tests/test_mld.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/mld/ios/tests/test_mld.py @@ -43,9 +43,11 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -61,8 +63,7 @@ def test_complete_output(self): {"{'vrf':''}": MldOutput.ShowIpv6MldGroupsDetail_default} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature mld.learn() @@ -119,11 +120,10 @@ def test_selective_attribute(self): {"{'vrf':''}": MldOutput.ShowIpv6MldGroupsDetail_default} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature - mld.learn() + mld.learn() # Check specific attribute values # info - default vrf @@ -134,7 +134,7 @@ def test_selective_attribute(self): def test_incomplete_output(self): self.maxDiff = None - + mld = Mld(device=self.device) # Get outputs @@ -156,7 +156,7 @@ def test_incomplete_output(self): # Learn the feature mld.learn() - + # revert the outputs outputs['show ipv6 mld vrf VRF1 groups detail'] = MldOutput.ShowIpv6MldGroupsDetail_VRF1 @@ -167,7 +167,7 @@ def test_incomplete_output(self): del(expect_dict['vrfs']['VRF1']['interfaces']['GigabitEthernet2']['group']) del(expect_dict['vrfs']['VRF1']['ssm_map']) - + # Verify Ops was created successfully self.assertEqual(mld.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxe/tests/test_mld.py b/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxe/tests/test_mld.py index 88895c1b9..408715a9a 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxe/tests/test_mld.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxe/tests/test_mld.py @@ -43,9 +43,11 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -61,8 +63,7 @@ def test_complete_output(self): {"{'vrf':''}": MldOutput.ShowIpv6MldGroupsDetail_default} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature mld.learn() @@ -119,11 +120,10 @@ def test_selective_attribute(self): {"{'vrf':''}": MldOutput.ShowIpv6MldGroupsDetail_default} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature - mld.learn() + mld.learn() # Check specific attribute values # info - default vrf @@ -134,7 +134,7 @@ def test_selective_attribute(self): def test_incomplete_output(self): self.maxDiff = None - + mld = Mld(device=self.device) # Get outputs @@ -156,7 +156,7 @@ def test_incomplete_output(self): # Learn the feature mld.learn() - + # revert the outputs outputs['show ipv6 mld vrf VRF1 groups detail'] = MldOutput.ShowIpv6MldGroupsDetail_VRF1 @@ -167,7 +167,7 @@ def test_incomplete_output(self): del(expect_dict['vrfs']['VRF1']['interfaces']['GigabitEthernet2']['group']) del(expect_dict['vrfs']['VRF1']['ssm_map']) - + # Verify Ops was created successfully self.assertEqual(mld.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxr/__init__.py index 592bc0c2f..481045c21 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxr/tests/test_mld.py b/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxr/tests/test_mld.py index 139e8fc67..d8026bdf3 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxr/tests/test_mld.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxr/tests/test_mld.py @@ -38,9 +38,11 @@ def setUp(self): self.device.os = 'iosxr' self.device.mapping = {} self.device.mapping['cli'] = 'cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -60,8 +62,7 @@ def test_complete_output(self): {"{'vrf':''}": MldOutput.ShowMldGroupsDetail_default} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature mld.learn() @@ -104,7 +105,7 @@ def test_empty_output(self): def test_selective_attribute(self): self.maxDiff = None mld = Mld(device = self.device) - + # Get outputs mld.maker.outputs[ShowVrfAllDetail] = \ {'': MldOutput.ShowVrfAllDetail} @@ -119,11 +120,10 @@ def test_selective_attribute(self): {"{'vrf':''}": MldOutput.ShowMldGroupsDetail_default} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature - mld.learn() + mld.learn() # Check specific attribute values # info - default vrf @@ -135,7 +135,7 @@ def test_selective_attribute(self): def test_incomplete_output(self): self.maxDiff = None - + mld = Mld(device = self.device) # Get outputs @@ -161,7 +161,7 @@ def test_incomplete_output(self): # Learn the feature mld.learn() - + # revert the outputs outputs['show mld vrf VRF1 groups detail'] = MldOutput.ShowMldGroupsDetail_VRF diff --git a/pkgs/ops-pkg/src/genie/libs/ops/mld/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/mld/nxos/__init__.py index 592bc0c2f..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/mld/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/mld/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/mld/nxos/tests/test_mld.py b/pkgs/ops-pkg/src/genie/libs/ops/mld/nxos/tests/test_mld.py index 792dbba1c..a5a7f9cde 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/mld/nxos/tests/test_mld.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/mld/nxos/tests/test_mld.py @@ -23,9 +23,9 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None @@ -81,7 +81,7 @@ def test_selective_attribute(self): {"{'vrf':'all'}": MldOutput.ShowIpv6MldLocalGroups} # Learn the feature - mld.learn() + mld.learn() # Check specific attribute values # info - default vrf @@ -94,7 +94,7 @@ def test_selective_attribute(self): def test_incomplete_output(self): self.maxDiff = None - + mld = Mld(device=self.device) # Get outputs @@ -117,7 +117,7 @@ def test_incomplete_output(self): del(expect_dict['vrfs']['VRF1']['interfaces']['Ethernet2/2']['join_group']) del(expect_dict['vrfs']['VRF1']['interfaces']['Ethernet2/2']['static_group']) - + # Verify Ops was created successfully self.assertEqual(mld.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/msdp/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/msdp/ios/__init__.py index 3e76c8dbc..1c4324a07 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/msdp/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/msdp/ios/__init__.py @@ -1,6 +1,6 @@ -try: - from genie import abstract - abstract.declare_token(__name__) -except Exception as e: - import warnings - warnings.warn('Could not declare abstraction token: ' + str(e)) +try: + from genie import abstract + abstract.declare_token(os='ios') +except Exception as e: + import warnings + warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/msdp/ios/tests/test_msdp.py b/pkgs/ops-pkg/src/genie/libs/ops/msdp/ios/tests/test_msdp.py index 115920038..9d475f567 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/msdp/ios/tests/test_msdp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/msdp/ios/tests/test_msdp.py @@ -27,9 +27,11 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -40,8 +42,7 @@ def test_complete_output(self): msdp.maker.outputs[ShowIpMsdpSaCache] = {'': MsdpOutput.ShowIpMsdpSaCache} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature msdp.learn() @@ -58,8 +59,7 @@ def test_selective_attribute(self): msdp.maker.outputs[ShowIpMsdpSaCache] = {'': MsdpOutput.ShowIpMsdpSaCache} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature msdp.learn() @@ -76,8 +76,7 @@ def test_empty_output(self): msdp.maker.outputs[ShowIpMsdpSaCache] = {'': ''} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature msdp.learn() @@ -94,8 +93,7 @@ def test_missing_attributes(self): msdp.maker.outputs[ShowIpMsdpSaCache] = {'': {}} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature msdp.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxe/__init__.py index f9f26b0c5..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxe/__init__.py @@ -1,6 +1,6 @@ -try: - from genie import abstract - abstract.declare_token(__name__) -except Exception as e: - import warnings +try: + from genie import abstract + abstract.declare_token(os='iosxe') +except Exception as e: + import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxe/tests/test_msdp.py b/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxe/tests/test_msdp.py index b22228c55..fa4127a8b 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxe/tests/test_msdp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxe/tests/test_msdp.py @@ -29,7 +29,11 @@ def setUp(self): self.device.mapping['cli'] = 'cli' # Give the device as as a connection type # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -40,8 +44,7 @@ def test_complete_output(self): msdp.maker.outputs[ShowIpMsdpSaCache] = {'': MsdpOutput.ShowIpMsdpSaCache} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature msdp.learn() @@ -58,8 +61,7 @@ def test_selective_attribute(self): msdp.maker.outputs[ShowIpMsdpSaCache] = {'': MsdpOutput.ShowIpMsdpSaCache} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature msdp.learn() @@ -76,8 +78,7 @@ def test_empty_output(self): msdp.maker.outputs[ShowIpMsdpSaCache] = {'': {}} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature msdp.learn() @@ -94,8 +95,7 @@ def test_missing_attributes(self): msdp.maker.outputs[ShowIpMsdpSaCache] = {'': {}} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature msdp.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxr/__init__.py index f9f26b0c5..481045c21 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxr/__init__.py @@ -1,6 +1,6 @@ -try: - from genie import abstract - abstract.declare_token(__name__) -except Exception as e: - import warnings +try: + from genie import abstract + abstract.declare_token(os='iosxr') +except Exception as e: + import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxr/tests/test_msdp.py b/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxr/tests/test_msdp.py index fad2d454f..df703d7d9 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxr/tests/test_msdp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxr/tests/test_msdp.py @@ -36,7 +36,11 @@ def setUp(self): self.device.mapping['cli'] = 'cli' # Give the device as as a connection type # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper # support vrf = 'VRF1' def test_output_vrf1(self): @@ -44,8 +48,7 @@ def test_output_vrf1(self): msdp = Msdp(device=self.device) # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature msdp.learn(vrf='VRF1') @@ -59,8 +62,7 @@ def test_output_vrf_default(self): msdp = Msdp(device=self.device) # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature msdp.learn(vrf='default') @@ -83,8 +85,7 @@ def test_complete_output_3(self): msdp.maker.outputs['show msdp context'] = {"{'vrf':''}": MsdpOutput.showMsdpContext} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature msdp.learn() @@ -98,8 +99,7 @@ def test_output_vrf1_peer(self): msdp = Msdp(device=self.device) # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature msdp.learn(vrf='VRF1', peer='10.4.1.1') @@ -121,8 +121,7 @@ def test_selective_attribute(self): msdp.maker.outputs['show msdp context'] = {'': MsdpOutput.showMsdpContext} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature msdp.learn() @@ -177,8 +176,7 @@ def test_missing_attributes(self): {'': {}} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature msdp.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/msdp/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/msdp/nxos/__init__.py index 592bc0c2f..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/msdp/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/msdp/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/msdp/nxos/tests/test_msdp.py b/pkgs/ops-pkg/src/genie/libs/ops/msdp/nxos/tests/test_msdp.py index 8cd8356dc..a268faf67 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/msdp/nxos/tests/test_msdp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/msdp/nxos/tests/test_msdp.py @@ -34,14 +34,17 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_msdp_full(self): f= Msdp(device=self.device) # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -52,8 +55,7 @@ def test_msdp_selective_attribute(self): f = Msdp(device=self.device) # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -66,8 +68,7 @@ def test_msdp_missing_attributes(self): f = Msdp(device=self.device) # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -79,7 +80,7 @@ def test_msdp_empty_output(self): self.device.execute = Mock() - + outputs['show ip msdp policy statistics sa-policy 10.4.1.1 in'] = '' outputs['show ip msdp policy statistics sa-policy 10.94.44.44 in vrf VRF1'] = '' outputs['show ip msdp policy statistics sa-policy 10.4.1.1 out'] = '' @@ -94,7 +95,7 @@ def test_msdp_empty_output(self): # Learn the feature f.learn() - # revert the global outputs back + # revert the global outputs back outputs['show ip msdp policy statistics sa-policy 10.4.1.1 in'] = \ MsdpOutput.ShowIpMsdpPolicyStatisticsSaPolicyIn outputs['show ip msdp policy statistics sa-policy 10.94.44.44 in'] = \ diff --git a/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxe/tests/test_nd.py b/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxe/tests/test_nd.py index c1e8289c6..b75e56e39 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxe/tests/test_nd.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxe/tests/test_nd.py @@ -19,7 +19,11 @@ def setUp(self): self.device.os = 'iosxe' self.device.mapping={} self.device.mapping['cli']='cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_full_nd(self): self.maxDiff = None @@ -29,7 +33,7 @@ def test_full_nd(self): # Learn the feature nd.learn() - + self.assertEqual(nd.info, NdOutput.ndOpsOutput) def test_custom_nd(self): diff --git a/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxr/__init__.py index 592bc0c2f..481045c21 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxr/tests/test_nd.py b/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxr/tests/test_nd.py index 794d7804f..e65417cc6 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxr/tests/test_nd.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxr/tests/test_nd.py @@ -28,9 +28,12 @@ def setUp(self): self.device.os = 'iosxr' self.device.mapping={} self.device.mapping['cli']='cli' - self.device.connectionmgr.connections['cli'] = self.device - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper + def test_full_nd(self): self.maxDiff = None diff --git a/pkgs/ops-pkg/src/genie/libs/ops/nd/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/nd/nxos/__init__.py index 592bc0c2f..ef95f9476 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/nd/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/nd/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/nd/nxos/tests/test_nd.py b/pkgs/ops-pkg/src/genie/libs/ops/nd/nxos/tests/test_nd.py index 59a33d5ed..f237d240b 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/nd/nxos/tests/test_nd.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/nd/nxos/tests/test_nd.py @@ -21,8 +21,12 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - self.device.connectionmgr.connections['cli'] = self.device - + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper + def test_full_nd(self): nd = Nd(device=self.device) nd.maker.outputs[ShowIpv6NeighborDetail] = {"{'vrf':'all'}": NdOutput.showIpv6NeighborDetail} diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ntp/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/ntp/ios/__init__.py index 592bc0c2f..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ntp/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ntp/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ntp/ios/tests/test_ntp.py b/pkgs/ops-pkg/src/genie/libs/ops/ntp/ios/tests/test_ntp.py index e0056bca6..6f9e4706d 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ntp/ios/tests/test_ntp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ntp/ios/tests/test_ntp.py @@ -35,7 +35,11 @@ def setUp(self): self.device.mapping['cli']='cli' # Give the device as a connection typeimport # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -85,7 +89,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + ntp = Ntp(device=self.device) # Get outputs @@ -100,7 +104,7 @@ def test_incomplete_output(self): # Learn the feature ntp.learn() - + # Check no attribute not found with self.assertRaises(KeyError): ntp.info['clock_state']['system_status']['actual_freq'] @@ -116,17 +120,18 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None ntp = Ntp(device=self.device) - + # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ntp.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/tests/test_ntp.py b/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/tests/test_ntp.py index 811fd7caa..0f0a4da03 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/tests/test_ntp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/tests/test_ntp.py @@ -33,9 +33,11 @@ def setUp(self): self.device.os = 'iosxe' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -85,7 +87,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + ntp = Ntp(device=self.device) # Get outputs @@ -100,7 +102,7 @@ def test_incomplete_output(self): # Learn the feature ntp.learn() - + # Check no attribute not found with self.assertRaises(KeyError): ntp.info['clock_state']['system_status']['actual_freq'] @@ -116,17 +118,18 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None ntp = Ntp(device=self.device) - + # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ntp.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxr/__init__.py index 592bc0c2f..481045c21 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxr/tests/test_ntp.py b/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxr/tests/test_ntp.py index c4d04eacb..8712d7c92 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxr/tests/test_ntp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxr/tests/test_ntp.py @@ -23,9 +23,11 @@ def setUp(self): self.device.os = 'iosxr' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -91,7 +93,7 @@ def test_incomplete_output(self): # Learn the feature ntp.learn() - + # Check no attribute not found with self.assertRaises(KeyError): ntp.info['clock_state']['system_status']['actual_freq'] diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ntp/junos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/ntp/junos/__init__.py index 592bc0c2f..5c3161ac1 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ntp/junos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ntp/junos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='junos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ntp/junos/tests/test_ntp.py b/pkgs/ops-pkg/src/genie/libs/ops/ntp/junos/tests/test_ntp.py index edacf92c3..d5271c854 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ntp/junos/tests/test_ntp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ntp/junos/tests/test_ntp.py @@ -23,9 +23,11 @@ def setUp(self): self.device.os = 'junos' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -75,7 +77,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + ntp = Ntp(device=self.device) # Get outputs @@ -90,7 +92,7 @@ def test_incomplete_output(self): # Learn the feature ntp.learn() - + # Check no attribute not found with self.assertRaises(KeyError): ntp.info['clock_state']['system_status']['actual_freq'] diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ntp/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/ntp/nxos/__init__.py index 592bc0c2f..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ntp/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ntp/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ntp/nxos/tests/test_ntp.py b/pkgs/ops-pkg/src/genie/libs/ops/ntp/nxos/tests/test_ntp.py index e3c0c99a7..9c7a7cd8f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ntp/nxos/tests/test_ntp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ntp/nxos/tests/test_ntp.py @@ -31,9 +31,11 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None @@ -99,7 +101,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + ntp = Ntp(device=self.device) # Get outputs @@ -111,7 +113,7 @@ def test_incomplete_output(self): # Learn the feature ntp.learn() - + # Check no attribute not found with self.assertRaises(KeyError): ntp.info['unicast_configuration'] @@ -125,17 +127,18 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None ntp = Ntp(device=self.device) - + # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ntp.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ops.json b/pkgs/ops-pkg/src/genie/libs/ops/ops.json deleted file mode 100644 index 4c827ba41..000000000 --- a/pkgs/ops-pkg/src/genie/libs/ops/ops.json +++ /dev/null @@ -1,1132 +0,0 @@ -{ - "acl": { - "ios": { - "class_name": "Acl", - "doc": null, - "module_name": "acl.acl", - "package": "genie.libs.ops", - "uid": "acl", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/ios/acl.py#L6" - }, - "iosxe": { - "class_name": "Acl", - "doc": "ACL Genie Ops Object", - "module_name": "acl.acl", - "package": "genie.libs.ops", - "uid": "acl", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxe/acl.py#L10" - }, - "iosxr": { - "class_name": "Acl", - "doc": "ACL Genie Ops Object", - "module_name": "acl.acl", - "package": "genie.libs.ops", - "uid": "acl", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxr/acl.py#L12" - }, - "nxos": { - "class_name": "Acl", - "doc": "Acl Genie Ops Object", - "module_name": "acl.acl", - "package": "genie.libs.ops", - "uid": "acl", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/nxos/acl.py#L32" - } - }, - "arp": { - "ios": { - "class_name": "Arp", - "doc": "ARP Genie Ops Object", - "module_name": "arp.arp", - "package": "genie.libs.ops", - "uid": "arp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/ios/arp.py#L18" - }, - "iosxe": { - "class_name": "Arp", - "doc": "ARP Genie Ops Object", - "module_name": "arp.arp", - "package": "genie.libs.ops", - "uid": "arp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxe/arp.py#L18" - }, - "iosxr": { - "class_name": "Arp", - "doc": "ARP Genie Ops Object", - "module_name": "arp.arp", - "package": "genie.libs.ops", - "uid": "arp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxr/arp.py#L16" - }, - "nxos": { - "class_name": "Arp", - "doc": "ARP Genie Ops Object", - "module_name": "arp.arp", - "package": "genie.libs.ops", - "uid": "arp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/nxos/arp.py#L15" - } - }, - "bgp": { - "ios": { - "class_name": "Bgp", - "doc": null, - "module_name": "bgp.bgp", - "package": "genie.libs.ops", - "uid": "bgp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/ios/bgp.py#L6" - }, - "iosxe": { - "class_name": "Bgp", - "doc": "BGP Genie Ops Object", - "module_name": "bgp.bgp", - "package": "genie.libs.ops", - "uid": "bgp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxe/bgp.py#L12" - }, - "iosxr": { - "class_name": "Bgp", - "doc": "BGP Genie Ops Object", - "module_name": "bgp.bgp", - "package": "genie.libs.ops", - "uid": "bgp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/bgp.py#L21", - "yang": { - "class_name": "Bgp", - "doc": "BGP Genie Ops Object", - "module_name": "bgp.bgp", - "package": "genie.libs.ops", - "uid": "bgp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/yang/bgp.py#L13" - } - }, - "nxos": { - "class_name": "Bgp", - "doc": "BGP Genie Ops Object", - "module_name": "bgp.bgp", - "package": "genie.libs.ops", - "uid": "bgp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/bgp.py#L28", - "xml": { - "class_name": "Bgp", - "doc": "BGP Genie Ops Object", - "module_name": "bgp.bgp", - "package": "genie.libs.ops", - "uid": "bgp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/xml/bgp.py#L13" - }, - "yang": { - "class_name": "Bgp", - "doc": "BGP Genie Ops Object", - "module_name": "bgp.bgp", - "package": "genie.libs.ops", - "uid": "bgp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/yang/bgp.py#L13" - } - } - }, - "device": { - "iosxe": { - "cat9k": { - "class_name": "Device", - "doc": "Device Genie Ops Object", - "module_name": "device.device", - "package": "genie.libs.ops", - "uid": "device", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/iosxe/cat9k/device.py#L7" - }, - "class_name": "Device", - "doc": "Device Genie Ops Object", - "module_name": "device.device", - "package": "genie.libs.ops", - "uid": "device", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/iosxe/device.py#L24" - }, - "iosxr": { - "class_name": "Device", - "doc": "Device Genie Ops Object", - "module_name": "device.device", - "package": "genie.libs.ops", - "uid": "device", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/iosxr/device.py#L21" - }, - "nxos": { - "class_name": "Device", - "doc": "Device Genie Ops Object", - "module_name": "device.device", - "package": "genie.libs.ops", - "uid": "device", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/nxos/device.py#L23" - } - }, - "dot1x": { - "ios": { - "class_name": "Dot1X", - "doc": null, - "module_name": "dot1x.dot1x", - "package": "genie.libs.ops", - "uid": "dot1x", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/dot1x/ios/dot1x.py#L6" - }, - "iosxe": { - "class_name": "Dot1X", - "doc": "Dot1x Genie Ops Object", - "module_name": "dot1x.dot1x", - "package": "genie.libs.ops", - "uid": "dot1x", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/dot1x/iosxe/dot1x.py#L9" - } - }, - "eigrp": { - "ios": { - "class_name": "Eigrp", - "doc": "\n Eigrp Ops Object\n ", - "module_name": "eigrp.eigrp", - "package": "genie.libs.ops", - "uid": "eigrp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/ios/eigrp.py#L7" - }, - "iosxe": { - "class_name": "Eigrp", - "doc": "\n Eigrp Ops Object\n ", - "module_name": "eigrp.eigrp", - "package": "genie.libs.ops", - "uid": "eigrp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxe/eigrp.py#L8" - }, - "iosxr": { - "class_name": "Eigrp", - "doc": "\n Eigrp Ops object\n ", - "module_name": "eigrp.eigrp", - "package": "genie.libs.ops", - "uid": "eigrp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxr/eigrp.py#L9" - }, - "nxos": { - "class_name": "Eigrp", - "doc": "\n Eigrp Ops object\n ", - "module_name": "eigrp.eigrp", - "package": "genie.libs.ops", - "uid": "eigrp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/nxos/eigrp.py#L9" - } - }, - "fdb": { - "ios": { - "class_name": "Fdb", - "doc": null, - "module_name": "fdb.fdb", - "package": "genie.libs.ops", - "uid": "fdb", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/ios/fdb.py#L6" - }, - "iosxe": { - "class_name": "Fdb", - "doc": "Fdb Genie Ops Object", - "module_name": "fdb.fdb", - "package": "genie.libs.ops", - "uid": "fdb", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/iosxe/fdb.py#L9" - }, - "nxos": { - "class_name": "Fdb", - "doc": "Fdb Genie Ops Object", - "module_name": "fdb.fdb", - "package": "genie.libs.ops", - "uid": "fdb", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/nxos/fdb.py#L11" - } - }, - "hsrp": { - "ios": { - "class_name": "Hsrp", - "doc": null, - "module_name": "hsrp.hsrp", - "package": "genie.libs.ops", - "uid": "hsrp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/ios/hsrp.py#L6" - }, - "iosxe": { - "class_name": "Hsrp", - "doc": "HSRP Genie Ops Object", - "module_name": "hsrp.hsrp", - "package": "genie.libs.ops", - "uid": "hsrp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxe/hsrp.py#L13" - }, - "iosxr": { - "class_name": "Hsrp", - "doc": "HSRP Genie Ops Object", - "module_name": "hsrp.hsrp", - "package": "genie.libs.ops", - "uid": "hsrp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxr/hsrp.py#L12" - }, - "nxos": { - "class_name": "Hsrp", - "doc": "HSRP Genie Ops Object", - "module_name": "hsrp.hsrp", - "package": "genie.libs.ops", - "uid": "hsrp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/nxos/hsrp.py#L11" - } - }, - "igmp": { - "ios": { - "class_name": "Igmp", - "doc": null, - "module_name": "igmp.igmp", - "package": "genie.libs.ops", - "uid": "igmp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/ios/igmp.py#L6" - }, - "iosxe": { - "class_name": "Igmp", - "doc": "IGMP Genie Ops Object", - "module_name": "igmp.igmp", - "package": "genie.libs.ops", - "uid": "igmp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxe/igmp.py#L11" - }, - "iosxr": { - "class_name": "Igmp", - "doc": "IGMP Genie Ops Object", - "module_name": "igmp.igmp", - "package": "genie.libs.ops", - "uid": "igmp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxr/igmp.py#L13" - }, - "nxos": { - "class_name": "Igmp", - "doc": "IGMP Genie Ops Object", - "module_name": "igmp.igmp", - "package": "genie.libs.ops", - "uid": "igmp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/nxos/igmp.py#L13" - } - }, - "interface": { - "cheetah": { - "ap": { - "class_name": "Interface", - "doc": "Interface Genie Ops Object", - "module_name": "interface.interface", - "package": "genie.libs.ops", - "uid": "interface", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/cheetah/ap/interface.py#L14" - }, - "class_name": "Interface", - "doc": "Interface Genie Ops Object", - "module_name": "interface.interface", - "package": "genie.libs.ops", - "uid": "interface", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/cheetah/ap/interface.py#L14" - }, - "ios": { - "class_name": "Interface", - "doc": "Interface Genie Ops Object", - "module_name": "interface.interface", - "package": "genie.libs.ops", - "uid": "interface", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/ios/interface.py#L11" - }, - "iosxe": { - "asr1k": { - "class_name": "Interface", - "doc": "Interface Genie Ops Object", - "module_name": "interface.interface", - "package": "genie.libs.ops", - "uid": "interface", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/asr1k/interface.py#L14" - }, - "c3850": { - "class_name": "Interface", - "doc": "Interface Genie Ops Object", - "module_name": "interface.interface", - "package": "genie.libs.ops", - "uid": "interface", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/c3850/interface.py#L14" - }, - "class_name": "Interface", - "doc": "Interface Genie Ops Object", - "module_name": "interface.interface", - "package": "genie.libs.ops", - "uid": "interface", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/interface.py#L17" - }, - "iosxr": { - "class_name": "Interface", - "doc": "Interface Genie Ops Object", - "module_name": "interface.interface", - "package": "genie.libs.ops", - "uid": "interface", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/interface.py#L20" - }, - "nxos": { - "class_name": "Interface", - "doc": "Interface Genie Ops Object", - "module_name": "interface.interface", - "package": "genie.libs.ops", - "uid": "interface", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/nxos/interface.py#L17" - } - }, - "isis": { - "ios": { - "class_name": "Isis", - "doc": "Isis Genie Ops Object", - "module_name": "isis.isis", - "package": "genie.libs.ops", - "uid": "isis", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/ios/isis.py#L3" - }, - "iosxe": { - "class_name": "Isis", - "doc": "Isis Genie Ops Object", - "module_name": "isis.isis", - "package": "genie.libs.ops", - "uid": "isis", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxe/isis.py#L28" - }, - "iosxr": { - "class_name": "Isis", - "doc": "Isis Genie Ops Object", - "module_name": "isis.isis", - "package": "genie.libs.ops", - "uid": "isis", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxr/isis.py#L22" - }, - "nxos": { - "class_name": "Isis", - "doc": "Isis Genie Ops Object", - "module_name": "isis.isis", - "package": "genie.libs.ops", - "uid": "isis", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/nxos/isis.py#L21" - } - }, - "lag": { - "ios": { - "class_name": "Lag", - "doc": null, - "module_name": "lag.lag", - "package": "genie.libs.ops", - "uid": "lag", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/ios/lag.py#L6" - }, - "iosxe": { - "class_name": "Lag", - "doc": "Lag Genie Ops Object", - "module_name": "lag.lag", - "package": "genie.libs.ops", - "uid": "lag", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxe/lag.py#L9" - }, - "iosxr": { - "class_name": "Lag", - "doc": "LAG Genie Ops Object", - "module_name": "lag.lag", - "package": "genie.libs.ops", - "uid": "lag", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxr/lag.py#L13" - } - }, - "lisp": { - "ios": { - "class_name": "Lisp", - "doc": null, - "module_name": "lisp.lisp", - "package": "genie.libs.ops", - "uid": "lisp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lisp/ios/lisp.py#L6" - }, - "iosxe": { - "class_name": "Lisp", - "doc": "Lisp Ops Object", - "module_name": "lisp.lisp", - "package": "genie.libs.ops", - "uid": "lisp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lisp/iosxe/lisp.py#L10" - } - }, - "lldp": { - "ios": { - "class_name": "Lldp", - "doc": null, - "module_name": "lldp.lldp", - "package": "genie.libs.ops", - "uid": "lldp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/ios/lldp.py#L6" - }, - "iosxe": { - "class_name": "Lldp", - "doc": "LLDP Genie Ops Object", - "module_name": "lldp.lldp", - "package": "genie.libs.ops", - "uid": "lldp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxe/lldp.py#L9" - }, - "iosxr": { - "class_name": "Lldp", - "doc": "LLDP Genie Ops Object", - "module_name": "lldp.lldp", - "package": "genie.libs.ops", - "uid": "lldp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxr/lldp.py#L16" - }, - "nxos": { - "class_name": "Lldp", - "doc": "LLDP Genie Ops Object", - "module_name": "lldp.lldp", - "package": "genie.libs.ops", - "uid": "lldp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/nxos/lldp.py#L14" - } - }, - "mcast": { - "ios": { - "class_name": "Mcast", - "doc": null, - "module_name": "mcast.mcast", - "package": "genie.libs.ops", - "uid": "mcast", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/ios/mcast.py#L6" - }, - "iosxe": { - "class_name": "Mcast", - "doc": "Mcast Genie Ops Object", - "module_name": "mcast.mcast", - "package": "genie.libs.ops", - "uid": "mcast", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxe/mcast.py#L17" - }, - "iosxr": { - "class_name": "Mcast", - "doc": "Mcast Genie Ops Object", - "module_name": "mcast.mcast", - "package": "genie.libs.ops", - "uid": "mcast", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxr/mcast.py#L17" - }, - "nxos": { - "class_name": "Mcast", - "doc": "Mcast Genie Ops Object", - "module_name": "mcast.mcast", - "package": "genie.libs.ops", - "uid": "mcast", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/nxos/mcast.py#L16" - } - }, - "mld": { - "ios": { - "class_name": "Mld", - "doc": null, - "module_name": "mld.mld", - "package": "genie.libs.ops", - "uid": "mld", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/ios/mld.py#L6" - }, - "iosxe": { - "class_name": "Mld", - "doc": "MLD Genie Ops Object", - "module_name": "mld.mld", - "package": "genie.libs.ops", - "uid": "mld", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxe/mld.py#L11" - }, - "iosxr": { - "class_name": "Mld", - "doc": "MLD Genie Ops Object", - "module_name": "mld.mld", - "package": "genie.libs.ops", - "uid": "mld", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxr/mld.py#L16" - }, - "nxos": { - "class_name": "Mld", - "doc": "MLD Genie Ops Object", - "module_name": "mld.mld", - "package": "genie.libs.ops", - "uid": "mld", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/nxos/mld.py#L12" - } - }, - "msdp": { - "ios": { - "class_name": "Msdp", - "doc": "\n Msdp Ops Object\n ", - "module_name": "msdp.msdp", - "package": "genie.libs.ops", - "uid": "msdp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/ios/msdp.py#L4" - }, - "iosxe": { - "class_name": "Msdp", - "doc": "\n Msdp Ops Object\n ", - "module_name": "msdp.msdp", - "package": "genie.libs.ops", - "uid": "msdp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxe/msdp.py#L9" - }, - "iosxr": { - "class_name": "Msdp", - "doc": "\n Msdp Ops Object\n ", - "module_name": "msdp.msdp", - "package": "genie.libs.ops", - "uid": "msdp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxr/msdp.py#L13" - }, - "nxos": { - "class_name": "Msdp", - "doc": "Msdp Ops Object", - "module_name": "msdp.msdp", - "package": "genie.libs.ops", - "uid": "msdp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/nxos/msdp.py#L10" - } - }, - "nd": { - "iosxe": { - "class_name": "Nd", - "doc": "Nd Ops Object", - "module_name": "nd.nd", - "package": "genie.libs.ops", - "uid": "nd", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxe/nd.py#L9" - }, - "iosxr": { - "class_name": "Nd", - "doc": "Nd Ops Object", - "module_name": "nd.nd", - "package": "genie.libs.ops", - "uid": "nd", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxr/nd.py#L10" - }, - "nxos": { - "class_name": "Nd", - "doc": "Nd Ops Object", - "module_name": "nd.nd", - "package": "genie.libs.ops", - "uid": "nd", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/nxos/nd.py#L10" - } - }, - "ntp": { - "ios": { - "class_name": "Ntp", - "doc": "NTP Genie Ops Object", - "module_name": "ntp.ntp", - "package": "genie.libs.ops", - "uid": "ntp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/ios/ntp.py#L15" - }, - "iosxe": { - "class_name": "Ntp", - "doc": "NTP Genie Ops Object", - "module_name": "ntp.ntp", - "package": "genie.libs.ops", - "uid": "ntp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/ntp.py#L15" - }, - "iosxr": { - "class_name": "Ntp", - "doc": "NTP Genie Ops Object", - "module_name": "ntp.ntp", - "package": "genie.libs.ops", - "uid": "ntp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxr/ntp.py#L15" - }, - "junos": { - "class_name": "Ntp", - "doc": "NTP Genie Ops Object", - "module_name": "ntp.ntp", - "package": "genie.libs.ops", - "uid": "ntp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/junos/ntp.py#L13" - }, - "nxos": { - "class_name": "Ntp", - "doc": "NTP Genie Ops Object", - "module_name": "ntp.ntp", - "package": "genie.libs.ops", - "uid": "ntp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/nxos/ntp.py#L12" - } - }, - "ospf": { - "ios": { - "class_name": "Ospf", - "doc": null, - "module_name": "ospf.ospf", - "package": "genie.libs.ops", - "uid": "ospf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/ios/ospf.py#L6" - }, - "iosxe": { - "class_name": "Ospf", - "doc": "Ospf Ops Object", - "module_name": "ospf.ospf", - "package": "genie.libs.ops", - "uid": "ospf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/ospf.py#L11", - "yang": { - "class_name": "Ospf", - "doc": "Ospf Ops Object", - "module_name": "ospf.ospf", - "package": "genie.libs.ops", - "uid": "ospf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/yang/ospf.py#L5" - } - }, - "iosxr": { - "class_name": "Ospf", - "doc": "Ospf Ops Object", - "module_name": "ospf.ospf", - "package": "genie.libs.ops", - "uid": "ospf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/ospf.py#L25", - "yang": { - "class_name": "Ospf", - "doc": "Ospf Ops Object", - "module_name": "ospf.ospf", - "package": "genie.libs.ops", - "uid": "ospf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/yang/ospf.py#L4" - } - }, - "nxos": { - "class_name": "Ospf", - "doc": "Ospf Ops Object", - "module_name": "ospf.ospf", - "package": "genie.libs.ops", - "uid": "ospf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/ospf.py#L25", - "yang": { - "class_name": "Ospf", - "doc": "Ospf Ops Object", - "module_name": "ospf.ospf", - "package": "genie.libs.ops", - "uid": "ospf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/yang/ospf.py#L5" - } - } - }, - "pim": { - "ios": { - "class_name": "Pim", - "doc": "Pim Genie Ops Object", - "module_name": "pim.pim", - "package": "genie.libs.ops", - "uid": "pim", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/ios/pim.py#L14" - }, - "iosxe": { - "class_name": "Pim", - "doc": "Pim Genie Ops Object", - "module_name": "pim.pim", - "package": "genie.libs.ops", - "uid": "pim", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/iosxe/pim.py#L14" - }, - "nxos": { - "class_name": "Pim", - "doc": "Pim Genie Ops Object", - "module_name": "pim.pim", - "package": "genie.libs.ops", - "uid": "pim", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/nxos/pim.py#L30" - } - }, - "platform": { - "cheetah": { - "ap": { - "class_name": "Platform", - "doc": "Platform Ops Object", - "module_name": "platform.platform", - "package": "genie.libs.ops", - "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/cheetah/ap/platform.py#L8" - }, - "class_name": "Platform", - "doc": "Platform Ops Object", - "module_name": "platform.platform", - "package": "genie.libs.ops", - "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/cheetah/ap/platform.py#L8" - }, - "ios": { - "cat6k": { - "class_name": "Platform", - "doc": "Platform Ops Object", - "module_name": "platform.platform", - "package": "genie.libs.ops", - "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/cat6k/platform.py#L11" - }, - "class_name": "Platform", - "doc": "Platform Ops Object", - "module_name": "platform.platform", - "package": "genie.libs.ops", - "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/platform.py#L6" - }, - "iosxe": { - "asr900": { - "class_name": "Platform", - "doc": "Platform Ops Object", - "module_name": "platform.platform", - "package": "genie.libs.ops", - "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/asr900/platform.py#L13" - }, - "c8200": { - "class_name": "Platform", - "doc": "Platform Ops Object", - "module_name": "platform.platform", - "package": "genie.libs.ops", - "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c8200/platform.py#L13" - }, - "c9500": { - "class_name": "Platform", - "doc": "Platform Ops Object", - "module_name": "platform.platform", - "package": "genie.libs.ops", - "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/platform.py#L14" - }, - "class_name": "Platform", - "doc": "Platform Ops Object", - "module_name": "platform.platform", - "package": "genie.libs.ops", - "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/platform.py#L13" - }, - "iosxr": { - "class_name": "Platform", - "doc": "Platform Genie Ops Object", - "module_name": "platform.platform", - "package": "genie.libs.ops", - "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/platform.py#L16" - }, - "nxos": { - "class_name": "Platform", - "doc": "Platform Ops Object", - "module_name": "platform.platform", - "package": "genie.libs.ops", - "uid": "platform", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/nxos/platform.py#L13" - } - }, - "prefix_list": { - "ios": { - "class_name": "PrefixList", - "doc": null, - "module_name": "prefix_list.prefix_list", - "package": "genie.libs.ops", - "uid": "prefixlist", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/ios/prefix_list.py#L6" - }, - "iosxe": { - "class_name": "PrefixList", - "doc": "Prefix-list Genie Ops Object", - "module_name": "prefix_list.prefix_list", - "package": "genie.libs.ops", - "uid": "prefixlist", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/iosxe/prefix_list.py#L15" - }, - "nxos": { - "class_name": "PrefixList", - "doc": "Prefix-list Genie Ops Object", - "module_name": "prefix_list.prefix_list", - "package": "genie.libs.ops", - "uid": "prefixlist", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/nxos/prefix_list.py#L15" - } - }, - "rip": { - "ios": { - "class_name": "Rip", - "doc": null, - "module_name": "rip.rip", - "package": "genie.libs.ops", - "uid": "rip", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/ios/rip.py#L6" - }, - "iosxe": { - "class_name": "Rip", - "doc": "Rip Genie Ops Object", - "module_name": "rip.rip", - "package": "genie.libs.ops", - "uid": "rip", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxe/rip.py#L18" - }, - "iosxr": { - "class_name": "Rip", - "doc": "Rip Genie Ops Object", - "module_name": "rip.rip", - "package": "genie.libs.ops", - "uid": "rip", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxr/rip.py#L15" - } - }, - "route_policy": { - "ios": { - "class_name": "RoutePolicy", - "doc": null, - "module_name": "route_policy.route_policy", - "package": "genie.libs.ops", - "uid": "routepolicy", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/ios/route_policy.py#L6" - }, - "iosxe": { - "class_name": "RoutePolicy", - "doc": "RoutePolicy Genie Ops Object", - "module_name": "route_policy.route_policy", - "package": "genie.libs.ops", - "uid": "routepolicy", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxe/route_policy.py#L9" - }, - "iosxr": { - "class_name": "RoutePolicy", - "doc": "RoutePolicy Genie Ops Object", - "module_name": "route_policy.route_policy", - "package": "genie.libs.ops", - "uid": "routepolicy", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxr/route_policy.py#L11" - }, - "nxos": { - "class_name": "RoutePolicy", - "doc": "RoutePolicy Genie Ops Object", - "module_name": "route_policy.route_policy", - "package": "genie.libs.ops", - "uid": "routepolicy", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/nxos/route_policy.py#L12" - } - }, - "routing": { - "ios": { - "class_name": "Routing", - "doc": null, - "module_name": "routing.routing", - "package": "genie.libs.ops", - "uid": "routing", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/ios/routing.py#L6" - }, - "iosxe": { - "class_name": "Routing", - "doc": "Routing Ops Object", - "module_name": "routing.routing", - "package": "genie.libs.ops", - "uid": "routing", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxe/routing.py#L13" - }, - "iosxr": { - "class_name": "Routing", - "doc": "Routing Ops Object", - "module_name": "routing.routing", - "package": "genie.libs.ops", - "uid": "routing", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxr/routing.py#L11" - }, - "nxos": { - "class_name": "Routing", - "doc": "Routing Ops Object", - "module_name": "routing.routing", - "package": "genie.libs.ops", - "uid": "routing", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/nxos/routing.py#L8" - } - }, - "static_routing": { - "ios": { - "class_name": "StaticRouting", - "doc": null, - "module_name": "static_routing.static_routing", - "package": "genie.libs.ops", - "uid": "staticrouting", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/ios/static_routing.py#L6" - }, - "iosxe": { - "class_name": "StaticRouting", - "doc": "StaticRouting Ops Object", - "module_name": "static_routing.static_routing", - "package": "genie.libs.ops", - "uid": "staticrouting", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxe/static_routing.py#L10" - }, - "iosxr": { - "class_name": "StaticRouting", - "doc": "StaticRouting Ops Object", - "module_name": "static_routing.static_routing", - "package": "genie.libs.ops", - "uid": "staticrouting", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxr/static_routing.py#L7" - }, - "nxos": { - "class_name": "StaticRouting", - "doc": "StaticRouting Ops Object", - "module_name": "static_routing.static_routing", - "package": "genie.libs.ops", - "uid": "staticrouting", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/nxos/static_routing.py#L8" - } - }, - "stp": { - "ios": { - "class_name": "Stp", - "doc": null, - "module_name": "stp.stp", - "package": "genie.libs.ops", - "uid": "stp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/ios/stp.py#L6" - }, - "iosxe": { - "class_name": "Stp", - "doc": "Spanning-tree Genie Ops Object", - "module_name": "stp.stp", - "package": "genie.libs.ops", - "uid": "stp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxe/stp.py#L9" - }, - "iosxr": { - "class_name": "Stp", - "doc": "STP Genie Ops Object", - "module_name": "stp.stp", - "package": "genie.libs.ops", - "uid": "stp", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxr/stp.py#L15" - } - }, - "terminal": { - "iosxe": { - "class_name": "Terminal", - "doc": "Show Terminal Genie Ops Object", - "module_name": "terminal.terminal", - "package": "genie.libs.ops", - "uid": "terminal", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/iosxe/terminal.py#L8" - }, - "iosxr": { - "class_name": "Terminal", - "doc": "Show Terminal Genie Ops Object", - "module_name": "terminal.terminal", - "package": "genie.libs.ops", - "uid": "terminal", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/iosxr/terminal.py#L8" - }, - "nxos": { - "class_name": "Terminal", - "doc": "Show Terminal Genie Ops Object", - "module_name": "terminal.terminal", - "package": "genie.libs.ops", - "uid": "terminal", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/nxos/terminal.py#L8" - } - }, - "tokens": [ - "ap", - "asr1k", - "asr900", - "c3850", - "c8200", - "c9500", - "cat6k", - "cat9k", - "cheetah", - "ios", - "iosxe", - "iosxr", - "junos", - "nxos", - "xml", - "yang" - ], - "vlan": { - "ios": { - "class_name": "Vlan", - "doc": null, - "module_name": "vlan.vlan", - "package": "genie.libs.ops", - "uid": "vlan", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/ios/vlan.py#L6" - }, - "iosxe": { - "class_name": "Vlan", - "doc": "Vlan Ops Object", - "module_name": "vlan.vlan", - "package": "genie.libs.ops", - "uid": "vlan", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxe/vlan.py#L5" - }, - "iosxr": { - "class_name": "Vlan", - "doc": "Vlan Ops Object", - "module_name": "vlan.vlan", - "package": "genie.libs.ops", - "uid": "vlan", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxr/vlan.py#L8" - }, - "nxos": { - "class_name": "Vlan", - "doc": "Vlan Ops Object", - "module_name": "vlan.vlan", - "package": "genie.libs.ops", - "uid": "vlan", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/nxos/vlan.py#L13" - } - }, - "vrf": { - "ios": { - "class_name": "Vrf", - "doc": null, - "module_name": "vrf.vrf", - "package": "genie.libs.ops", - "uid": "vrf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/ios/vrf.py#L6" - }, - "iosxe": { - "class_name": "Vrf", - "doc": "Vrf Genie Ops Object", - "module_name": "vrf.vrf", - "package": "genie.libs.ops", - "uid": "vrf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxe/vrf.py#L10" - }, - "iosxr": { - "class_name": "Vrf", - "doc": "Vrf Genie Ops Object", - "module_name": "vrf.vrf", - "package": "genie.libs.ops", - "uid": "vrf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxr/vrf.py#L13" - }, - "nxos": { - "class_name": "Vrf", - "doc": "Vrf Genie Ops Object", - "module_name": "vrf.vrf", - "package": "genie.libs.ops", - "uid": "vrf", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/nxos/vrf.py#L13" - } - }, - "vxlan": { - "iosxe": { - "class_name": "Vxlan", - "doc": "Vxlan Ops Object", - "module_name": "vxlan.vxlan", - "package": "genie.libs.ops", - "uid": "vxlan", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vxlan/iosxe/vxlan.py#L8" - }, - "nxos": { - "class_name": "Vxlan", - "doc": "Vxlan Ops Object", - "module_name": "vxlan.vxlan", - "package": "genie.libs.ops", - "uid": "vxlan", - "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vxlan/nxos/vxlan.py#L33" - } - } -} \ No newline at end of file diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ops.json b/pkgs/ops-pkg/src/genie/libs/ops/ops.json new file mode 120000 index 000000000..83d0a7d2f --- /dev/null +++ b/pkgs/ops-pkg/src/genie/libs/ops/ops.json @@ -0,0 +1 @@ +../../../../ops_generator/output/github_ops.json \ No newline at end of file diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ops.json~HEAD b/pkgs/ops-pkg/src/genie/libs/ops/ops.json~HEAD new file mode 100644 index 000000000..f7bc8c87b --- /dev/null +++ b/pkgs/ops-pkg/src/genie/libs/ops/ops.json~HEAD @@ -0,0 +1,1818 @@ +{ + "acl": { + "class": "Acl", + "doc": null, + "folders": { + "ios": { + "class": "Acl", + "doc": null, + "module_name": "acl.ios.acl", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "acl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/ios/acl.py#L6" + }, + "iosxe": { + "class": "Acl", + "doc": "ACL Genie Ops Object", + "module_name": "acl.iosxe.acl", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "acl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxe/acl.py#L10" + }, + "iosxr": { + "class": "Acl", + "doc": "ACL Genie Ops Object", + "module_name": "acl.iosxr.acl", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "acl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxr/acl.py#L12" + }, + "nxos": { + "class": "Acl", + "doc": "Acl Genie Ops Object", + "module_name": "acl.nxos.acl", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "acl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/nxos/acl.py#L32" + } + }, + "module_name": "acl.acl", + "package": "genie.libs.ops", + "uid": "acl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/acl.py#L5" + }, + "arp": { + "class": "Arp", + "doc": null, + "folders": { + "ios": { + "class": "Arp", + "doc": "ARP Genie Ops Object", + "module_name": "arp.ios.arp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "arp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/ios/arp.py#L18" + }, + "iosxe": { + "class": "Arp", + "doc": "ARP Genie Ops Object", + "module_name": "arp.iosxe.arp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "arp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxe/arp.py#L18" + }, + "iosxr": { + "class": "Arp", + "doc": "ARP Genie Ops Object", + "module_name": "arp.iosxr.arp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "arp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxr/arp.py#L16" + }, + "nxos": { + "class": "Arp", + "doc": "ARP Genie Ops Object", + "module_name": "arp.nxos.arp", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "arp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/nxos/arp.py#L15" + } + }, + "module_name": "arp.arp", + "package": "genie.libs.ops", + "uid": "arp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/arp.py#L5" + }, + "bgp": { + "class": "Bgp", + "doc": null, + "folders": { + "ios": { + "class": "Bgp", + "doc": null, + "module_name": "bgp.ios.bgp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/ios/bgp.py#L6" + }, + "iosxe": { + "class": "Bgp", + "doc": "BGP Genie Ops Object", + "module_name": "bgp.iosxe.bgp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxe/bgp.py#L12" + }, + "iosxr": { + "class": "Bgp", + "doc": "BGP Genie Ops Object", + "folders": { + "yang": { + "class": "Bgp", + "doc": "BGP Genie Ops Object", + "module_name": "bgp.iosxr.yang.bgp", + "package": "genie.libs.ops", + "tokens": { + "platform": "yang" + }, + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/yang/bgp.py#L13" + } + }, + "module_name": "bgp.iosxr.bgp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/bgp.py#L21" + }, + "nxos": { + "class": "Bgp", + "doc": "BGP Genie Ops Object", + "folders": { + "xml": { + "class": "Bgp", + "doc": "BGP Genie Ops Object", + "module_name": "bgp.nxos.xml.bgp", + "package": "genie.libs.ops", + "tokens": { + "platform": "xml" + }, + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/xml/bgp.py#L13" + }, + "yang": { + "class": "Bgp", + "doc": "BGP Genie Ops Object", + "module_name": "bgp.nxos.yang.bgp", + "package": "genie.libs.ops", + "tokens": { + "platform": "yang" + }, + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/yang/bgp.py#L13" + } + }, + "module_name": "bgp.nxos.bgp", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/bgp.py#L28" + } + }, + "module_name": "bgp.bgp", + "package": "genie.libs.ops", + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/bgp.py#L5" + }, + "device": { + "class": "ShowRunningConfig", + "doc": null, + "folders": { + "iosxe": { + "class": "Device", + "doc": "Device Genie Ops Object", + "folders": { + "cat9k": { + "class": "Device", + "doc": "Device Genie Ops Object", + "module_name": "device.iosxe.cat9k.device", + "package": "genie.libs.ops", + "tokens": { + "os": "cat9k" + }, + "uid": "device", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/iosxe/cat9k/device.py#L7" + } + }, + "module_name": "device.iosxe.device", + "package": "genie.libs.ops", + "tokens": { + "origin": "iosxe" + }, + "uid": "device", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/iosxe/device.py#L24" + }, + "iosxr": { + "class": "Device", + "doc": "Device Genie Ops Object", + "module_name": "device.iosxr.device", + "package": "genie.libs.ops", + "tokens": { + "origin": "iosxr" + }, + "uid": "device", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/iosxr/device.py#L21" + }, + "nxos": { + "class": "Device", + "doc": "Device Genie Ops Object", + "module_name": "device.nxos.device", + "package": "genie.libs.ops", + "tokens": { + "origin": "nxos" + }, + "uid": "device", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/nxos/device.py#L23" + } + }, + "module_name": "device.device", + "package": "genie.libs.ops", + "uid": "showrunningconfig", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/device.py#L168" + }, + "dot1x": { + "class": "Dot1X", + "doc": null, + "folders": { + "ios": { + "class": "Dot1X", + "doc": null, + "module_name": "dot1x.ios.dot1x", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "dot1x", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/dot1x/ios/dot1x.py#L6" + }, + "iosxe": { + "class": "Dot1X", + "doc": "Dot1x Genie Ops Object", + "module_name": "dot1x.iosxe.dot1x", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "dot1x", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/dot1x/iosxe/dot1x.py#L9" + } + }, + "module_name": "dot1x.dot1x", + "package": "genie.libs.ops", + "uid": "dot1x", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/dot1x/dot1x.py#L3" + }, + "eigrp": { + "class": "Eigrp", + "doc": null, + "folders": { + "ios": { + "class": "Eigrp", + "doc": "\n Eigrp Ops Object\n ", + "module_name": "eigrp.ios.eigrp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "eigrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/ios/eigrp.py#L7" + }, + "iosxe": { + "class": "Eigrp", + "doc": "\n Eigrp Ops Object\n ", + "module_name": "eigrp.iosxe.eigrp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "eigrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxe/eigrp.py#L8" + }, + "iosxr": { + "class": "Eigrp", + "doc": "\n Eigrp Ops object\n ", + "module_name": "eigrp.iosxr.eigrp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "eigrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxr/eigrp.py#L9" + }, + "nxos": { + "class": "Eigrp", + "doc": "\n Eigrp Ops object\n ", + "module_name": "eigrp.nxos.eigrp", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "eigrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/nxos/eigrp.py#L9" + } + }, + "module_name": "eigrp.eigrp", + "package": "genie.libs.ops", + "uid": "eigrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/eigrp.py#L5" + }, + "fdb": { + "class": "Fdb", + "doc": null, + "folders": { + "ios": { + "class": "Fdb", + "doc": null, + "module_name": "fdb.ios.fdb", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "fdb", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/ios/fdb.py#L6" + }, + "iosxe": { + "class": "Fdb", + "doc": "Fdb Genie Ops Object", + "module_name": "fdb.iosxe.fdb", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "fdb", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/iosxe/fdb.py#L9" + }, + "nxos": { + "class": "Fdb", + "doc": "Fdb Genie Ops Object", + "module_name": "fdb.nxos.fdb", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "fdb", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/nxos/fdb.py#L11" + } + }, + "module_name": "fdb.fdb", + "package": "genie.libs.ops", + "uid": "fdb", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/fdb.py#L3" + }, + "hsrp": { + "class": "Hsrp", + "doc": null, + "folders": { + "ios": { + "class": "Hsrp", + "doc": null, + "module_name": "hsrp.ios.hsrp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "hsrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/ios/hsrp.py#L6" + }, + "iosxe": { + "class": "Hsrp", + "doc": "HSRP Genie Ops Object", + "module_name": "hsrp.iosxe.hsrp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "hsrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxe/hsrp.py#L13" + }, + "iosxr": { + "class": "Hsrp", + "doc": "HSRP Genie Ops Object", + "module_name": "hsrp.iosxr.hsrp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "hsrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxr/hsrp.py#L12" + }, + "nxos": { + "class": "Hsrp", + "doc": "HSRP Genie Ops Object", + "module_name": "hsrp.nxos.hsrp", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "hsrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/nxos/hsrp.py#L11" + } + }, + "module_name": "hsrp.hsrp", + "package": "genie.libs.ops", + "uid": "hsrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/hsrp.py#L4" + }, + "igmp": { + "class": "Igmp", + "doc": null, + "folders": { + "ios": { + "class": "Igmp", + "doc": null, + "module_name": "igmp.ios.igmp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "igmp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/ios/igmp.py#L6" + }, + "iosxe": { + "class": "Igmp", + "doc": "IGMP Genie Ops Object", + "module_name": "igmp.iosxe.igmp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "igmp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxe/igmp.py#L11" + }, + "iosxr": { + "class": "Igmp", + "doc": "IGMP Genie Ops Object", + "module_name": "igmp.iosxr.igmp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "igmp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxr/igmp.py#L13" + }, + "nxos": { + "class": "Igmp", + "doc": "IGMP Genie Ops Object", + "module_name": "igmp.nxos.igmp", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "igmp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/nxos/igmp.py#L13" + } + }, + "module_name": "igmp.igmp", + "package": "genie.libs.ops", + "uid": "igmp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/igmp.py#L5" + }, + "interface": { + "class": "Interface", + "doc": null, + "folders": { + "cheetah": { + "folders": { + "ap": { + "class": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.cheetah.ap.interface", + "package": "genie.libs.ops", + "tokens": { + "os": "ap" + }, + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/cheetah/ap/interface.py#L10" + } + }, + "tokens": { + "origin": "cheetah" + } + }, + "ios": { + "class": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.ios.interface", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/ios/interface.py#L11" + }, + "iosxe": { + "class": "Interface", + "doc": "Interface Genie Ops Object", + "folders": { + "asr1k": { + "class": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.iosxe.asr1k.interface", + "package": "genie.libs.ops", + "tokens": { + "platform": "asr1k" + }, + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/asr1k/interface.py#L14" + }, + "c3850": { + "class": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.iosxe.c3850.interface", + "package": "genie.libs.ops", + "tokens": { + "model": "c3850", + "platform": "cat3k" + }, + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/c3850/interface.py#L14" + } + }, + "module_name": "interface.iosxe.interface", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/interface.py#L17" + }, + "iosxr": { + "class": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.iosxr.interface", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/interface.py#L20" + }, + "nxos": { + "class": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.nxos.interface", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/nxos/interface.py#L17" + } + }, + "module_name": "interface.interface", + "package": "genie.libs.ops", + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/interface.py#L5" + }, + "isis": { + "class": "Isis", + "doc": null, + "folders": { + "ios": { + "class": "Isis", + "doc": "Isis Genie Ops Object", + "module_name": "isis.ios.isis", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "isis", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/ios/isis.py#L3" + }, + "iosxe": { + "class": "Isis", + "doc": "Isis Genie Ops Object", + "module_name": "isis.iosxe.isis", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "isis", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxe/isis.py#L28" + }, + "iosxr": { + "class": "Isis", + "doc": "Isis Genie Ops Object", + "module_name": "isis.iosxr.isis", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "isis", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxr/isis.py#L22" + }, + "nxos": { + "class": "Isis", + "doc": "Isis Genie Ops Object", + "module_name": "isis.nxos.isis", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "isis", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/nxos/isis.py#L21" + } + }, + "module_name": "isis.isis", + "package": "genie.libs.ops", + "uid": "isis", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/isis.py#L5" + }, + "lag": { + "class": "Lag", + "doc": null, + "folders": { + "ios": { + "class": "Lag", + "doc": null, + "module_name": "lag.ios.lag", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "lag", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/ios/lag.py#L6" + }, + "iosxe": { + "class": "Lag", + "doc": "Lag Genie Ops Object", + "module_name": "lag.iosxe.lag", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "lag", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxe/lag.py#L9" + }, + "iosxr": { + "class": "Lag", + "doc": "LAG Genie Ops Object", + "module_name": "lag.iosxr.lag", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "lag", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxr/lag.py#L13" + } + }, + "module_name": "lag.lag", + "package": "genie.libs.ops", + "uid": "lag", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/lag.py#L5" + }, + "lisp": { + "class": "Lisp", + "doc": null, + "folders": { + "ios": { + "class": "Lisp", + "doc": null, + "module_name": "lisp.ios.lisp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "lisp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lisp/ios/lisp.py#L6" + }, + "iosxe": { + "class": "Lisp", + "doc": "Lisp Ops Object", + "module_name": "lisp.iosxe.lisp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "lisp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lisp/iosxe/lisp.py#L10" + } + }, + "module_name": "lisp.lisp", + "package": "genie.libs.ops", + "uid": "lisp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lisp/lisp.py#L3" + }, + "lldp": { + "class": "Lldp", + "doc": null, + "folders": { + "ios": { + "class": "Lldp", + "doc": null, + "module_name": "lldp.ios.lldp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "lldp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/ios/lldp.py#L6" + }, + "iosxe": { + "class": "Lldp", + "doc": "LLDP Genie Ops Object", + "module_name": "lldp.iosxe.lldp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "lldp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxe/lldp.py#L9" + }, + "iosxr": { + "class": "Lldp", + "doc": "LLDP Genie Ops Object", + "module_name": "lldp.iosxr.lldp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "lldp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxr/lldp.py#L16" + }, + "nxos": { + "class": "Lldp", + "doc": "LLDP Genie Ops Object", + "module_name": "lldp.nxos.lldp", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "lldp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/nxos/lldp.py#L14" + } + }, + "module_name": "lldp.lldp", + "package": "genie.libs.ops", + "uid": "lldp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/lldp.py#L5" + }, + "mcast": { + "class": "Mcast", + "doc": null, + "folders": { + "ios": { + "class": "Mcast", + "doc": null, + "module_name": "mcast.ios.mcast", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "mcast", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/ios/mcast.py#L6" + }, + "iosxe": { + "class": "Mcast", + "doc": "Mcast Genie Ops Object", + "module_name": "mcast.iosxe.mcast", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "mcast", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxe/mcast.py#L17" + }, + "iosxr": { + "class": "Mcast", + "doc": "Mcast Genie Ops Object", + "module_name": "mcast.iosxr.mcast", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "mcast", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxr/mcast.py#L17" + }, + "nxos": { + "class": "Mcast", + "doc": "Mcast Genie Ops Object", + "module_name": "mcast.nxos.mcast", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "mcast", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/nxos/mcast.py#L16" + } + }, + "module_name": "mcast.mcast", + "package": "genie.libs.ops", + "uid": "mcast", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/mcast.py#L5" + }, + "mld": { + "class": "Mld", + "doc": null, + "folders": { + "ios": { + "class": "Mld", + "doc": null, + "module_name": "mld.ios.mld", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "mld", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/ios/mld.py#L6" + }, + "iosxe": { + "class": "Mld", + "doc": "MLD Genie Ops Object", + "module_name": "mld.iosxe.mld", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "mld", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxe/mld.py#L11" + }, + "iosxr": { + "class": "Mld", + "doc": "MLD Genie Ops Object", + "module_name": "mld.iosxr.mld", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "mld", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxr/mld.py#L16" + }, + "nxos": { + "class": "Mld", + "doc": "MLD Genie Ops Object", + "module_name": "mld.nxos.mld", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "mld", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/nxos/mld.py#L12" + } + }, + "module_name": "mld.mld", + "package": "genie.libs.ops", + "uid": "mld", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/mld.py#L5" + }, + "msdp": { + "class": "Msdp", + "doc": null, + "folders": { + "ios": { + "class": "Msdp", + "doc": "\n Msdp Ops Object\n ", + "module_name": "msdp.ios.msdp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "msdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/ios/msdp.py#L4" + }, + "iosxe": { + "class": "Msdp", + "doc": "\n Msdp Ops Object\n ", + "module_name": "msdp.iosxe.msdp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "msdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxe/msdp.py#L9" + }, + "iosxr": { + "class": "Msdp", + "doc": "\n Msdp Ops Object\n ", + "module_name": "msdp.iosxr.msdp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "msdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxr/msdp.py#L13" + }, + "nxos": { + "class": "Msdp", + "doc": "Msdp Ops Object", + "module_name": "msdp.nxos.msdp", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "msdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/nxos/msdp.py#L10" + } + }, + "module_name": "msdp.msdp", + "package": "genie.libs.ops", + "uid": "msdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/msdp.py#L5" + }, + "nd": { + "class": "Nd", + "doc": null, + "folders": { + "iosxe": { + "class": "Nd", + "doc": "Nd Ops Object", + "module_name": "nd.iosxe.nd", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "nd", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxe/nd.py#L9" + }, + "iosxr": { + "class": "Nd", + "doc": "Nd Ops Object", + "module_name": "nd.iosxr.nd", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "nd", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxr/nd.py#L10" + }, + "nxos": { + "class": "Nd", + "doc": "Nd Ops Object", + "module_name": "nd.nxos.nd", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "nd", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/nxos/nd.py#L10" + } + }, + "module_name": "nd.nd", + "package": "genie.libs.ops", + "uid": "nd", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/nd.py#L5" + }, + "ntp": { + "class": "Ntp", + "doc": null, + "folders": { + "ios": { + "class": "Ntp", + "doc": "NTP Genie Ops Object", + "module_name": "ntp.ios.ntp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/ios/ntp.py#L15" + }, + "iosxe": { + "class": "Ntp", + "doc": "NTP Genie Ops Object", + "module_name": "ntp.iosxe.ntp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/ntp.py#L15" + }, + "iosxr": { + "class": "Ntp", + "doc": "NTP Genie Ops Object", + "module_name": "ntp.iosxr.ntp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxr/ntp.py#L15" + }, + "junos": { + "class": "Ntp", + "doc": "NTP Genie Ops Object", + "module_name": "ntp.junos.ntp", + "package": "genie.libs.ops", + "tokens": { + "os": "junos" + }, + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/junos/ntp.py#L13" + }, + "nxos": { + "class": "Ntp", + "doc": "NTP Genie Ops Object", + "module_name": "ntp.nxos.ntp", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/nxos/ntp.py#L12" + } + }, + "module_name": "ntp.ntp", + "package": "genie.libs.ops", + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/ntp.py#L5" + }, + "ospf": { + "class": "Ospf", + "doc": null, + "folders": { + "ios": { + "class": "Ospf", + "doc": null, + "module_name": "ospf.ios.ospf", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/ios/ospf.py#L6" + }, + "iosxe": { + "class": "Ospf", + "doc": "Ospf Ops Object", + "folders": { + "yang": { + "class": "Ospf", + "doc": "Ospf Ops Object", + "module_name": "ospf.iosxe.yang.ospf", + "package": "genie.libs.ops", + "tokens": { + "platform": "yang" + }, + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/yang/ospf.py#L5" + } + }, + "module_name": "ospf.iosxe.ospf", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/ospf.py#L11" + }, + "iosxr": { + "class": "Ospf", + "doc": "Ospf Ops Object", + "folders": { + "yang": { + "class": "Ospf", + "doc": "Ospf Ops Object", + "module_name": "ospf.iosxr.yang.ospf", + "package": "genie.libs.ops", + "tokens": { + "platform": "yang" + }, + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/yang/ospf.py#L4" + } + }, + "module_name": "ospf.iosxr.ospf", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/ospf.py#L25" + }, + "nxos": { + "class": "Ospf", + "doc": "Ospf Ops Object", + "folders": { + "yang": { + "class": "Ospf", + "doc": "Ospf Ops Object", + "module_name": "ospf.nxos.yang.ospf", + "package": "genie.libs.ops", + "tokens": { + "platform": "yang" + }, + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/yang/ospf.py#L5" + } + }, + "module_name": "ospf.nxos.ospf", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/ospf.py#L25" + } + }, + "module_name": "ospf.ospf", + "package": "genie.libs.ops", + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/ospf.py#L5" + }, + "pim": { + "class": "Pim", + "doc": null, + "folders": { + "ios": { + "class": "Pim", + "doc": "Pim Genie Ops Object", + "module_name": "pim.ios.pim", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "pim", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/ios/pim.py#L14" + }, + "iosxe": { + "class": "Pim", + "doc": "Pim Genie Ops Object", + "module_name": "pim.iosxe.pim", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "pim", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/iosxe/pim.py#L14" + }, + "nxos": { + "class": "Pim", + "doc": "Pim Genie Ops Object", + "module_name": "pim.nxos.pim", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "pim", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/nxos/pim.py#L30" + } + }, + "module_name": "pim.pim", + "package": "genie.libs.ops", + "uid": "pim", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/pim.py#L5" + }, + "platform": { + "class": "Platform", + "doc": null, + "folders": { + "cheetah": { + "folders": { + "ap": { + "class": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.cheetah.ap.platform", + "package": "genie.libs.ops", + "tokens": { + "os": "ap" + }, + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/cheetah/ap/platform.py#L7" + } + }, + "tokens": { + "origin": "cheetah" + } + }, + "ios": { + "class": "Platform", + "doc": "Platform Ops Object", + "folders": { + "cat6k": { + "class": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.ios.cat6k.platform", + "package": "genie.libs.ops", + "tokens": { + "platform": "cat6k" + }, + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/cat6k/platform.py#L12" + } + }, + "module_name": "platform.ios.platform", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/platform.py#L6" + }, + "iosxe": { + "class": "Platform", + "doc": "Platform Ops Object", + "folders": { + "asr900": { + "class": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.iosxe.asr900.platform", + "package": "genie.libs.ops", + "tokens": { + "platform": "asr900" + }, + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/asr900/platform.py#L15" + }, + "c8200": { + "class": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.iosxe.c8200.platform", + "package": "genie.libs.ops", + "tokens": { + "model": "c8200", + "platform": "cat8k" + }, + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c8200/platform.py#L16" + }, + "c9500": { + "class": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.iosxe.c9500.platform", + "package": "genie.libs.ops", + "tokens": { + "model": "c9500", + "platform": "cat9k" + }, + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/platform.py#L17" + } + }, + "module_name": "platform.iosxe.platform", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/platform.py#L15" + }, + "iosxr": { + "class": "Platform", + "doc": "Platform Genie Ops Object", + "module_name": "platform.iosxr.platform", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/platform.py#L16" + }, + "nxos": { + "class": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.nxos.platform", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/nxos/platform.py#L13" + } + }, + "module_name": "platform.platform", + "package": "genie.libs.ops", + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/platform.py#L7" + }, + "prefix_list": { + "class": "PrefixList", + "doc": null, + "folders": { + "ios": { + "class": "PrefixList", + "doc": null, + "module_name": "prefix_list.ios.prefix_list", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "prefixlist", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/ios/prefix_list.py#L6" + }, + "iosxe": { + "class": "PrefixList", + "doc": "Prefix-list Genie Ops Object", + "module_name": "prefix_list.iosxe.prefix_list", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "prefixlist", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/iosxe/prefix_list.py#L15" + }, + "nxos": { + "class": "PrefixList", + "doc": "Prefix-list Genie Ops Object", + "module_name": "prefix_list.nxos.prefix_list", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "prefixlist", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/nxos/prefix_list.py#L15" + } + }, + "module_name": "prefix_list.prefix_list", + "package": "genie.libs.ops", + "uid": "prefixlist", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/prefix_list.py#L4" + }, + "rip": { + "class": "Rip", + "doc": null, + "folders": { + "ios": { + "class": "Rip", + "doc": null, + "module_name": "rip.ios.rip", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "rip", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/ios/rip.py#L6" + }, + "iosxe": { + "class": "Rip", + "doc": "Rip Genie Ops Object", + "module_name": "rip.iosxe.rip", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "rip", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxe/rip.py#L18" + }, + "iosxr": { + "class": "Rip", + "doc": "Rip Genie Ops Object", + "module_name": "rip.iosxr.rip", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "rip", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxr/rip.py#L15" + } + }, + "module_name": "rip.rip", + "package": "genie.libs.ops", + "uid": "rip", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/rip.py#L5" + }, + "route_policy": { + "class": "RoutePolicy", + "doc": null, + "folders": { + "ios": { + "class": "RoutePolicy", + "doc": null, + "module_name": "route_policy.ios.route_policy", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "routepolicy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/ios/route_policy.py#L6" + }, + "iosxe": { + "class": "RoutePolicy", + "doc": "RoutePolicy Genie Ops Object", + "module_name": "route_policy.iosxe.route_policy", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "routepolicy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxe/route_policy.py#L9" + }, + "iosxr": { + "class": "RoutePolicy", + "doc": "RoutePolicy Genie Ops Object", + "module_name": "route_policy.iosxr.route_policy", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "routepolicy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxr/route_policy.py#L11" + }, + "nxos": { + "class": "RoutePolicy", + "doc": "RoutePolicy Genie Ops Object", + "module_name": "route_policy.nxos.route_policy", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "routepolicy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/nxos/route_policy.py#L12" + } + }, + "module_name": "route_policy.route_policy", + "package": "genie.libs.ops", + "uid": "routepolicy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/route_policy.py#L4" + }, + "routing": { + "class": "Routing", + "doc": null, + "folders": { + "ios": { + "class": "Routing", + "doc": null, + "module_name": "routing.ios.routing", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "routing", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/ios/routing.py#L6" + }, + "iosxe": { + "class": "Routing", + "doc": "Routing Ops Object", + "module_name": "routing.iosxe.routing", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "routing", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxe/routing.py#L13" + }, + "iosxr": { + "class": "Routing", + "doc": "Routing Ops Object", + "module_name": "routing.iosxr.routing", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "routing", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxr/routing.py#L11" + }, + "nxos": { + "class": "Routing", + "doc": "Routing Ops Object", + "module_name": "routing.nxos.routing", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "routing", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/nxos/routing.py#L8" + } + }, + "module_name": "routing.routing", + "package": "genie.libs.ops", + "uid": "routing", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/routing.py#L5" + }, + "static_routing": { + "class": "StaticRouting", + "doc": null, + "folders": { + "ios": { + "class": "StaticRouting", + "doc": null, + "module_name": "static_routing.ios.static_routing", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "staticrouting", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/ios/static_routing.py#L6" + }, + "iosxe": { + "class": "StaticRouting", + "doc": "StaticRouting Ops Object", + "module_name": "static_routing.iosxe.static_routing", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "staticrouting", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxe/static_routing.py#L10" + }, + "iosxr": { + "class": "StaticRouting", + "doc": "StaticRouting Ops Object", + "module_name": "static_routing.iosxr.static_routing", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "staticrouting", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxr/static_routing.py#L7" + }, + "nxos": { + "class": "StaticRouting", + "doc": "StaticRouting Ops Object", + "module_name": "static_routing.nxos.static_routing", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "staticrouting", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/nxos/static_routing.py#L8" + } + }, + "module_name": "static_routing.static_routing", + "package": "genie.libs.ops", + "uid": "staticrouting", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/static_routing.py#L4" + }, + "stp": { + "class": "Stp", + "doc": null, + "folders": { + "ios": { + "class": "Stp", + "doc": null, + "module_name": "stp.ios.stp", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "stp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/ios/stp.py#L6" + }, + "iosxe": { + "class": "Stp", + "doc": "Spanning-tree Genie Ops Object", + "module_name": "stp.iosxe.stp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "stp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxe/stp.py#L9" + }, + "iosxr": { + "class": "Stp", + "doc": "STP Genie Ops Object", + "module_name": "stp.iosxr.stp", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "stp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxr/stp.py#L15" + } + }, + "module_name": "stp.stp", + "package": "genie.libs.ops", + "uid": "stp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/stp.py#L5" + }, + "terminal": { + "class": "Terminal", + "doc": null, + "folders": { + "iosxe": { + "class": "Terminal", + "doc": "Show Terminal Genie Ops Object", + "module_name": "terminal.iosxe.terminal", + "package": "genie.libs.ops", + "tokens": { + "origin": "iosxe" + }, + "uid": "terminal", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/iosxe/terminal.py#L8" + }, + "iosxr": { + "class": "Terminal", + "doc": "Show Terminal Genie Ops Object", + "module_name": "terminal.iosxr.terminal", + "package": "genie.libs.ops", + "tokens": { + "origin": "iosxr" + }, + "uid": "terminal", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/iosxr/terminal.py#L8" + }, + "nxos": { + "class": "Terminal", + "doc": "Show Terminal Genie Ops Object", + "module_name": "terminal.nxos.terminal", + "package": "genie.libs.ops", + "tokens": { + "origin": "nxos" + }, + "uid": "terminal", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/nxos/terminal.py#L8" + } + }, + "module_name": "terminal.terminal", + "package": "genie.libs.ops", + "uid": "terminal", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/terminal.py#L23" + }, + "token_order": [ + "origin", + "os", + "os_flavor", + "platform", + "model", + "pid", + "version", + "revision" + ], + "tokens": { + "model": [ + "c3850", + "c8200", + "c9500" + ], + "origin": [ + "cheetah", + "iosxe", + "iosxr", + "nxos" + ], + "os": [ + "ap", + "cat9k", + "ios", + "iosxe", + "iosxr", + "junos", + "nxos" + ], + "platform": [ + "asr1k", + "asr900", + "cat3k", + "cat6k", + "cat8k", + "cat9k", + "xml", + "yang" + ] + }, + "vlan": { + "class": "Vlan", + "doc": null, + "folders": { + "ios": { + "class": "Vlan", + "doc": null, + "module_name": "vlan.ios.vlan", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/ios/vlan.py#L6" + }, + "iosxe": { + "class": "Vlan", + "doc": "Vlan Ops Object", + "module_name": "vlan.iosxe.vlan", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxe/vlan.py#L5" + }, + "iosxr": { + "class": "Vlan", + "doc": "Vlan Ops Object", + "module_name": "vlan.iosxr.vlan", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxr/vlan.py#L8" + }, + "nxos": { + "class": "Vlan", + "doc": "Vlan Ops Object", + "module_name": "vlan.nxos.vlan", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/nxos/vlan.py#L13" + } + }, + "module_name": "vlan.vlan", + "package": "genie.libs.ops", + "uid": "vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/vlan.py#L5" + }, + "vrf": { + "class": "Vrf", + "doc": null, + "folders": { + "ios": { + "class": "Vrf", + "doc": null, + "module_name": "vrf.ios.vrf", + "package": "genie.libs.ops", + "tokens": { + "os": "ios" + }, + "uid": "vrf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/ios/vrf.py#L6" + }, + "iosxe": { + "class": "Vrf", + "doc": "Vrf Genie Ops Object", + "module_name": "vrf.iosxe.vrf", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "vrf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxe/vrf.py#L10" + }, + "iosxr": { + "class": "Vrf", + "doc": "Vrf Genie Ops Object", + "module_name": "vrf.iosxr.vrf", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxr" + }, + "uid": "vrf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxr/vrf.py#L13" + }, + "nxos": { + "class": "Vrf", + "doc": "Vrf Genie Ops Object", + "module_name": "vrf.nxos.vrf", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "vrf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/nxos/vrf.py#L13" + } + }, + "module_name": "vrf.vrf", + "package": "genie.libs.ops", + "uid": "vrf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/vrf.py#L5" + }, + "vxlan": { + "class": "Vxlan", + "doc": null, + "folders": { + "iosxe": { + "class": "Vxlan", + "doc": "Vxlan Ops Object", + "module_name": "vxlan.iosxe.vxlan", + "package": "genie.libs.ops", + "tokens": { + "os": "iosxe" + }, + "uid": "vxlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vxlan/iosxe/vxlan.py#L8" + }, + "nxos": { + "class": "Vxlan", + "doc": "Vxlan Ops Object", + "module_name": "vxlan.nxos.vxlan", + "package": "genie.libs.ops", + "tokens": { + "os": "nxos" + }, + "uid": "vxlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vxlan/nxos/vxlan.py#L33" + } + }, + "module_name": "vxlan.vxlan", + "package": "genie.libs.ops", + "uid": "vxlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vxlan/vxlan.py#L5" + } +} \ No newline at end of file diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ops.json~external_master b/pkgs/ops-pkg/src/genie/libs/ops/ops.json~external_master new file mode 100644 index 000000000..4c827ba41 --- /dev/null +++ b/pkgs/ops-pkg/src/genie/libs/ops/ops.json~external_master @@ -0,0 +1,1132 @@ +{ + "acl": { + "ios": { + "class_name": "Acl", + "doc": null, + "module_name": "acl.acl", + "package": "genie.libs.ops", + "uid": "acl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/ios/acl.py#L6" + }, + "iosxe": { + "class_name": "Acl", + "doc": "ACL Genie Ops Object", + "module_name": "acl.acl", + "package": "genie.libs.ops", + "uid": "acl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxe/acl.py#L10" + }, + "iosxr": { + "class_name": "Acl", + "doc": "ACL Genie Ops Object", + "module_name": "acl.acl", + "package": "genie.libs.ops", + "uid": "acl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/iosxr/acl.py#L12" + }, + "nxos": { + "class_name": "Acl", + "doc": "Acl Genie Ops Object", + "module_name": "acl.acl", + "package": "genie.libs.ops", + "uid": "acl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/acl/nxos/acl.py#L32" + } + }, + "arp": { + "ios": { + "class_name": "Arp", + "doc": "ARP Genie Ops Object", + "module_name": "arp.arp", + "package": "genie.libs.ops", + "uid": "arp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/ios/arp.py#L18" + }, + "iosxe": { + "class_name": "Arp", + "doc": "ARP Genie Ops Object", + "module_name": "arp.arp", + "package": "genie.libs.ops", + "uid": "arp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxe/arp.py#L18" + }, + "iosxr": { + "class_name": "Arp", + "doc": "ARP Genie Ops Object", + "module_name": "arp.arp", + "package": "genie.libs.ops", + "uid": "arp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/iosxr/arp.py#L16" + }, + "nxos": { + "class_name": "Arp", + "doc": "ARP Genie Ops Object", + "module_name": "arp.arp", + "package": "genie.libs.ops", + "uid": "arp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/arp/nxos/arp.py#L15" + } + }, + "bgp": { + "ios": { + "class_name": "Bgp", + "doc": null, + "module_name": "bgp.bgp", + "package": "genie.libs.ops", + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/ios/bgp.py#L6" + }, + "iosxe": { + "class_name": "Bgp", + "doc": "BGP Genie Ops Object", + "module_name": "bgp.bgp", + "package": "genie.libs.ops", + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxe/bgp.py#L12" + }, + "iosxr": { + "class_name": "Bgp", + "doc": "BGP Genie Ops Object", + "module_name": "bgp.bgp", + "package": "genie.libs.ops", + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/bgp.py#L21", + "yang": { + "class_name": "Bgp", + "doc": "BGP Genie Ops Object", + "module_name": "bgp.bgp", + "package": "genie.libs.ops", + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/iosxr/yang/bgp.py#L13" + } + }, + "nxos": { + "class_name": "Bgp", + "doc": "BGP Genie Ops Object", + "module_name": "bgp.bgp", + "package": "genie.libs.ops", + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/bgp.py#L28", + "xml": { + "class_name": "Bgp", + "doc": "BGP Genie Ops Object", + "module_name": "bgp.bgp", + "package": "genie.libs.ops", + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/xml/bgp.py#L13" + }, + "yang": { + "class_name": "Bgp", + "doc": "BGP Genie Ops Object", + "module_name": "bgp.bgp", + "package": "genie.libs.ops", + "uid": "bgp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/bgp/nxos/yang/bgp.py#L13" + } + } + }, + "device": { + "iosxe": { + "cat9k": { + "class_name": "Device", + "doc": "Device Genie Ops Object", + "module_name": "device.device", + "package": "genie.libs.ops", + "uid": "device", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/iosxe/cat9k/device.py#L7" + }, + "class_name": "Device", + "doc": "Device Genie Ops Object", + "module_name": "device.device", + "package": "genie.libs.ops", + "uid": "device", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/iosxe/device.py#L24" + }, + "iosxr": { + "class_name": "Device", + "doc": "Device Genie Ops Object", + "module_name": "device.device", + "package": "genie.libs.ops", + "uid": "device", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/iosxr/device.py#L21" + }, + "nxos": { + "class_name": "Device", + "doc": "Device Genie Ops Object", + "module_name": "device.device", + "package": "genie.libs.ops", + "uid": "device", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/device/nxos/device.py#L23" + } + }, + "dot1x": { + "ios": { + "class_name": "Dot1X", + "doc": null, + "module_name": "dot1x.dot1x", + "package": "genie.libs.ops", + "uid": "dot1x", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/dot1x/ios/dot1x.py#L6" + }, + "iosxe": { + "class_name": "Dot1X", + "doc": "Dot1x Genie Ops Object", + "module_name": "dot1x.dot1x", + "package": "genie.libs.ops", + "uid": "dot1x", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/dot1x/iosxe/dot1x.py#L9" + } + }, + "eigrp": { + "ios": { + "class_name": "Eigrp", + "doc": "\n Eigrp Ops Object\n ", + "module_name": "eigrp.eigrp", + "package": "genie.libs.ops", + "uid": "eigrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/ios/eigrp.py#L7" + }, + "iosxe": { + "class_name": "Eigrp", + "doc": "\n Eigrp Ops Object\n ", + "module_name": "eigrp.eigrp", + "package": "genie.libs.ops", + "uid": "eigrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxe/eigrp.py#L8" + }, + "iosxr": { + "class_name": "Eigrp", + "doc": "\n Eigrp Ops object\n ", + "module_name": "eigrp.eigrp", + "package": "genie.libs.ops", + "uid": "eigrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/iosxr/eigrp.py#L9" + }, + "nxos": { + "class_name": "Eigrp", + "doc": "\n Eigrp Ops object\n ", + "module_name": "eigrp.eigrp", + "package": "genie.libs.ops", + "uid": "eigrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/eigrp/nxos/eigrp.py#L9" + } + }, + "fdb": { + "ios": { + "class_name": "Fdb", + "doc": null, + "module_name": "fdb.fdb", + "package": "genie.libs.ops", + "uid": "fdb", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/ios/fdb.py#L6" + }, + "iosxe": { + "class_name": "Fdb", + "doc": "Fdb Genie Ops Object", + "module_name": "fdb.fdb", + "package": "genie.libs.ops", + "uid": "fdb", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/iosxe/fdb.py#L9" + }, + "nxos": { + "class_name": "Fdb", + "doc": "Fdb Genie Ops Object", + "module_name": "fdb.fdb", + "package": "genie.libs.ops", + "uid": "fdb", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/fdb/nxos/fdb.py#L11" + } + }, + "hsrp": { + "ios": { + "class_name": "Hsrp", + "doc": null, + "module_name": "hsrp.hsrp", + "package": "genie.libs.ops", + "uid": "hsrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/ios/hsrp.py#L6" + }, + "iosxe": { + "class_name": "Hsrp", + "doc": "HSRP Genie Ops Object", + "module_name": "hsrp.hsrp", + "package": "genie.libs.ops", + "uid": "hsrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxe/hsrp.py#L13" + }, + "iosxr": { + "class_name": "Hsrp", + "doc": "HSRP Genie Ops Object", + "module_name": "hsrp.hsrp", + "package": "genie.libs.ops", + "uid": "hsrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/iosxr/hsrp.py#L12" + }, + "nxos": { + "class_name": "Hsrp", + "doc": "HSRP Genie Ops Object", + "module_name": "hsrp.hsrp", + "package": "genie.libs.ops", + "uid": "hsrp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/hsrp/nxos/hsrp.py#L11" + } + }, + "igmp": { + "ios": { + "class_name": "Igmp", + "doc": null, + "module_name": "igmp.igmp", + "package": "genie.libs.ops", + "uid": "igmp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/ios/igmp.py#L6" + }, + "iosxe": { + "class_name": "Igmp", + "doc": "IGMP Genie Ops Object", + "module_name": "igmp.igmp", + "package": "genie.libs.ops", + "uid": "igmp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxe/igmp.py#L11" + }, + "iosxr": { + "class_name": "Igmp", + "doc": "IGMP Genie Ops Object", + "module_name": "igmp.igmp", + "package": "genie.libs.ops", + "uid": "igmp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/iosxr/igmp.py#L13" + }, + "nxos": { + "class_name": "Igmp", + "doc": "IGMP Genie Ops Object", + "module_name": "igmp.igmp", + "package": "genie.libs.ops", + "uid": "igmp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/igmp/nxos/igmp.py#L13" + } + }, + "interface": { + "cheetah": { + "ap": { + "class_name": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.interface", + "package": "genie.libs.ops", + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/cheetah/ap/interface.py#L14" + }, + "class_name": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.interface", + "package": "genie.libs.ops", + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/cheetah/ap/interface.py#L14" + }, + "ios": { + "class_name": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.interface", + "package": "genie.libs.ops", + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/ios/interface.py#L11" + }, + "iosxe": { + "asr1k": { + "class_name": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.interface", + "package": "genie.libs.ops", + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/asr1k/interface.py#L14" + }, + "c3850": { + "class_name": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.interface", + "package": "genie.libs.ops", + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/c3850/interface.py#L14" + }, + "class_name": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.interface", + "package": "genie.libs.ops", + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxe/interface.py#L17" + }, + "iosxr": { + "class_name": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.interface", + "package": "genie.libs.ops", + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/iosxr/interface.py#L20" + }, + "nxos": { + "class_name": "Interface", + "doc": "Interface Genie Ops Object", + "module_name": "interface.interface", + "package": "genie.libs.ops", + "uid": "interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/interface/nxos/interface.py#L17" + } + }, + "isis": { + "ios": { + "class_name": "Isis", + "doc": "Isis Genie Ops Object", + "module_name": "isis.isis", + "package": "genie.libs.ops", + "uid": "isis", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/ios/isis.py#L3" + }, + "iosxe": { + "class_name": "Isis", + "doc": "Isis Genie Ops Object", + "module_name": "isis.isis", + "package": "genie.libs.ops", + "uid": "isis", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxe/isis.py#L28" + }, + "iosxr": { + "class_name": "Isis", + "doc": "Isis Genie Ops Object", + "module_name": "isis.isis", + "package": "genie.libs.ops", + "uid": "isis", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/iosxr/isis.py#L22" + }, + "nxos": { + "class_name": "Isis", + "doc": "Isis Genie Ops Object", + "module_name": "isis.isis", + "package": "genie.libs.ops", + "uid": "isis", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/isis/nxos/isis.py#L21" + } + }, + "lag": { + "ios": { + "class_name": "Lag", + "doc": null, + "module_name": "lag.lag", + "package": "genie.libs.ops", + "uid": "lag", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/ios/lag.py#L6" + }, + "iosxe": { + "class_name": "Lag", + "doc": "Lag Genie Ops Object", + "module_name": "lag.lag", + "package": "genie.libs.ops", + "uid": "lag", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxe/lag.py#L9" + }, + "iosxr": { + "class_name": "Lag", + "doc": "LAG Genie Ops Object", + "module_name": "lag.lag", + "package": "genie.libs.ops", + "uid": "lag", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lag/iosxr/lag.py#L13" + } + }, + "lisp": { + "ios": { + "class_name": "Lisp", + "doc": null, + "module_name": "lisp.lisp", + "package": "genie.libs.ops", + "uid": "lisp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lisp/ios/lisp.py#L6" + }, + "iosxe": { + "class_name": "Lisp", + "doc": "Lisp Ops Object", + "module_name": "lisp.lisp", + "package": "genie.libs.ops", + "uid": "lisp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lisp/iosxe/lisp.py#L10" + } + }, + "lldp": { + "ios": { + "class_name": "Lldp", + "doc": null, + "module_name": "lldp.lldp", + "package": "genie.libs.ops", + "uid": "lldp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/ios/lldp.py#L6" + }, + "iosxe": { + "class_name": "Lldp", + "doc": "LLDP Genie Ops Object", + "module_name": "lldp.lldp", + "package": "genie.libs.ops", + "uid": "lldp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxe/lldp.py#L9" + }, + "iosxr": { + "class_name": "Lldp", + "doc": "LLDP Genie Ops Object", + "module_name": "lldp.lldp", + "package": "genie.libs.ops", + "uid": "lldp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/iosxr/lldp.py#L16" + }, + "nxos": { + "class_name": "Lldp", + "doc": "LLDP Genie Ops Object", + "module_name": "lldp.lldp", + "package": "genie.libs.ops", + "uid": "lldp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/lldp/nxos/lldp.py#L14" + } + }, + "mcast": { + "ios": { + "class_name": "Mcast", + "doc": null, + "module_name": "mcast.mcast", + "package": "genie.libs.ops", + "uid": "mcast", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/ios/mcast.py#L6" + }, + "iosxe": { + "class_name": "Mcast", + "doc": "Mcast Genie Ops Object", + "module_name": "mcast.mcast", + "package": "genie.libs.ops", + "uid": "mcast", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxe/mcast.py#L17" + }, + "iosxr": { + "class_name": "Mcast", + "doc": "Mcast Genie Ops Object", + "module_name": "mcast.mcast", + "package": "genie.libs.ops", + "uid": "mcast", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/iosxr/mcast.py#L17" + }, + "nxos": { + "class_name": "Mcast", + "doc": "Mcast Genie Ops Object", + "module_name": "mcast.mcast", + "package": "genie.libs.ops", + "uid": "mcast", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mcast/nxos/mcast.py#L16" + } + }, + "mld": { + "ios": { + "class_name": "Mld", + "doc": null, + "module_name": "mld.mld", + "package": "genie.libs.ops", + "uid": "mld", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/ios/mld.py#L6" + }, + "iosxe": { + "class_name": "Mld", + "doc": "MLD Genie Ops Object", + "module_name": "mld.mld", + "package": "genie.libs.ops", + "uid": "mld", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxe/mld.py#L11" + }, + "iosxr": { + "class_name": "Mld", + "doc": "MLD Genie Ops Object", + "module_name": "mld.mld", + "package": "genie.libs.ops", + "uid": "mld", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/iosxr/mld.py#L16" + }, + "nxos": { + "class_name": "Mld", + "doc": "MLD Genie Ops Object", + "module_name": "mld.mld", + "package": "genie.libs.ops", + "uid": "mld", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/mld/nxos/mld.py#L12" + } + }, + "msdp": { + "ios": { + "class_name": "Msdp", + "doc": "\n Msdp Ops Object\n ", + "module_name": "msdp.msdp", + "package": "genie.libs.ops", + "uid": "msdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/ios/msdp.py#L4" + }, + "iosxe": { + "class_name": "Msdp", + "doc": "\n Msdp Ops Object\n ", + "module_name": "msdp.msdp", + "package": "genie.libs.ops", + "uid": "msdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxe/msdp.py#L9" + }, + "iosxr": { + "class_name": "Msdp", + "doc": "\n Msdp Ops Object\n ", + "module_name": "msdp.msdp", + "package": "genie.libs.ops", + "uid": "msdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/iosxr/msdp.py#L13" + }, + "nxos": { + "class_name": "Msdp", + "doc": "Msdp Ops Object", + "module_name": "msdp.msdp", + "package": "genie.libs.ops", + "uid": "msdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/msdp/nxos/msdp.py#L10" + } + }, + "nd": { + "iosxe": { + "class_name": "Nd", + "doc": "Nd Ops Object", + "module_name": "nd.nd", + "package": "genie.libs.ops", + "uid": "nd", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxe/nd.py#L9" + }, + "iosxr": { + "class_name": "Nd", + "doc": "Nd Ops Object", + "module_name": "nd.nd", + "package": "genie.libs.ops", + "uid": "nd", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/iosxr/nd.py#L10" + }, + "nxos": { + "class_name": "Nd", + "doc": "Nd Ops Object", + "module_name": "nd.nd", + "package": "genie.libs.ops", + "uid": "nd", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/nd/nxos/nd.py#L10" + } + }, + "ntp": { + "ios": { + "class_name": "Ntp", + "doc": "NTP Genie Ops Object", + "module_name": "ntp.ntp", + "package": "genie.libs.ops", + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/ios/ntp.py#L15" + }, + "iosxe": { + "class_name": "Ntp", + "doc": "NTP Genie Ops Object", + "module_name": "ntp.ntp", + "package": "genie.libs.ops", + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxe/ntp.py#L15" + }, + "iosxr": { + "class_name": "Ntp", + "doc": "NTP Genie Ops Object", + "module_name": "ntp.ntp", + "package": "genie.libs.ops", + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/iosxr/ntp.py#L15" + }, + "junos": { + "class_name": "Ntp", + "doc": "NTP Genie Ops Object", + "module_name": "ntp.ntp", + "package": "genie.libs.ops", + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/junos/ntp.py#L13" + }, + "nxos": { + "class_name": "Ntp", + "doc": "NTP Genie Ops Object", + "module_name": "ntp.ntp", + "package": "genie.libs.ops", + "uid": "ntp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ntp/nxos/ntp.py#L12" + } + }, + "ospf": { + "ios": { + "class_name": "Ospf", + "doc": null, + "module_name": "ospf.ospf", + "package": "genie.libs.ops", + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/ios/ospf.py#L6" + }, + "iosxe": { + "class_name": "Ospf", + "doc": "Ospf Ops Object", + "module_name": "ospf.ospf", + "package": "genie.libs.ops", + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/ospf.py#L11", + "yang": { + "class_name": "Ospf", + "doc": "Ospf Ops Object", + "module_name": "ospf.ospf", + "package": "genie.libs.ops", + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/yang/ospf.py#L5" + } + }, + "iosxr": { + "class_name": "Ospf", + "doc": "Ospf Ops Object", + "module_name": "ospf.ospf", + "package": "genie.libs.ops", + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/ospf.py#L25", + "yang": { + "class_name": "Ospf", + "doc": "Ospf Ops Object", + "module_name": "ospf.ospf", + "package": "genie.libs.ops", + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/yang/ospf.py#L4" + } + }, + "nxos": { + "class_name": "Ospf", + "doc": "Ospf Ops Object", + "module_name": "ospf.ospf", + "package": "genie.libs.ops", + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/ospf.py#L25", + "yang": { + "class_name": "Ospf", + "doc": "Ospf Ops Object", + "module_name": "ospf.ospf", + "package": "genie.libs.ops", + "uid": "ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/yang/ospf.py#L5" + } + } + }, + "pim": { + "ios": { + "class_name": "Pim", + "doc": "Pim Genie Ops Object", + "module_name": "pim.pim", + "package": "genie.libs.ops", + "uid": "pim", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/ios/pim.py#L14" + }, + "iosxe": { + "class_name": "Pim", + "doc": "Pim Genie Ops Object", + "module_name": "pim.pim", + "package": "genie.libs.ops", + "uid": "pim", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/iosxe/pim.py#L14" + }, + "nxos": { + "class_name": "Pim", + "doc": "Pim Genie Ops Object", + "module_name": "pim.pim", + "package": "genie.libs.ops", + "uid": "pim", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/pim/nxos/pim.py#L30" + } + }, + "platform": { + "cheetah": { + "ap": { + "class_name": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.platform", + "package": "genie.libs.ops", + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/cheetah/ap/platform.py#L8" + }, + "class_name": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.platform", + "package": "genie.libs.ops", + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/cheetah/ap/platform.py#L8" + }, + "ios": { + "cat6k": { + "class_name": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.platform", + "package": "genie.libs.ops", + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/cat6k/platform.py#L11" + }, + "class_name": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.platform", + "package": "genie.libs.ops", + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/platform.py#L6" + }, + "iosxe": { + "asr900": { + "class_name": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.platform", + "package": "genie.libs.ops", + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/asr900/platform.py#L13" + }, + "c8200": { + "class_name": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.platform", + "package": "genie.libs.ops", + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c8200/platform.py#L13" + }, + "c9500": { + "class_name": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.platform", + "package": "genie.libs.ops", + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/platform.py#L14" + }, + "class_name": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.platform", + "package": "genie.libs.ops", + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/platform.py#L13" + }, + "iosxr": { + "class_name": "Platform", + "doc": "Platform Genie Ops Object", + "module_name": "platform.platform", + "package": "genie.libs.ops", + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/platform.py#L16" + }, + "nxos": { + "class_name": "Platform", + "doc": "Platform Ops Object", + "module_name": "platform.platform", + "package": "genie.libs.ops", + "uid": "platform", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/platform/nxos/platform.py#L13" + } + }, + "prefix_list": { + "ios": { + "class_name": "PrefixList", + "doc": null, + "module_name": "prefix_list.prefix_list", + "package": "genie.libs.ops", + "uid": "prefixlist", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/ios/prefix_list.py#L6" + }, + "iosxe": { + "class_name": "PrefixList", + "doc": "Prefix-list Genie Ops Object", + "module_name": "prefix_list.prefix_list", + "package": "genie.libs.ops", + "uid": "prefixlist", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/iosxe/prefix_list.py#L15" + }, + "nxos": { + "class_name": "PrefixList", + "doc": "Prefix-list Genie Ops Object", + "module_name": "prefix_list.prefix_list", + "package": "genie.libs.ops", + "uid": "prefixlist", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/nxos/prefix_list.py#L15" + } + }, + "rip": { + "ios": { + "class_name": "Rip", + "doc": null, + "module_name": "rip.rip", + "package": "genie.libs.ops", + "uid": "rip", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/ios/rip.py#L6" + }, + "iosxe": { + "class_name": "Rip", + "doc": "Rip Genie Ops Object", + "module_name": "rip.rip", + "package": "genie.libs.ops", + "uid": "rip", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxe/rip.py#L18" + }, + "iosxr": { + "class_name": "Rip", + "doc": "Rip Genie Ops Object", + "module_name": "rip.rip", + "package": "genie.libs.ops", + "uid": "rip", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxr/rip.py#L15" + } + }, + "route_policy": { + "ios": { + "class_name": "RoutePolicy", + "doc": null, + "module_name": "route_policy.route_policy", + "package": "genie.libs.ops", + "uid": "routepolicy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/ios/route_policy.py#L6" + }, + "iosxe": { + "class_name": "RoutePolicy", + "doc": "RoutePolicy Genie Ops Object", + "module_name": "route_policy.route_policy", + "package": "genie.libs.ops", + "uid": "routepolicy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxe/route_policy.py#L9" + }, + "iosxr": { + "class_name": "RoutePolicy", + "doc": "RoutePolicy Genie Ops Object", + "module_name": "route_policy.route_policy", + "package": "genie.libs.ops", + "uid": "routepolicy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxr/route_policy.py#L11" + }, + "nxos": { + "class_name": "RoutePolicy", + "doc": "RoutePolicy Genie Ops Object", + "module_name": "route_policy.route_policy", + "package": "genie.libs.ops", + "uid": "routepolicy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/route_policy/nxos/route_policy.py#L12" + } + }, + "routing": { + "ios": { + "class_name": "Routing", + "doc": null, + "module_name": "routing.routing", + "package": "genie.libs.ops", + "uid": "routing", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/ios/routing.py#L6" + }, + "iosxe": { + "class_name": "Routing", + "doc": "Routing Ops Object", + "module_name": "routing.routing", + "package": "genie.libs.ops", + "uid": "routing", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxe/routing.py#L13" + }, + "iosxr": { + "class_name": "Routing", + "doc": "Routing Ops Object", + "module_name": "routing.routing", + "package": "genie.libs.ops", + "uid": "routing", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxr/routing.py#L11" + }, + "nxos": { + "class_name": "Routing", + "doc": "Routing Ops Object", + "module_name": "routing.routing", + "package": "genie.libs.ops", + "uid": "routing", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/routing/nxos/routing.py#L8" + } + }, + "static_routing": { + "ios": { + "class_name": "StaticRouting", + "doc": null, + "module_name": "static_routing.static_routing", + "package": "genie.libs.ops", + "uid": "staticrouting", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/ios/static_routing.py#L6" + }, + "iosxe": { + "class_name": "StaticRouting", + "doc": "StaticRouting Ops Object", + "module_name": "static_routing.static_routing", + "package": "genie.libs.ops", + "uid": "staticrouting", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxe/static_routing.py#L10" + }, + "iosxr": { + "class_name": "StaticRouting", + "doc": "StaticRouting Ops Object", + "module_name": "static_routing.static_routing", + "package": "genie.libs.ops", + "uid": "staticrouting", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxr/static_routing.py#L7" + }, + "nxos": { + "class_name": "StaticRouting", + "doc": "StaticRouting Ops Object", + "module_name": "static_routing.static_routing", + "package": "genie.libs.ops", + "uid": "staticrouting", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/static_routing/nxos/static_routing.py#L8" + } + }, + "stp": { + "ios": { + "class_name": "Stp", + "doc": null, + "module_name": "stp.stp", + "package": "genie.libs.ops", + "uid": "stp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/ios/stp.py#L6" + }, + "iosxe": { + "class_name": "Stp", + "doc": "Spanning-tree Genie Ops Object", + "module_name": "stp.stp", + "package": "genie.libs.ops", + "uid": "stp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxe/stp.py#L9" + }, + "iosxr": { + "class_name": "Stp", + "doc": "STP Genie Ops Object", + "module_name": "stp.stp", + "package": "genie.libs.ops", + "uid": "stp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxr/stp.py#L15" + } + }, + "terminal": { + "iosxe": { + "class_name": "Terminal", + "doc": "Show Terminal Genie Ops Object", + "module_name": "terminal.terminal", + "package": "genie.libs.ops", + "uid": "terminal", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/iosxe/terminal.py#L8" + }, + "iosxr": { + "class_name": "Terminal", + "doc": "Show Terminal Genie Ops Object", + "module_name": "terminal.terminal", + "package": "genie.libs.ops", + "uid": "terminal", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/iosxr/terminal.py#L8" + }, + "nxos": { + "class_name": "Terminal", + "doc": "Show Terminal Genie Ops Object", + "module_name": "terminal.terminal", + "package": "genie.libs.ops", + "uid": "terminal", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/terminal/nxos/terminal.py#L8" + } + }, + "tokens": [ + "ap", + "asr1k", + "asr900", + "c3850", + "c8200", + "c9500", + "cat6k", + "cat9k", + "cheetah", + "ios", + "iosxe", + "iosxr", + "junos", + "nxos", + "xml", + "yang" + ], + "vlan": { + "ios": { + "class_name": "Vlan", + "doc": null, + "module_name": "vlan.vlan", + "package": "genie.libs.ops", + "uid": "vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/ios/vlan.py#L6" + }, + "iosxe": { + "class_name": "Vlan", + "doc": "Vlan Ops Object", + "module_name": "vlan.vlan", + "package": "genie.libs.ops", + "uid": "vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxe/vlan.py#L5" + }, + "iosxr": { + "class_name": "Vlan", + "doc": "Vlan Ops Object", + "module_name": "vlan.vlan", + "package": "genie.libs.ops", + "uid": "vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxr/vlan.py#L8" + }, + "nxos": { + "class_name": "Vlan", + "doc": "Vlan Ops Object", + "module_name": "vlan.vlan", + "package": "genie.libs.ops", + "uid": "vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vlan/nxos/vlan.py#L13" + } + }, + "vrf": { + "ios": { + "class_name": "Vrf", + "doc": null, + "module_name": "vrf.vrf", + "package": "genie.libs.ops", + "uid": "vrf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/ios/vrf.py#L6" + }, + "iosxe": { + "class_name": "Vrf", + "doc": "Vrf Genie Ops Object", + "module_name": "vrf.vrf", + "package": "genie.libs.ops", + "uid": "vrf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxe/vrf.py#L10" + }, + "iosxr": { + "class_name": "Vrf", + "doc": "Vrf Genie Ops Object", + "module_name": "vrf.vrf", + "package": "genie.libs.ops", + "uid": "vrf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxr/vrf.py#L13" + }, + "nxos": { + "class_name": "Vrf", + "doc": "Vrf Genie Ops Object", + "module_name": "vrf.vrf", + "package": "genie.libs.ops", + "uid": "vrf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vrf/nxos/vrf.py#L13" + } + }, + "vxlan": { + "iosxe": { + "class_name": "Vxlan", + "doc": "Vxlan Ops Object", + "module_name": "vxlan.vxlan", + "package": "genie.libs.ops", + "uid": "vxlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vxlan/iosxe/vxlan.py#L8" + }, + "nxos": { + "class_name": "Vxlan", + "doc": "Vxlan Ops Object", + "module_name": "vxlan.vxlan", + "package": "genie.libs.ops", + "uid": "vxlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/ops-pkg/src/genie/libs/ops/vxlan/nxos/vxlan.py#L33" + } + } +} \ No newline at end of file diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ospf/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/ospf/ios/__init__.py index 592bc0c2f..1c4324a07 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/ospf/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ospf/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ospf/ios/tests/test_ospf.py b/pkgs/ops-pkg/src/genie/libs/ops/ospf/ios/tests/test_ospf.py index bf8dd22fc..d11d09ecc 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/ospf/ios/tests/test_ospf.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ospf/ios/tests/test_ospf.py @@ -57,15 +57,17 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): self.maxDiff = None ospf = Ospf(device=self.device) - + # Set outputs ospf.maker.outputs[ShowIpProtocols] = {"{'vrf':''}":OspfOutput.ShowIpProtocols} ospf.maker.outputs[ShowIpOspf] = {'':OspfOutput.ShowIpOspf} @@ -82,8 +84,7 @@ def test_complete_output(self): ospf.maker.outputs[ShowIpOspfMplsTrafficEngLink] = {'':OspfOutput.ShowIpOspfMplsTrafficEngLink} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn() @@ -94,7 +95,7 @@ def test_complete_output(self): def test_selective_attribute(self): self.maxDiff = None ospf = Ospf(device=self.device) - + # Set outputs ospf.maker.outputs[ShowIpProtocols] = {"{'vrf':''}":OspfOutput.ShowIpProtocols} ospf.maker.outputs[ShowIpOspf] = {'':OspfOutput.ShowIpOspf} @@ -111,8 +112,7 @@ def test_selective_attribute(self): ospf.maker.outputs[ShowIpOspfMplsTrafficEngLink] = {'':OspfOutput.ShowIpOspfMplsTrafficEngLink} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn() @@ -128,7 +128,7 @@ def test_selective_attribute(self): def test_empty_output(self): self.maxDiff = None ospf = Ospf(device=self.device) - + # Set outputs ospf.maker.outputs[ShowIpProtocols] = {"{'vrf':''}":{}} ospf.maker.outputs[ShowIpOspf] = {'':{}} @@ -145,8 +145,7 @@ def test_empty_output(self): ospf.maker.outputs[ShowIpOspfMplsTrafficEngLink] = {'':{}} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn() @@ -159,7 +158,7 @@ def test_empty_output(self): def test_missing_attributes(self): self.maxDiff = None ospf = Ospf(device=self.device) - + # Set outputs ospf.maker.outputs[ShowIpProtocols] = {"{'vrf':''}":{}} ospf.maker.outputs[ShowIpOspf] = {'':OspfOutput.ShowIpOspf} @@ -176,8 +175,7 @@ def test_missing_attributes(self): ospf.maker.outputs[ShowIpOspfMplsTrafficEngLink] = {'':OspfOutput.ShowIpOspfMplsTrafficEngLink} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/tests/test_ospf.py b/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/tests/test_ospf.py index 0474759ab..0eed31d0d 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/tests/test_ospf.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/tests/test_ospf.py @@ -57,15 +57,17 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_custom_output(self): self.maxDiff = None ospf = Ospf(device=self.device) - + # Set outputs ospf.maker.outputs[ShowIpProtocols] = {"{'vrf':'default'}":OspfOutput.ShowIpProtocols} ospf.maker.outputs[ShowIpOspf] = {'':OspfOutput.ShowIpOspf} @@ -82,8 +84,7 @@ def test_custom_output(self): ospf.maker.outputs[ShowIpOspfMplsTrafficEngLink] = {'':OspfOutput.ShowIpOspfMplsTrafficEngLink} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn(vrf='default', interface='GigabitEthernet1', neighbor='10.64.4.4') @@ -120,8 +121,7 @@ def test_complete_output(self): '': OspfOutput.ShowIpOspfMplsTrafficEngLink} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn() @@ -132,7 +132,7 @@ def test_complete_output(self): def test_selective_attribute(self): self.maxDiff = None ospf = Ospf(device=self.device) - + # Set outputs ospf.maker.outputs[ShowIpProtocols] = {"{'vrf':''}":OspfOutput.ShowIpProtocols} ospf.maker.outputs[ShowIpOspf] = {'':OspfOutput.ShowIpOspf} @@ -149,8 +149,7 @@ def test_selective_attribute(self): ospf.maker.outputs[ShowIpOspfMplsTrafficEngLink] = {'':OspfOutput.ShowIpOspfMplsTrafficEngLink} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn() @@ -166,7 +165,7 @@ def test_selective_attribute(self): def test_empty_output(self): self.maxDiff = None ospf = Ospf(device=self.device) - + # Set outputs ospf.maker.outputs[ShowIpProtocols] = {"{'vrf':''}":{}} ospf.maker.outputs[ShowIpOspf] = {'':{}} @@ -183,8 +182,7 @@ def test_empty_output(self): ospf.maker.outputs[ShowIpOspfMplsTrafficEngLink] = {'':{}} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn() @@ -197,7 +195,7 @@ def test_empty_output(self): def test_missing_attributes(self): self.maxDiff = None ospf = Ospf(device=self.device) - + # Set outputs ospf.maker.outputs[ShowIpProtocols] = {"{'vrf':''}":{}} ospf.maker.outputs[ShowIpOspf] = {'':OspfOutput.ShowIpOspf} @@ -214,8 +212,7 @@ def test_missing_attributes(self): ospf.maker.outputs[ShowIpOspfMplsTrafficEngLink] = {'':OspfOutput.ShowIpOspfMplsTrafficEngLink} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/yang/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/yang/__init__.py index 592bc0c2f..749fd9d76 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/yang/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/yang/__init__.py @@ -1,6 +1,7 @@ try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='yang') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/__init__.py index 592bc0c2f..481045c21 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/tests/test_ospf.py b/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/tests/test_ospf.py index 3643f207b..c38ee8046 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/tests/test_ospf.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/tests/test_ospf.py @@ -54,9 +54,11 @@ def setUp(self): self.device.os = 'iosxr' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_custom_output(self): self.maxDiff = None @@ -90,8 +92,7 @@ def test_custom_output(self): OspfOutput.ShowOspfVrfAllInclusiveNeighborDetail_custom} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn(vrf='VRF1', interface='GigabitEthernet0/0/0/1', neighbor='10.36.3.3') @@ -102,7 +103,7 @@ def test_custom_output(self): def test_complete_output(self): self.maxDiff = None ospf = Ospf(device=self.device) - + # Set outputs ospf.maker.outputs[ShowProtocolsAfiAllAll] = {'':OspfOutput.ShowProtocolsAfiAllAll} ospf.maker.outputs[ShowOspfVrfAllInclusive] = {"{'vrf':''}":OspfOutput.ShowOspfVrfAllInclusive} @@ -118,8 +119,7 @@ def test_complete_output(self): ospf.maker.outputs[ShowOspfVrfAllInclusiveNeighborDetail] = {"{'interface':'','neighbor':'','vrf':''}":OspfOutput.ShowOspfVrfAllInclusiveNeighborDetail} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn() @@ -130,7 +130,7 @@ def test_complete_output(self): def test_selective_attribute(self): self.maxDiff = None ospf = Ospf(device=self.device) - + # Set outputs ospf.maker.outputs[ShowProtocolsAfiAllAll] = {'':OspfOutput.ShowProtocolsAfiAllAll} ospf.maker.outputs[ShowOspfVrfAllInclusive] = {"{'vrf':''}":OspfOutput.ShowOspfVrfAllInclusive} @@ -146,8 +146,7 @@ def test_selective_attribute(self): ospf.maker.outputs[ShowOspfVrfAllInclusiveNeighborDetail] = {"{'interface':'','neighbor':'','vrf':''}":OspfOutput.ShowOspfVrfAllInclusiveNeighborDetail} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn() @@ -162,7 +161,7 @@ def test_selective_attribute(self): def test_empty_output(self): self.maxDiff = None ospf = Ospf(device=self.device) - + # Set outputs ospf.maker.outputs[ShowProtocolsAfiAllAll] = {'':{}} ospf.maker.outputs[ShowOspfVrfAllInclusive] = {"{'vrf':''}":{}} @@ -178,8 +177,7 @@ def test_empty_output(self): ospf.maker.outputs[ShowOspfVrfAllInclusiveNeighborDetail] = {"{'interface':'','neighbor':'','vrf':''}":{}} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn() @@ -192,7 +190,7 @@ def test_empty_output(self): def test_missing_attributes(self): self.maxDiff = None ospf = Ospf(device=self.device) - + # Set outputs ospf.maker.outputs[ShowProtocolsAfiAllAll] = {'':{}} ospf.maker.outputs[ShowOspfVrfAllInclusive] = {"{'vrf':''}":OspfOutput.ShowOspfVrfAllInclusive} @@ -208,8 +206,7 @@ def test_missing_attributes(self): ospf.maker.outputs[ShowOspfVrfAllInclusiveNeighborDetail] = {"{'interface':'','neighbor':'','vrf':''}":OspfOutput.ShowOspfVrfAllInclusiveNeighborDetail} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/yang/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/yang/__init__.py index 592bc0c2f..749fd9d76 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/yang/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxr/yang/__init__.py @@ -1,6 +1,7 @@ try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='yang') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/__init__.py index 592bc0c2f..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/tests/test_ospf.py b/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/tests/test_ospf.py index 5b912f0f9..983db5221 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/tests/test_ospf.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/tests/test_ospf.py @@ -53,7 +53,11 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_custom_output(self): self.maxDiff = None @@ -84,8 +88,7 @@ def test_custom_output(self): "{'vrf':'VRF1'}": OspfOutput.ShowIpOspfDatabaseOpaqueAreaDetailVrfAll_custom} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn(vrf='VRF1', interface='Ethernet2/1', neighbor='10.84.66.66') @@ -96,7 +99,7 @@ def test_custom_output(self): def test_complete_output(self): self.maxDiff = None ospf = Ospf(device=self.device) - + # Set outputs ospf.maker.outputs[ShowFeature] = {'':OspfOutput.ShowFeature} ospf.maker.outputs[ShowIpOspf] = {"{'vrf':'all'}":OspfOutput.ShowIpOspfVrfAll} @@ -110,10 +113,9 @@ def test_complete_output(self): ospf.maker.outputs[ShowIpOspfDatabaseSummaryDetail] = {"{'vrf':'all'}":OspfOutput.ShowIpOspfDatabaseSummaryDetailVrfAll} ospf.maker.outputs[ShowIpOspfDatabaseRouterDetail] = {"{'vrf':'all'}":OspfOutput.ShowIpOspfDatabaseRouterDetailVrfAll} ospf.maker.outputs[ShowIpOspfDatabaseOpaqueAreaDetail] = {"{'vrf':'all'}":OspfOutput.ShowIpOspfDatabaseOpaqueAreaDetailVrfAll} - + # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn() @@ -125,7 +127,7 @@ def test_complete_output(self): def test_selective_attribute(self): self.maxDiff = None ospf = Ospf(device=self.device) - + # Set outputs ospf.maker.outputs[ShowFeature] = {'':OspfOutput.ShowFeature} ospf.maker.outputs[ShowIpOspf] = {"{'vrf':'all'}":OspfOutput.ShowIpOspfVrfAll} @@ -141,8 +143,7 @@ def test_selective_attribute(self): ospf.maker.outputs[ShowIpOspfDatabaseOpaqueAreaDetail] = {"{'vrf':'all'}":OspfOutput.ShowIpOspfDatabaseOpaqueAreaDetailVrfAll} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn() @@ -157,7 +158,7 @@ def test_selective_attribute(self): def test_empty_output(self): self.maxDiff = None ospf = Ospf(device=self.device) - + # Set outputs ospf.maker.outputs[ShowFeature] = {'':{}} ospf.maker.outputs[ShowIpOspf] = {"{'vrf':'all'}":{}} @@ -173,8 +174,7 @@ def test_empty_output(self): ospf.maker.outputs[ShowIpOspfDatabaseOpaqueAreaDetail] = {"{'vrf':'all'}":{}} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn() @@ -187,7 +187,7 @@ def test_empty_output(self): def test_missing_attributes(self): self.maxDiff = None ospf = Ospf(device=self.device) - + # Set outputs ospf.maker.outputs[ShowFeature] = {'':{}} ospf.maker.outputs[ShowIpOspf] = {"{'vrf':'all'}":OspfOutput.ShowIpOspfVrfAll} @@ -203,8 +203,7 @@ def test_missing_attributes(self): ospf.maker.outputs[ShowIpOspfDatabaseOpaqueAreaDetail] = {"{'vrf':'all'}":OspfOutput.ShowIpOspfDatabaseOpaqueAreaDetailVrfAll} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature ospf.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/yang/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/yang/__init__.py index 592bc0c2f..749fd9d76 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/yang/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/ospf/nxos/yang/__init__.py @@ -1,6 +1,7 @@ try: from genie import abstract - abstract.declare_token(__name__) + # ODD ABSTRACT + abstract.declare_token(platform='yang') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/pim/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/pim/ios/__init__.py index 592bc0c2f..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/pim/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/pim/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/pim/ios/tests/test_pim.py b/pkgs/ops-pkg/src/genie/libs/ops/pim/ios/tests/test_pim.py index 1478c80fb..f019e5fde 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/pim/ios/tests/test_pim.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/pim/ios/tests/test_pim.py @@ -37,14 +37,14 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None pim = Pim(device=self.device) - + # Get outputs pim.maker.outputs[ShowVrfDetail] = \ {'': PimOutput.ShowVrfDetail} @@ -112,7 +112,7 @@ def test_complete_output(self): # Verify Ops was created successfully self.assertEqual(pim.info, PimOutput.Pim_info) - # Verify Select Attributes + # Verify Select Attributes # Check specific attribute values # info - default vrf self.assertEqual(pim.info['vrf']['default']['address_family']\ @@ -153,7 +153,7 @@ def test_empty_output(self): {"{'vrf':''}": {}} pim.maker.outputs[ShowIpv6PimBsrCandidateRp].update( - {"{'vrf':'VRF1'}": {}}) + {"{'vrf':'VRF1'}": {}}) pim.maker.outputs[ShowIpPimBsrRouter] = \ {"{'vrf':''}": {}} @@ -212,7 +212,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + pim = Pim(device=self.device) # Get outputs @@ -281,7 +281,7 @@ def test_incomplete_output(self): # Delete missing specific attribute values expect_dict = deepcopy(PimOutput.Pim_info) - + del(expect_dict['vrf']['VRF1']) # Verify Ops was created successfully diff --git a/pkgs/ops-pkg/src/genie/libs/ops/pim/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/pim/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/pim/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/pim/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/pim/iosxe/tests/test_pim.py b/pkgs/ops-pkg/src/genie/libs/ops/pim/iosxe/tests/test_pim.py index 0b6bd9fcc..60c7adfd6 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/pim/iosxe/tests/test_pim.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/pim/iosxe/tests/test_pim.py @@ -37,14 +37,14 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None pim = Pim(device=self.device) - + # Get outputs pim.maker.outputs[ShowVrfDetail] = \ {'': PimOutput.ShowVrfDetail} @@ -71,7 +71,7 @@ def test_complete_output(self): {"{'vrf':''}": PimOutput.ShowIpv6PimBsrCandidateRp_default} pim.maker.outputs[ShowIpv6PimBsrCandidateRp].update( - {"{'vrf':'VRF1'}": PimOutput.ShowIpv6PimBsrCandidateRp_VRF1}) + {"{'vrf':'VRF1'}": PimOutput.ShowIpv6PimBsrCandidateRp_VRF1}) pim.maker.outputs[ShowIpPimBsrRouter] = \ {"{'vrf':''}": PimOutput.ShowIpPimBsrRouter_default} @@ -127,7 +127,7 @@ def test_complete_output(self): # Verify Ops was created successfully self.assertEqual(pim.info, PimOutput.Pim_info) - # Verify Select Attributes + # Verify Select Attributes # Check specific attribute values # info - default vrf self.assertEqual(pim.info['vrf']['default']['address_family']\ @@ -168,7 +168,7 @@ def test_empty_output(self): {"{'vrf':''}": {}} pim.maker.outputs[ShowIpv6PimBsrCandidateRp].update( - {"{'vrf':'VRF1'}": {}}) + {"{'vrf':'VRF1'}": {}}) pim.maker.outputs[ShowIpPimBsrRouter] = \ {"{'vrf':''}": {}} @@ -227,7 +227,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + pim = Pim(device=self.device) # Get outputs @@ -256,7 +256,7 @@ def test_incomplete_output(self): {"{'vrf':''}": PimOutput.ShowIpv6PimBsrCandidateRp_default} pim.maker.outputs[ShowIpv6PimBsrCandidateRp].update( - {"{'vrf':'VRF1'}": PimOutput.ShowIpv6PimBsrCandidateRp_VRF1}) + {"{'vrf':'VRF1'}": PimOutput.ShowIpv6PimBsrCandidateRp_VRF1}) pim.maker.outputs[ShowIpPimBsrRouter] = \ {"{'vrf':''}": PimOutput.ShowIpPimBsrRouter_default} @@ -317,7 +317,7 @@ def test_incomplete_output(self): del(expect_dict['vrf']['VRF1']['interfaces']['Tunnel7']) del(expect_dict['vrf']['VRF1']['interfaces']['GigabitEthernet3']['address_family']['ipv6']) - + # Verify Ops was created successfully self.assertEqual(pim.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/pim/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/pim/nxos/__init__.py index 592bc0c2f..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/pim/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/pim/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/pim/nxos/tests/test_pim.py b/pkgs/ops-pkg/src/genie/libs/ops/pim/nxos/tests/test_pim.py index 467dc1e42..bf9d2100c 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/pim/nxos/tests/test_pim.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/pim/nxos/tests/test_pim.py @@ -40,9 +40,9 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None @@ -67,13 +67,13 @@ def test_complete_output(self): {"{'vrf':'all'}": PimOutput.ShowIpPimRpVrfAll} pim.maker.outputs[ShowIpv6PimRp] = \ - {"{'vrf':'all'}": PimOutput.ShowIpv6PimRpVrfAll} + {"{'vrf':'all'}": PimOutput.ShowIpv6PimRpVrfAll} pim.maker.outputs[ShowIpPimDf] = \ {"{'vrf':'all'}": PimOutput.ShowIpPimDfVrfAll} pim.maker.outputs[ShowIpv6PimDf] = \ - {"{'vrf':'all'}": PimOutput.ShowIpv6PimDfVrfAll} + {"{'vrf':'all'}": PimOutput.ShowIpv6PimDfVrfAll} pim.maker.outputs[ShowIpPimVrfDetail] = \ {"{'vrf':'all'}": PimOutput.ShowIpPimVrfVallDetail} @@ -117,7 +117,7 @@ def test_empty_output(self): pim.maker.outputs[ShowIpMrouteVrfAll] = \ {'': {}} - + pim.maker.outputs[ShowIpv6MrouteVrfAll] = \ {'': {}} @@ -131,13 +131,13 @@ def test_empty_output(self): {"{'vrf':'all'}": {}} pim.maker.outputs[ShowIpv6PimRp] = \ - {"{'vrf':'all'}": {}} + {"{'vrf':'all'}": {}} pim.maker.outputs[ShowIpPimDf] = \ {"{'vrf':'all'}": {}} pim.maker.outputs[ShowIpv6PimDf] = \ - {"{'vrf':'all'}": {}} + {"{'vrf':'all'}": {}} pim.maker.outputs[ShowIpPimVrfDetail] = \ {"{'vrf':'all'}": {}} @@ -187,7 +187,7 @@ def test_selective_attribute(self): pim.maker.outputs[ShowIpMrouteVrfAll] = \ {'': PimOutput.ShowIpMrouteVrfAll} - + pim.maker.outputs[ShowIpv6MrouteVrfAll] = \ {'': PimOutput.ShowIpv6MrouteVrfAll} @@ -201,13 +201,13 @@ def test_selective_attribute(self): {"{'vrf':'all'}": PimOutput.ShowIpPimRpVrfAll} pim.maker.outputs[ShowIpv6PimRp] = \ - {"{'vrf':'all'}": PimOutput.ShowIpv6PimRpVrfAll} + {"{'vrf':'all'}": PimOutput.ShowIpv6PimRpVrfAll} pim.maker.outputs[ShowIpPimDf] = \ {"{'vrf':'all'}": PimOutput.ShowIpPimDfVrfAll} pim.maker.outputs[ShowIpv6PimDf] = \ - {"{'vrf':'all'}": PimOutput.ShowIpv6PimDfVrfAll} + {"{'vrf':'all'}": PimOutput.ShowIpv6PimDfVrfAll} pim.maker.outputs[ShowIpPimVrfDetail] = \ {"{'vrf':'all'}": PimOutput.ShowIpPimVrfVallDetail} @@ -237,7 +237,7 @@ def test_selective_attribute(self): {"{'vrf':'all'}": PimOutput.ShowIpPimPolicyStaticticsRegisterPolicyVrfAll} # Learn the feature - pim.learn() + pim.learn() # Check specific attribute values # info - default vrf @@ -251,7 +251,7 @@ def test_selective_attribute(self): def test_incomplete_output(self): self.maxDiff = None - + pim = Pim(device=self.device) # Get outputs @@ -260,7 +260,7 @@ def test_incomplete_output(self): pim.maker.outputs[ShowIpMrouteVrfAll] = \ {'': PimOutput.ShowIpMrouteVrfAll} - + pim.maker.outputs[ShowIpv6MrouteVrfAll] = \ {'': PimOutput.ShowIpv6MrouteVrfAll} @@ -274,13 +274,13 @@ def test_incomplete_output(self): {"{'vrf':'all'}": PimOutput.ShowIpPimRpVrfAll} pim.maker.outputs[ShowIpv6PimRp] = \ - {"{'vrf':'all'}": PimOutput.ShowIpv6PimRpVrfAll} + {"{'vrf':'all'}": PimOutput.ShowIpv6PimRpVrfAll} pim.maker.outputs[ShowIpPimDf] = \ {"{'vrf':'all'}": PimOutput.ShowIpPimDfVrfAll} pim.maker.outputs[ShowIpv6PimDf] = \ - {"{'vrf':'all'}": PimOutput.ShowIpv6PimDfVrfAll} + {"{'vrf':'all'}": PimOutput.ShowIpv6PimDfVrfAll} pim.maker.outputs[ShowIpPimVrfDetail] = \ {"{'vrf':'all'}": PimOutput.ShowIpPimVrfVallDetail} @@ -317,7 +317,7 @@ def test_incomplete_output(self): del(expect_dict['feature_pim6']) del(expect_dict['feature_pim']) - + # Verify Ops was created successfully self.assertEqual(pim.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/__init__.py index 3e76c8dbc..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/__init__.py @@ -1,6 +1,6 @@ -try: - from genie import abstract - abstract.declare_token(__name__) -except Exception as e: - import warnings - warnings.warn('Could not declare abstraction token: ' + str(e)) +try: + from genie import abstract + abstract.declare_token(os='ios') +except Exception as e: + import warnings + warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/cat6k/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/cat6k/__init__.py index 592bc0c2f..558d83467 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/cat6k/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/cat6k/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='cat6k') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/cat6k/tests/test_platform.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/cat6k/tests/test_platform.py index a20cc8da7..74a2dcc9d 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/cat6k/tests/test_platform.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/cat6k/tests/test_platform.py @@ -36,7 +36,11 @@ def setUp(self): self.device.mapping['cli'] = 'cli' self.device.custom['abstraction'] = {'order': ['os']} self.device.platform = 'cat6k' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_cat6k(self): f = Platform(device=self.device) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/tests/test_platform.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/tests/test_platform.py index 42bb9ee19..9df10d4be 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/tests/test_platform.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/ios/tests/test_platform.py @@ -32,8 +32,7 @@ def setUp(self): def test_complete_output(self): self.maxDiff = None - self.device.execute = Mock() - self.device.execute.side_effect = mapper + platform = Platform(device=self.device) # Learn the feature @@ -52,8 +51,7 @@ def test_complete_output(self): def test_missing_attributes(self): self.maxDiff = None - self.device.execute = Mock() - self.device.execute.side_effect = mapper + f = Platform(device=self.device) f.maker.outputs['show version'] = \ @@ -70,8 +68,7 @@ def test_missing_attributes(self): def test_selective_attribute_asr1k(self): self.maxDiff = None - self.device.execute = Mock() - self.device.execute.side_effect = mapper + f = Platform(device=self.device, attributes=['[os]']) f.maker.outputs['show version'] = \ @@ -88,8 +85,7 @@ def test_selective_attribute_asr1k(self): def test_empty_parser_output(self): self.maxDiff = None - self.device.execute = Mock() - self.device.execute.side_effect = mapper + f = Platform(device=self.device) f.maker.outputs['show version'] = \ diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/asr900/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/asr900/__init__.py index 592bc0c2f..3c8e8875c 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/asr900/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/asr900/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='asr900') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/asr900/tests/test_platform.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/asr900/tests/test_platform.py index 3226cc766..f1ce91424 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/asr900/tests/test_platform.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/asr900/tests/test_platform.py @@ -23,9 +23,11 @@ def setUp(self): self.device.os = 'iosxe' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete(self): diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c8200/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c8200/__init__.py index 592bc0c2f..2a426ba74 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c8200/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c8200/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='cat8k', model='c8200') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c8200/tests/test_platform.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c8200/tests/test_platform.py index d76de2716..3c94c0689 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c8200/tests/test_platform.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c8200/tests/test_platform.py @@ -25,9 +25,11 @@ def setUp(self): self.device.os = 'iosxe' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_c8200(self): self.maxDiff = None diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/__init__.py index 592bc0c2f..fdd558ba8 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(platform='cat9k', model='c9500') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/platform.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/platform.py index d9910fd93..2513a3391 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/platform.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/platform.py @@ -9,8 +9,8 @@ slot_num # Genie Parsers from genie.libs.parser.iosxe.show_platform import Dir -from genie.libs.parser.iosxe.c9500 import show_platform -from genie.libs.parser.iosxe.c9500.show_issu import ShowIssuStateDetail,\ +from genie.libs.parser.iosxe.cat9k.c9500 import show_platform +from genie.libs.parser.iosxe.cat9k.c9500.show_issu import ShowIssuStateDetail,\ ShowIssuRollbackTimer diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/tests/test_platform.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/tests/test_platform.py index e6d9af646..094edfa53 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/tests/test_platform.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxe/c9500/tests/test_platform.py @@ -7,12 +7,12 @@ # Genie Xbu_shared from genie.libs.ops.platform.iosxe.c9500.platform import Platform from genie.libs.ops.platform.iosxe.c9500.tests.platform_output import PlatformOutput -from genie.libs.parser.iosxe.c9500.show_platform import ShowVersion, \ +from genie.libs.parser.iosxe.cat9k.c9500.show_platform import ShowVersion, \ ShowRedundancy, \ ShowInventory, \ ShowPlatform from genie.libs.parser.iosxe.show_platform import Dir -from genie.libs.parser.iosxe.c9500.show_issu import ShowIssuStateDetail,\ +from genie.libs.parser.iosxe.cat9k.c9500.show_issu import ShowIssuStateDetail,\ ShowIssuRollbackTimer @@ -23,9 +23,11 @@ def setUp(self): self.device.os = 'iosxe' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_c9500(self): diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/__init__.py index 592bc0c2f..481045c21 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/platform.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/platform.py index bb094c65e..665b86996 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/platform.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/platform.py @@ -1,4 +1,4 @@ -''' +''' Platform Genie Ops Object for IOSXR. ''' @@ -20,7 +20,7 @@ def get_active_uptime(self, item): for node in item: if 'active' in item[node]['role'].lower(): return item[node]['node_uptime_in_seconds'] - + def learn(self): '''Learn Platform Ops''' @@ -38,6 +38,26 @@ def learn(self): src='[sn]', dest='[chassis_sn]') + self.add_leaf(cmd='show diag details', + src='[item][Rack 0-Chassis][chassis_serial_number]', + dest='[chassis_sn]') + + self.add_leaf(cmd='show diag details', + src='[item][Rack 0-Virtual][pcb_serial_number]', + dest='[chassis_sn]') + + # chassis + self.add_leaf(cmd=AdminShowDiagChassis, + src='[pid]', + dest='[chassis]') + + self.add_leaf(cmd='show diag details', + src='[item][Rack 0-Chassis][pid]', + dest='[chassis]') + + self.add_leaf(cmd='show diag details', + src='[item][Rack 0-Virtual][pid]', + dest='[chassis]') # rtr_type self.add_leaf(cmd=ShowVersion, @@ -83,7 +103,7 @@ def learn(self): self.add_leaf(cmd=ShowInstallActiveSummary, src='[sdr]', dest='[sdr_owner]') - + # ======================= # VirtualDeviceAttributes # ======================= diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/tests/platform_output.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/tests/platform_output.py index 82e930ec0..a409bae6d 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/tests/platform_output.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/tests/platform_output.py @@ -219,6 +219,39 @@ class PlatformOutput(object): 'total_bytes': '2562719744 bytes', 'total_free_bytes': '1918621184 bytes'}} + # 'show diag details' + showDiagDetailsOutput = { + 'item': { + 'Rack 0-Chassis': { + 'description': 'Cisco 8000 Series 32x400G QSFPDD 1RU Fixed System w/HBM', + 'controller_family': '0045', + 'controller_type': '06b1', + 'pid': '8201-32FH', + 'vid': 'V03', + 'udi_description': 'Cisco 8000 Series 32x400G QSFPDD 1RU Fixed System w/HBM', + 'chassis_serial_number': 'FLM263401XF', + 'top_assy_part_number': '68-7325-05', + 'top_assy_revision': 'B0', + 'pcb_serial_number': 'FLM263303GJ', + 'pca_number': '73-20364-02', + 'pca_revision': 'E0', + 'clei_code': 'CMM6210ARC', + 'eci_number': '477690', + 'deviation_number_1': '0', + 'deviation_number_2': '0', + 'deviation_number_3': '0', + 'deviation_number_4': '0', + 'deviation_number_5': '0', + 'manufacturing_number': '00 00 00 00 00 00 00 00', + 'calibration_data': '00000000', + 'chassis_mac_address': '3c26.e4b6.8c00', + 'mac_address_block_size': '512', + 'hardware_revision': '1.0', + 'device_value_1': '42 e0 00 08 28 00 00 00' + } + } + } + # Platform Ops Object final output platformOpsOutput = { 'attributes': None, diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/tests/test_platform.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/tests/test_platform.py index 2d934e400..790b0f544 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/tests/test_platform.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/iosxr/tests/test_platform.py @@ -3,6 +3,7 @@ # ATS from pyats.topology import Device +from unittest.mock import Mock # Genie from genie.ops.base import Base @@ -11,21 +12,22 @@ from genie.libs.ops.platform.iosxr.tests.platform_output import PlatformOutput # Parser -from genie.libs.parser.iosxr.show_platform import ShowVersion, ShowSdrDetail,\ - ShowPlatform, ShowPlatformVm,\ - ShowInstallActiveSummary, ShowInventory,\ - ShowRedundancySummary, AdminShowDiagChassis,\ - ShowRedundancy, Dir +from genie.libs.parser.iosxr.show_platform import ShowVersion, ShowSdrDetail, \ + ShowPlatform, ShowPlatformVm, \ + ShowInstallActiveSummary, ShowInventory, \ + ShowRedundancySummary, AdminShowDiagChassis, \ + ShowRedundancy, Dir, ShowDiagDetails class test_platform(unittest.TestCase): def setUp(self): - self.device = Device(name='aDevice') - self.device.os = 'iosxr' - self.device.mapping={} - self.device.mapping['cli']='cli' - self.device.connectionmgr.connections['cli'] = '5' + self.device = Device(name='aDevice', os='iosxr') + self.device.custom.setdefault("abstraction", {})["order"] = ["os"] + self.device.mapping = {'cli': 'cli'} + mock_connection = Mock() + mock_connection.device = self.device + self.device.connectionmgr.connections['cli'] = mock_connection def test_all_attributes(self): self.maxDiff = None @@ -54,12 +56,15 @@ def test_all_attributes(self): {'':PlatformOutput.adminShowDiagChassisOutput} # Get 'dir' output p.maker.outputs[Dir] = {'':PlatformOutput.dirOutput} + # Get 'show diag details' output + p.maker.outputs[ShowDiagDetails] = \ + {'':PlatformOutput.showDiagDetailsOutput} # Learn the feature p.learn() # Check all match - self.assertEqual(p.chassis, 'ASR9K') - self.assertEqual(p.chassis_sn, 'FOX1810G8LR') + self.assertEqual(p.chassis, '8201-32FH') + self.assertEqual(p.chassis_sn, 'FLM263401XF') self.assertEqual(p.config_register, '0x1922') dir_value = { 'dir_name': 'disk0a:/usr', @@ -173,6 +178,9 @@ def test_missing_attributes(self): {'':PlatformOutput.adminShowDiagChassisOutput} # Get 'dir' output p.maker.outputs[Dir] = {'':PlatformOutput.dirOutput} + # Get 'show diag details' output + p.maker.outputs[ShowDiagDetails] = \ + {'':PlatformOutput.showDiagDetailsOutput} # Learn the feature p.learn() @@ -208,6 +216,10 @@ def test_selective_attribute(self): {'':PlatformOutput.adminShowDiagChassisOutput} # Get 'dir' output p.maker.outputs[Dir] = {'':PlatformOutput.dirOutput} + # Get 'show diag details' output + p.maker.outputs[ShowDiagDetails] = \ + {'':PlatformOutput.showDiagDetailsOutput} + # Learn the feature p.learn() @@ -218,7 +230,6 @@ def test_selective_attribute(self): def test_ignored(self): self.maxDiff = None - p1 = Platform(device=self.device) # Get 'show version' output p1.maker.outputs[ShowVersion] = {'':PlatformOutput.showVersionOutput} @@ -244,6 +255,9 @@ def test_ignored(self): {'':PlatformOutput.adminShowDiagChassisOutput} # Get 'dir' output p1.maker.outputs[Dir] = {'':PlatformOutput.dirOutput} + # Get 'show diag details' output + p1.maker.outputs[ShowDiagDetails] = \ + {'':PlatformOutput.showDiagDetailsOutput} p2 = Platform(device=self.device) # Get 'show version' output @@ -270,7 +284,10 @@ def test_ignored(self): {'':PlatformOutput.adminShowDiagChassisOutput} # Get 'dir' output p2.maker.outputs[Dir] = {'':PlatformOutput.dirOutput} - + # Get 'show diag details' output + p2.maker.outputs[ShowDiagDetails] = \ + {'':PlatformOutput.showDiagDetailsOutput} + # Learn the feature p1.learn() p2.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/platform/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/platform/nxos/__init__.py index 592bc0c2f..ef95f9476 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/platform/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/platform/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/ios/__init__.py index 592bc0c2f..1c4324a07 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/ios/tests/test_prefix_list.py b/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/ios/tests/test_prefix_list.py index 733c59f1c..fe0725957 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/ios/tests/test_prefix_list.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/ios/tests/test_prefix_list.py @@ -23,9 +23,9 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None @@ -69,7 +69,7 @@ def test_selective_attribute(self): {'':PrefixListOutput.ShowIpv6PrefixListDetail} # Learn the feature - prefix.learn() + prefix.learn() # Check specific attribute values # info - protocol @@ -88,12 +88,12 @@ def test_incomplete_output(self): prefix.maker.outputs[ShowIpv6PrefixListDetail] = {'':''} # Learn the feature - prefix.learn() + prefix.learn() # Delete missing specific attribute values expect_dict = deepcopy(PrefixListOutput.PrefixList_info) del(expect_dict['prefix_set_name']['test6']) - + # Verify Ops was created successfully self.assertEqual(prefix.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/iosxe/tests/test_prefix_list.py b/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/iosxe/tests/test_prefix_list.py index cbca7f1b0..d130d2471 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/iosxe/tests/test_prefix_list.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/iosxe/tests/test_prefix_list.py @@ -23,9 +23,9 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None @@ -69,7 +69,7 @@ def test_selective_attribute(self): {'':PrefixListOutput.ShowIpv6PrefixListDetail} # Learn the feature - prefix.learn() + prefix.learn() # Check specific attribute values # info - protocol @@ -88,12 +88,12 @@ def test_incomplete_output(self): prefix.maker.outputs[ShowIpv6PrefixListDetail] = {'':''} # Learn the feature - prefix.learn() + prefix.learn() # Delete missing specific attribute values expect_dict = deepcopy(PrefixListOutput.PrefixList_info) del(expect_dict['prefix_set_name']['test6']) - + # Verify Ops was created successfully self.assertEqual(prefix.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/nxos/__init__.py index 592bc0c2f..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/nxos/tests/test_prefix_list.py b/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/nxos/tests/test_prefix_list.py index 6620e68b5..82ce6f47f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/nxos/tests/test_prefix_list.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/prefix_list/nxos/tests/test_prefix_list.py @@ -22,9 +22,9 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_output(self): self.maxDiff = None @@ -68,7 +68,7 @@ def test_selective_attribute(self): {'':PrefixListOutput.ShowIpv6PrefixList} # Learn the feature - prefix.learn() + prefix.learn() # Check specific attribute values # info - protocol @@ -87,12 +87,12 @@ def test_incomplete_output(self): prefix.maker.outputs[ShowIpv6PrefixList] = {'':''} # Learn the feature - prefix.learn() + prefix.learn() # Delete missing specific attribute values expect_dict = deepcopy(PrefixListOutput.PrefixList_info) del(expect_dict['prefix_set_name']['test6']) - + # Verify Ops was created successfully self.assertEqual(prefix.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/rip/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/rip/ios/__init__.py index 592bc0c2f..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/rip/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/rip/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/rip/ios/tests/test_rip.py b/pkgs/ops-pkg/src/genie/libs/ops/rip/ios/tests/test_rip.py index b3f06970e..cdb49af25 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/rip/ios/tests/test_rip.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/rip/ios/tests/test_rip.py @@ -34,14 +34,17 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping = {} self.device.mapping['cli'] = 'cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_full_rip(self): f = Rip(device=self.device) f.maker.outputs[ShowVrfDetail] = {'': RipOutput.ShowVrfDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -53,8 +56,7 @@ def test_selective_attribute_rip(self): f = Rip(device=self.device) f.maker.outputs[ShowVrfDetail] = {'': RipOutput.ShowVrfDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -73,8 +75,7 @@ def test_missing_attributes_rip(self): f.maker.outputs[ShowVrfDetail] = {'': RipOutput.ShowVrfDetail} # Get 'show ip static route' output - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -101,8 +102,7 @@ def test_empty_output_rip(self): outputs['show ipv6 rip vrf VRF1'] = '' # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxe/tests/test_rip.py b/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxe/tests/test_rip.py index 49b3d4575..2d0529869 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxe/tests/test_rip.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxe/tests/test_rip.py @@ -34,14 +34,17 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping = {} self.device.mapping['cli'] = 'cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_full_rip(self): f = Rip(device=self.device) f.maker.outputs[ShowVrfDetail] = {'': RipOutput.ShowVrfDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -53,8 +56,7 @@ def test_selective_attribute_rip(self): f = Rip(device=self.device) f.maker.outputs[ShowVrfDetail] = {'': RipOutput.ShowVrfDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -73,8 +75,7 @@ def test_missing_attributes_rip(self): f.maker.outputs[ShowVrfDetail] = {'': RipOutput.ShowVrfDetail} # Get 'show ip static route' output - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -101,8 +102,7 @@ def test_empty_output_rip(self): outputs['show ipv6 rip vrf VRF1'] = '' # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxr/__init__.py index 592bc0c2f..481045c21 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxr/tests/test_rip.py b/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxr/tests/test_rip.py index 4d7a62de5..b8f871a27 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxr/tests/test_rip.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/rip/iosxr/tests/test_rip.py @@ -32,14 +32,17 @@ def setUp(self): self.device.os = 'iosxr' self.device.mapping = {} self.device.mapping['cli'] = 'cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_full_rip(self): f = Rip(device=self.device) f.maker.outputs[ShowVrfAllDetail] = {'': RipOutput.show_vrf_all_detail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + f.learn() @@ -61,8 +64,7 @@ def test_empty_output(self): outputs.update({'show rip interface': ''}) outputs.update({'show rip vrf VRF1 interface': ''}) - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/route_policy/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/route_policy/ios/__init__.py index 592bc0c2f..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/route_policy/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/route_policy/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxr/__init__.py index 592bc0c2f..481045c21 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/route_policy/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/route_policy/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/route_policy/nxos/__init__.py index 592bc0c2f..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/route_policy/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/route_policy/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/routing/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/routing/ios/__init__.py index 592bc0c2f..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/routing/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/routing/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/routing/ios/tests/test_routing.py b/pkgs/ops-pkg/src/genie/libs/ops/routing/ios/tests/test_routing.py index 64b2dde73..1e5328ee6 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/routing/ios/tests/test_routing.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/routing/ios/tests/test_routing.py @@ -37,7 +37,11 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_full_route(self): @@ -46,8 +50,7 @@ def test_full_route(self): f.maker.outputs[ShowVrfDetail] = {'': RouteOutput.ShowVrfDetail} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -70,8 +73,7 @@ def test_missing_attributes_route(self): outputs['show ip route vrf VRF1'] = '' # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -98,8 +100,7 @@ def test_empty_output_route(self): outputs['show ipv6 route vrf default'] = '' # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxe/tests/test_routing.py b/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxe/tests/test_routing.py index a1eb9e5f3..7430de259 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxe/tests/test_routing.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxe/tests/test_routing.py @@ -37,7 +37,11 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_full_route(self): @@ -46,8 +50,7 @@ def test_full_route(self): f.maker.outputs[ShowVrfDetail] = {'': RouteOutput.ShowVrfDetail} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -60,8 +63,7 @@ def test_specific_vrf(self): f.maker.outputs[ShowVrfDetail] = {'': RouteOutput.ShowVrfDetail} # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn(vrf='VRF1') @@ -75,8 +77,7 @@ def test_missing_attributes_route(self): outputs['show ip route vrf VRF1'] = '' # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -103,8 +104,7 @@ def test_empty_output_route(self): outputs['show ipv6 route vrf default'] = '' # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxr/__init__.py index 592bc0c2f..481045c21 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxr/tests/test_routing.py b/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxr/tests/test_routing.py index 19cf36976..df69c98dd 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxr/tests/test_routing.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/routing/iosxr/tests/test_routing.py @@ -25,19 +25,22 @@ def mapper(key): return outputs[key] class test_route_all(unittest.TestCase): - + def setUp(self): self.device = Device(name='aDevice') self.device.os = 'iosxr' self.device.custom['abstraction'] = {'order':['os']} self.device.mapping = {'cli': 'cli'} - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_custom_output(self): f = Routing(device=self.device) # Get 'show ip static route' output - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn(address_family='ipv4', route='10.23.90.0', interface='GigabitEthernet0/0/0/1.90') self.maxDiff = None @@ -46,8 +49,7 @@ def test_custom_output(self): def test_full_route(self): f = Routing(device=self.device) # Get 'show ip static route' output - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() self.maxDiff = None @@ -58,8 +60,7 @@ def test_selective_attribute_route(self): f = Routing(device=self.device) # Get 'show ipv4 static route' output - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() # Check match @@ -78,8 +79,7 @@ def test_empty_output_route(self): outputs['show route ipv4 10.23.90.0'] = '' outputs['show route vrf all ipv4 10.23.90.0'] = '' # Get outputs - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/routing/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/routing/nxos/__init__.py index 592bc0c2f..ef95f9476 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/routing/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/routing/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/static_routing/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/static_routing/ios/__init__.py index 592bc0c2f..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/static_routing/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/static_routing/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/static_routing/ios/tests/test_static_routing.py b/pkgs/ops-pkg/src/genie/libs/ops/static_routing/ios/tests/test_static_routing.py index f623ac549..d23dd1237 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/static_routing/ios/tests/test_static_routing.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/static_routing/ios/tests/test_static_routing.py @@ -32,15 +32,18 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping = {} self.device.mapping['cli'] = 'cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_full_static_route(self): f = StaticRouting(device=self.device) f.maker.outputs[ShowVrfDetail] = {'': StaticRouteOutput.ShowVrfDetail} # Get 'show ip static route' output - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -52,8 +55,7 @@ def test_selective_attribute_static_route(self): f.maker.outputs[ShowVrfDetail] = {'': StaticRouteOutput.ShowVrfDetail} # Get 'show ip static route' output - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() # Check match @@ -70,8 +72,7 @@ def test_missing_attributes_static_route(self): f.maker.outputs[ShowVrfDetail] = {'': StaticRouteOutput.ShowVrfDetail} # Get 'show ip static route' output - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -91,8 +92,7 @@ def test_empty_output_static_route(self): outputs['show ipv6 static vrf VRF1 detail'] = '' # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxe/tests/test_static_routing.py b/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxe/tests/test_static_routing.py index 1a50fd43e..f8c37005f 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxe/tests/test_static_routing.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxe/tests/test_static_routing.py @@ -32,15 +32,18 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping = {} self.device.mapping['cli'] = 'cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_full_static_route(self): f = StaticRouting(device=self.device) f.maker.outputs[ShowVrfDetail] = {'': StaticRouteOutput.ShowVrfDetail} # Get 'show ip static route' output - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -52,8 +55,7 @@ def test_selective_attribute_static_route(self): f.maker.outputs[ShowVrfDetail] = {'': StaticRouteOutput.ShowVrfDetail} # Get 'show ip static route' output - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() # Check match @@ -70,8 +72,7 @@ def test_missing_attributes_static_route(self): f.maker.outputs[ShowVrfDetail] = {'': StaticRouteOutput.ShowVrfDetail} # Get 'show ip static route' output - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() @@ -91,8 +92,7 @@ def test_empty_output_static_route(self): outputs['show ipv6 static vrf VRF1 detail'] = '' # Return outputs above as inputs to parser when called - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature f.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxr/__init__.py index 592bc0c2f..481045c21 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/static_routing/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/static_routing/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/static_routing/nxos/__init__.py index 592bc0c2f..ef95f9476 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/static_routing/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/static_routing/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/stp/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/stp/ios/__init__.py index 592bc0c2f..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/stp/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/stp/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/stp/ios/tests/test_spanning_tree.py b/pkgs/ops-pkg/src/genie/libs/ops/stp/ios/tests/test_spanning_tree.py index bf2a9a8b0..db56c4725 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/stp/ios/tests/test_spanning_tree.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/stp/ios/tests/test_spanning_tree.py @@ -29,9 +29,9 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_mst_output(self): self.maxDiff = None @@ -48,10 +48,10 @@ def test_complete_mst_output(self): stp.maker.outputs[ShowErrdisableRecovery] = \ {'': StpMstOutput.ShowErrdisableRecovery} - + stp.maker.outputs[ShowSpanningTree] = \ {'': StpMstOutput.ShowSpanningTree} - + stp.maker.outputs[ShowSpanningTreeMstConfiguration] = \ {'': StpMstOutput.ShowSpanningTreeMstConfiguration} @@ -83,10 +83,10 @@ def test_empty_output(self): stp.maker.outputs[ShowErrdisableRecovery] = \ {'': {}} - + stp.maker.outputs[ShowSpanningTree] = \ {'': {}} - + stp.maker.outputs[ShowSpanningTreeMstConfiguration] = \ {'': {}} @@ -100,7 +100,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + stp = Stp(device=self.device) # Get outputs stp.maker.outputs[ShowSpanningTreeDetail] = \ @@ -114,10 +114,10 @@ def test_incomplete_output(self): stp.maker.outputs[ShowErrdisableRecovery] = \ {'': {}} - + stp.maker.outputs[ShowSpanningTree] = \ {'': StpMstOutput.ShowSpanningTree} - + stp.maker.outputs[ShowSpanningTreeMstConfiguration] = \ {'': StpMstOutput.ShowSpanningTreeMstConfiguration} @@ -127,7 +127,7 @@ def test_incomplete_output(self): # Delete missing specific attribute values expect_dict = deepcopy(StpMstOutput.Stp_info) del(expect_dict['global']['bpduguard_timeout_recovery']) - + # Verify Ops was created successfully self.assertEqual(stp.info, expect_dict) @@ -143,10 +143,10 @@ def test_complete_rpst_output(self): stp.maker.outputs[ShowErrdisableRecovery] = \ {'': StpRpstOutput.ShowErrdisableRecovery} - + stp.maker.outputs[ShowSpanningTree] = \ {'': StpRpstOutput.ShowSpanningTree} - + stp.maker.outputs[ShowSpanningTreeMstConfiguration] = \ {'': {}} diff --git a/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxe/tests/test_spanning_tree.py b/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxe/tests/test_spanning_tree.py index d6c398667..72c5f87f5 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxe/tests/test_spanning_tree.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxe/tests/test_spanning_tree.py @@ -29,9 +29,9 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_complete_mst_output(self): self.maxDiff = None @@ -48,10 +48,10 @@ def test_complete_mst_output(self): stp.maker.outputs[ShowErrdisableRecovery] = \ {'': StpMstOutput.ShowErrdisableRecovery} - + stp.maker.outputs[ShowSpanningTree] = \ {'': StpMstOutput.ShowSpanningTree} - + stp.maker.outputs[ShowSpanningTreeMstConfiguration] = \ {'': StpMstOutput.ShowSpanningTreeMstConfiguration} @@ -83,10 +83,10 @@ def test_empty_output(self): stp.maker.outputs[ShowErrdisableRecovery] = \ {'': {}} - + stp.maker.outputs[ShowSpanningTree] = \ {'': {}} - + stp.maker.outputs[ShowSpanningTreeMstConfiguration] = \ {'': {}} @@ -100,7 +100,7 @@ def test_empty_output(self): def test_incomplete_output(self): self.maxDiff = None - + stp = Stp(device=self.device) # Get outputs stp.maker.outputs[ShowSpanningTreeDetail] = \ @@ -114,10 +114,10 @@ def test_incomplete_output(self): stp.maker.outputs[ShowErrdisableRecovery] = \ {'': {}} - + stp.maker.outputs[ShowSpanningTree] = \ {'': StpMstOutput.ShowSpanningTree} - + stp.maker.outputs[ShowSpanningTreeMstConfiguration] = \ {'': StpMstOutput.ShowSpanningTreeMstConfiguration} @@ -127,7 +127,7 @@ def test_incomplete_output(self): # Delete missing specific attribute values expect_dict = deepcopy(StpMstOutput.Stp_info) del(expect_dict['global']['bpduguard_timeout_recovery']) - + # Verify Ops was created successfully self.assertEqual(stp.info, expect_dict) @@ -143,10 +143,10 @@ def test_complete_rpst_output(self): stp.maker.outputs[ShowErrdisableRecovery] = \ {'': StpRpstOutput.ShowErrdisableRecovery} - + stp.maker.outputs[ShowSpanningTree] = \ {'': StpRpstOutput.ShowSpanningTree} - + stp.maker.outputs[ShowSpanningTreeMstConfiguration] = \ {'': {}} diff --git a/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxr/__init__.py index 592bc0c2f..481045c21 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxr/tests/test_stp.py b/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxr/tests/test_stp.py index 986f4b636..9a0b94597 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxr/tests/test_stp.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/stp/iosxr/tests/test_stp.py @@ -36,10 +36,12 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device - + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper + def test_complete_output(self): stp = Stp(device=self.device) @@ -58,16 +60,15 @@ def test_complete_output(self): stp.maker.outputs[ShowSpanningTreePvsTag] = \ {'': StpOutput.ShowSpanningTreePvsTag} - - self.device.execute = Mock() - self.device.execute.side_effect = mapper + + # Learn the feature stp.learn(mst_domain='test', mstag_domain='risc', pvst_id='a', pvrstag_domain='foo', pvstag_domain='foo') self.maxDiff = None # Verify Ops was created successfully self.assertEqual(stp.info, StpOutput.stpOutput) - + # Check Selected Attributes self.assertEqual(stp.info['mstp']['test']['mst_instances']['0']['vlan'], '1-4094') @@ -98,10 +99,9 @@ def test_empty_output(self): outputs.update({'show spanning-tree pvrst a': ''}) outputs.update({'show spanning-tree pvrstag foo': ''}) outputs.update({'show spanning-tree pvstag foo': ''}) - - self.device.execute = Mock() - self.device.execute.side_effect = mapper - + + + # Learn the feature stp.learn(mst_domain='test', mstag_domain='risc', pvst_id='a', pvrstag_domain='foo', pvstag_domain='foo') @@ -110,18 +110,17 @@ def test_empty_output(self): outputs.update({'show spanning-tree pvrst a': StpOutput.ShowSpanningTreePvrst_output}) outputs.update({'show spanning-tree pvrstag foo': StpOutput.ShowSpanningTreePvrsTag_output}) outputs.update({'show spanning-tree pvstag foo': StpOutput.ShowSpanningTreePvsTag_output}) - + # Check no attribute not found with self.assertRaises(AttributeError): stp.info['mstp']['test']['mst_instances']['0']['vlan'] def test_incomplete_output(self): self.maxDiff = None - + stp = Stp(device=self.device) - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Get outputs stp.maker.outputs[ShowSpanningTreeMst] = \ @@ -141,13 +140,13 @@ def test_incomplete_output(self): # Learn the feature stp.learn(mst_domain='test', mstag_domain='risc', pvst_id='a', pvrstag_domain='foo', pvstag_domain='foo') - + # delete keys from input del(stp.info['mstp']['test']['mst_instances']['0']['mst_id']) - + # Delete missing specific attribute values expect_dict = deepcopy(StpOutput.stpOutput) - del(expect_dict['mstp']['test']['mst_instances']['0']['mst_id']) + del(expect_dict['mstp']['test']['mst_instances']['0']['mst_id']) # Verify Ops was created successfully self.assertEqual(stp.info, expect_dict) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/terminal/tests/iosxr/tests b/pkgs/ops-pkg/src/genie/libs/ops/terminal/tests/iosxr/tests new file mode 120000 index 000000000..9876dd09e --- /dev/null +++ b/pkgs/ops-pkg/src/genie/libs/ops/terminal/tests/iosxr/tests @@ -0,0 +1 @@ +../iosxr/tests \ No newline at end of file diff --git a/pkgs/ops-pkg/src/genie/libs/ops/terminal/tests/nxos/tests b/pkgs/ops-pkg/src/genie/libs/ops/terminal/tests/nxos/tests new file mode 120000 index 000000000..941ebb729 --- /dev/null +++ b/pkgs/ops-pkg/src/genie/libs/ops/terminal/tests/nxos/tests @@ -0,0 +1 @@ +../nxos/tests \ No newline at end of file diff --git a/pkgs/ops-pkg/src/genie/libs/ops/tests/test_threading.py b/pkgs/ops-pkg/src/genie/libs/ops/tests/test_threading.py index ca3c26654..df76fe60b 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/tests/test_threading.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/tests/test_threading.py @@ -203,6 +203,7 @@ def test_threaded_learn(self): 'os': 'IOS-XE', 'version': '17.14.20230827:110032', 'image': 'bootflash:c8kv.bin', + 'label': 'BLD_POLARIS_DEV_LATEST_20230827_101613', 'config_register': '0x2102', 'main_mem': '2251787' }, diff --git a/pkgs/ops-pkg/src/genie/libs/ops/vlan/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/vlan/ios/__init__.py index 592bc0c2f..1c4324a07 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/vlan/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/vlan/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/vlan/ios/tests/test_vlan.py b/pkgs/ops-pkg/src/genie/libs/ops/vlan/ios/tests/test_vlan.py index 4088c833c..c31f25a5d 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/vlan/ios/tests/test_vlan.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/vlan/ios/tests/test_vlan.py @@ -28,13 +28,14 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_full_vlan_new(self): f = Vlan(device=self.device) # Get 'show vlan' output f.maker.outputs[ShowVlan] = {'': VlanOutput.showVlan} - self.device.execute = Mock() # Learn the feature f.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxe/tests/test_vlan.py b/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxe/tests/test_vlan.py index fb783e6e4..203e3e9ee 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxe/tests/test_vlan.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxe/tests/test_vlan.py @@ -28,13 +28,14 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping={} self.device.mapping['cli']='cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection def test_full_vlan_new(self): f = Vlan(device=self.device) # Get 'show vlan' output f.maker.outputs[ShowVlan] = {'': VlanOutput.showVlan} - self.device.execute = Mock() # Learn the feature f.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxr/__init__.py index 592bc0c2f..481045c21 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/vlan/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/vlan/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/vlan/nxos/__init__.py index 592bc0c2f..ef95f9476 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/vlan/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/vlan/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/vrf/ios/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/vrf/ios/__init__.py index 592bc0c2f..1c4324a07 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/vrf/ios/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/vrf/ios/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='ios') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/vrf/ios/tests/test_vrf.py b/pkgs/ops-pkg/src/genie/libs/ops/vrf/ios/tests/test_vrf.py index 921f92db9..cad47a0e7 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/vrf/ios/tests/test_vrf.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/vrf/ios/tests/test_vrf.py @@ -4,7 +4,8 @@ from unittest.mock import Mock # ATS -from pyats.topology import Device +# from pyats.topology import Device +from genie.conf.base import Device # Genie from genie.libs.ops.vrf.ios.vrf import Vrf @@ -29,17 +30,18 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping = {} self.device.mapping['cli'] = 'cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper + def test_complete_output(self): vrf = Vrf(device=self.device) # Set outputs vrf.maker.outputs[ShowVrfDetail] = {'': VrfOutput.ShowVrfDetail} # Learn the feature - self.device.execute = Mock() - self.device.execute.side_effect = mapper vrf.learn() self.maxDiff = None @@ -49,9 +51,6 @@ def test_complete_output(self): def test_custom_vrf_output(self): vrf = Vrf(device=self.device) vrf.maker.outputs[ShowVrfDetail] = {'': VrfOutput.ShowVrfDetailCustom} - # Set outputs - self.device.execute = Mock() - self.device.execute.side_effect = mapper # Learn the feature vrf.learn(vrf='VRF2') self.maxDiff = None @@ -64,8 +63,6 @@ def test_selective_attribute(self): # Set outputs vrf.maker.outputs[ShowVrfDetail] = {'': VrfOutput.ShowVrfDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper # Learn the feature vrf.learn() @@ -80,8 +77,6 @@ def test_empty_output(self): vrf.maker.outputs[ShowVrfDetail] = {'': {}} outputs['show vrf detail VRF2'] = '' outputs['show vrf detail'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper # Learn the feature vrf.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxe/tests/test_vrf.py b/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxe/tests/test_vrf.py index 01d858490..1f1907654 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxe/tests/test_vrf.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxe/tests/test_vrf.py @@ -30,9 +30,11 @@ def setUp(self): self.device.custom['abstraction'] = {'order':['os']} self.device.mapping = {} self.device.mapping['cli'] = 'cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): vrf = Vrf(device=self.device) @@ -40,8 +42,7 @@ def test_complete_output(self): # Set outputs vrf.maker.outputs[ShowVrfDetail] = {'': VrfOutput.ShowVrfDetail} # Learn the feature - self.device.execute = Mock() - self.device.execute.side_effect = mapper + vrf.learn() self.maxDiff = None @@ -52,8 +53,7 @@ def test_custom_vrf_output(self): vrf = Vrf(device=self.device) vrf.maker.outputs[ShowVrfDetail] = {'': VrfOutput.ShowVrfDetailCustom} # Set outputs - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature vrf.learn(vrf='VRF2') self.maxDiff = None @@ -65,8 +65,7 @@ def test_custom_vrf_output1(self): vrf = Vrf(device=self.device) vrf.maker.outputs[ShowVrfDetail] = {'': VrfOutput.ShowVrfDetailCustom1} # Set outputs - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature vrf.learn(vrf='Mgmt-vrf') self.maxDiff = None @@ -79,8 +78,7 @@ def test_selective_attribute(self): # Set outputs vrf.maker.outputs[ShowVrfDetail] = {'': VrfOutput.ShowVrfDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature vrf.learn() @@ -95,8 +93,7 @@ def test_empty_output(self): vrf.maker.outputs[ShowVrfDetail] = {'': {}} outputs['show vrf detail VRF2'] = '' outputs['show vrf detail'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature vrf.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxr/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxr/__init__.py index 592bc0c2f..481045c21 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxr/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxr/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxr') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxr/tests/test_vrf.py b/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxr/tests/test_vrf.py index 917a309c1..704457086 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxr/tests/test_vrf.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/vrf/iosxr/tests/test_vrf.py @@ -27,15 +27,18 @@ def setUp(self): self.device.os = 'iosxr' self.device.mapping={} self.device.mapping['cli']='cli' - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): vrf = Vrf(device=self.device) # Learn the feature vrf.maker.outputs[ShowVrfAllDetail] = {'': VrfOutput.ShowVrfAllDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + vrf.learn() self.maxDiff = None @@ -47,8 +50,7 @@ def test_custom_output(self): vrf = Vrf(device=self.device) vrf.maker.outputs[ShowVrfAllDetail] = {'': VrfOutput.ShowVrfAllDetailCustom} # Set outputs - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature vrf.learn(vrf='VRF2') self.maxDiff = None @@ -61,8 +63,7 @@ def test_selective_attribute(self): # Set outputs vrf.maker.outputs[ShowVrfAllDetail] = {'': VrfOutput.ShowVrfAllDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature vrf.learn() @@ -77,8 +78,7 @@ def test_empty_output(self): vrf.maker.outputs[ShowVrfAllDetail] = {'': {}} outputs['show vrf VRF2 detail'] = '' outputs['show vrf all detail'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature vrf.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/vrf/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/vrf/nxos/__init__.py index 592bc0c2f..ef95f9476 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/vrf/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/vrf/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/vrf/nxos/tests/test_vrf.py b/pkgs/ops-pkg/src/genie/libs/ops/vrf/nxos/tests/test_vrf.py index 6804aed6c..70d1445ec 100644 --- a/pkgs/ops-pkg/src/genie/libs/ops/vrf/nxos/tests/test_vrf.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/vrf/nxos/tests/test_vrf.py @@ -28,9 +28,11 @@ def setUp(self): self.device.os = 'nxos' self.device.mapping={} self.device.mapping['cli']='cli' - # Give the device as a connection type - # This is done in order to call the parser on the output provided - self.device.connectionmgr.connections['cli'] = self.device + # Create a mock connection to get output for parsing + self.device_connection = Mock(device=self.device) + self.device.connectionmgr.connections['cli'] = self.device_connection + # Set outputs + self.device_connection.execute.side_effect = mapper def test_complete_output(self): @@ -38,8 +40,7 @@ def test_complete_output(self): # Set outputs vrf.maker.outputs[ShowVrfDetail] = {'': VrfOutput.ShowVrfDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature vrf.learn() @@ -50,8 +51,7 @@ def test_custom_output(self): vrf = Vrf(device=self.device) vrf.maker.outputs[ShowVrfDetail] = {'': VrfOutput.ShowVrfDetailCustom} # Set outputs - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature vrf.learn(vrf='default') self.maxDiff = None @@ -66,8 +66,7 @@ def test_selective_attribute(self): # Set outputs vrf.maker.outputs[ShowVrfDetail] = {'': VrfOutput.ShowVrfDetail} - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature vrf.learn() @@ -81,8 +80,7 @@ def test_empty_output(self): vrf.maker.outputs[ShowVrfDetail] = {'': {}} outputs['show vrf default detail'] = '' outputs['show vrf all detail'] = '' - self.device.execute = Mock() - self.device.execute.side_effect = mapper + # Learn the feature vrf.learn() diff --git a/pkgs/ops-pkg/src/genie/libs/ops/vxlan/iosxe/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/vxlan/iosxe/__init__.py index 592bc0c2f..3d16b9c3f 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/vxlan/iosxe/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/vxlan/iosxe/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='iosxe') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/ops-pkg/src/genie/libs/ops/vxlan/nxos/__init__.py b/pkgs/ops-pkg/src/genie/libs/ops/vxlan/nxos/__init__.py index 592bc0c2f..ef95f9476 100755 --- a/pkgs/ops-pkg/src/genie/libs/ops/vxlan/nxos/__init__.py +++ b/pkgs/ops-pkg/src/genie/libs/ops/vxlan/nxos/__init__.py @@ -1,6 +1,6 @@ try: from genie import abstract - abstract.declare_token(__name__) + abstract.declare_token(os='nxos') except Exception as e: import warnings warnings.warn('Could not declare abstraction token: ' + str(e)) diff --git a/pkgs/sdk-pkg/src/genie/libs/sdk/apis/tests/iosxe/c960/configure/configure_mac_address_table_notification_change/__init__.py b/pkgs/robot-pkg/changelog/2024/april.rst similarity index 100% rename from pkgs/sdk-pkg/src/genie/libs/sdk/apis/tests/iosxe/c960/configure/configure_mac_address_table_notification_change/__init__.py rename to pkgs/robot-pkg/changelog/2024/april.rst diff --git a/pkgs/robot-pkg/src/genie/libs/robot/GenieRobotApis.py b/pkgs/robot-pkg/src/genie/libs/robot/GenieRobotApis.py index 67cccc63b..cedb2bdb8 100644 --- a/pkgs/robot-pkg/src/genie/libs/robot/GenieRobotApis.py +++ b/pkgs/robot-pkg/src/genie/libs/robot/GenieRobotApis.py @@ -16,14 +16,14 @@ def __init__(self): self.api = API() def get_keyword_names(self): - return self.api.function_data.keys() + return list(self.api.function_data) def get_keyword_documentation(self, kw): if kw == '__intro__': return "Available networking APIs provided by Genie" return ''.join(['''Checkout this url for detailed doc on this keyword: - + ''', DOC_LINK, kw]) def run_keyword(self, name, args, kwargs): diff --git a/pkgs/robot-pkg/src/genie/libs/robot/__init__.py b/pkgs/robot-pkg/src/genie/libs/robot/__init__.py index dd039f3e6..0bf0831b1 100644 --- a/pkgs/robot-pkg/src/genie/libs/robot/__init__.py +++ b/pkgs/robot-pkg/src/genie/libs/robot/__init__.py @@ -8,11 +8,11 @@ ''' # metadata -__version__ = '24.3' +__version__ = '24.4' __author__ = 'Cisco Systems Inc.' __contact__ = ['pyats-support@cisco.com', 'pyats-support-ext@cisco.com'] __copyright__ = 'Copyright (c) 2018, Cisco Systems Inc.' from genie import abstract -abstract.declare_package(__name__) +abstract.declare_package(feature="robot") diff --git a/pkgs/sdk-pkg/api_generator/output/github_apis.json b/pkgs/sdk-pkg/api_generator/output/github_apis.json new file mode 100644 index 000000000..6cb4121f1 --- /dev/null +++ b/pkgs/sdk-pkg/api_generator/output/github_apis.json @@ -0,0 +1,30423 @@ +{ + "add_device_to_testbed_yaml_file": { + "folders": { + "nxos": { + "doc": " Add device details to the devices yaml file\n\n Args:\n device_name ('str'): Name of the device to be added as a string\n device_ip ('str'): IP address of the device to be added as a string\n yaml_file ('str'): Name(path) of the yaml file where the device\n is to be added as a string\n Return value:\n None\n\n ", + "module_name": "nxos.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "nxos" + }, + "uid": "add_device_to_testbed_yaml_file", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/nxos/utils.py#L281" + } + } + }, + "analyze_core_by_bingopy": { + "folders": { + "nxos": { + "doc": " analyze core by BingoPy\n # CISCO INTERNAL\n\n Args:\n device (`obj`): Device object\n clear_cores (`bool`): To clear cores before generating core. Default to True\n service (`str`): service to generate core\n remote_server (`str`): remote server name in testbed yaml\n remote_user (`str`, optional): userid on remote server\n remote_pass (`str`, optional): password of userid on remote server\n remote_location (`str`): Location of saving core file\n remote_via: (`str`, optional): specify connection to get ip\n if not specified, use active connection one\n vrf (`str`): VRF for copying file to remote server\n Defaults to management\n private_image_tree (`str`, optional): Tree location for private image\n private_image_process_path (`str`, optional): Process path for private image\n sleep (`int`, optional): sleep for shell command. Defaults to 10 seconds\n clear_cores (`Bool`, optional): clear cores if TRUE. Defaults to True\n max_time (`int`, optional): Maximum time to wait. \n Defaults to 360 seconds\n check_interval (`int`, optional): Time interval while checking.\n Defaults to 10 seconds\n bloggered (`bool`, optional): if use bloggered command\n if False, use kill -6 command instead\n Defaults to True\n source_location (`str`, optional): source file location for BingoPy\n Defaults to /auto/andatc/independent/shellrc-files/current/rc/.bashrc.build\n bingopy_location (`str`, optional): bingopy location\n Defaults to /ws/xianqin-sjc/bingo/blogger_core.pl\n\n Returns:\n out (`str`): Output of BingoPy\n ", + "module_name": "nxos.bingopy.bingopy", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "nxos" + }, + "uid": "analyze_core_by_bingopy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/nxos/bingopy/bingopy.py#L16" + } + } + }, + "analyze_core_by_ucd": { + "folders": { + "linux": { + "doc": " analyze core by UCD\n # CISCO INTERNAL\n\n Args:\n device (`obj`): Device object\n core_file (`str`): core file name with path to analyze by UCD\n gdb_command (`str`, optional): gdb command in GDB\n Defaults to `bt full`\n ucd_command (`str`, optional): ucd command with path and options\n Defaults to `/ws/cvanka-sjc/ucd/ucd -c`\n timeout (`int`, optional): timeout to expire for device.receive()\n Defaults to 300 seconds\n\n Returns:\n out (`str`): Output of UCD\n ", + "module_name": "linux.ucd.ucd", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "linux" + }, + "uid": "analyze_core_by_ucd", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/linux/ucd/ucd.py#L9" + } + } + }, + "analyze_rate": { + "doc": " Get the traffic rate and the corresponding unit\n\n Args:\n rate (`str`): Passed rate as a string\n\n Returns:\n rate (`int`): Traffic rate\n rate_unit (`str`): Traffic rate unit\n original_rate (`str`): Original Traffic rate\n ", + "folders": {}, + "module_name": "utils", + "package": "genie.libs.sdk.apis", + "uid": "analyze_rate", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/utils.py#L581" + }, + "analyze_udp_in_mpls_packets": { + "folders": { + "iosxe": { + "doc": " Analyze passed packets\n\n Args:\n packets('str'): Packets to analyze\n ip_address ('str'): Destination IP address\n ttl (`int`): Time to live\n packet_count (`int`): Packet count to check during\n packet analysis\n destination_port (`int`): Destination port start \"traceroute\"\n Returns:\n pkt count\n Raises:\n None \n ", + "module_name": "iosxe.udp.get", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "analyze_udp_in_mpls_packets", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/udp/get.py#L10" + } + } + }, + "apic_rest_delete": { + "folders": { + "apic": { + "doc": "DELETE REST Command to delete information from the device\n\n Args:\n dn (`string`): Unique distinguished name that describes the object\n and its place in the tree.\n connection_alias (`str`): Connection alias\n expected_status_code (`int`): Expected result\n timeout (`int`): Maximum time\n\n Returns:\n Output from REST API\n\n Raise:\n None\n ", + "module_name": "apic.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "apic" + }, + "uid": "apic_rest_delete", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/apic/utils.py#L144" + } + } + }, + "apic_rest_get": { + "folders": { + "apic": { + "doc": "GET REST Command to retrieve information from the device\n\n Args:\n device (`obj`): Device object\n dn (`string`): Unique distinguished name that describes the object\n and its place in the tree.\n connection_alias (`str`): Connection alias\n query_target {self|children|subtree}:\n 'self': (default) MO itself\n 'children': just the MO's child objects\n 'subtree': MO and its child objects\n rsp_subtree {no|children|full}: Specifies child object level\n included in the response\n 'no': (default) the response\n does not include any children\n 'children': return only the child\n objects\n 'full': includes the full tree\n structure\n rsp_prop_include {all|naming-only|config-only}:\n 'all': all properties of the objects\n 'naming-only': only the naming properties\n 'config-only': only configurable properties\n rsp_subtree_include (`string`): specify additional contained objects\n or options to be included\n rsp_subtree_class (`string`) : specify classes\n target_subtree_class (string): specify subtree classes\n query_target_filter (`string`): filter expression\n order_by (`string`): sort the query response by one or\n more properties of a class\n expected_status_code (`int`): Expected result\n\n Returns:\n Output from REST API\n\n Raise:\n None\n ", + "module_name": "apic.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "apic" + }, + "uid": "apic_rest_get", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/apic/utils.py#L15" + } + } + }, + "apic_rest_post": { + "folders": { + "apic": { + "doc": "POST REST Command to configure information from the device\n\n Args:\n device (`obj`): Device object\n dn (`string`): Unique distinguished name that describes the object\n and its place in the tree.\n payload (`dict`): Dictionary containing the information to send via\n the post\n xml_payload (bool): Set to True if payload is in XML format\n connection_alias (`str`): Connection alias\n expected_status_code (`int`): Expected result\n timeout (`int`): Maximum time\n\n Returns:\n Output from REST API\n\n Raise:\n None\n ", + "module_name": "apic.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "apic" + }, + "uid": "apic_rest_post", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/apic/utils.py#L95" + } + } + }, + "arithmetic_operations": { + "doc": "\n Perform arithmetic operations on operands.\n\n Args:\n operation (`str`): string indicating the calculation method.\n 'addition' is '+'\n 'subtraction' is '-'\n 'multiplication' is '*'\n 'division' is '/'\n operands (`list`): operands to be calculated.\n example: [1, 2]\n\n Returns:\n Numerical : Calculation result\n None : When an abnormality occurs during calculation\n Raises:\n N/A\n ", + "folders": {}, + "module_name": "utils", + "package": "genie.libs.sdk.apis", + "uid": "arithmetic_operations", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/utils.py#L3732" + }, + "assign_default_ipv4_sgacl": { + "folders": { + "iosxe": { + "doc": " Assign a default static SGACL(ipv4)\n Args:\n device ('obj'): device to use\n sgacl ('str'): Role-based Access-list name\n Returns:\n None\n Raises:\n SubCommandFailure: Failed to assign default static SGACL(ipv4)\n ", + "module_name": "iosxe.cts.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "assign_default_ipv4_sgacl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/cts/configure.py#L175" + } + } + }, + "assign_static_ipv4_sgacl": { + "folders": { + "iosxe": { + "doc": " Assign static SGACL(Ipv4)\n Args:\n device ('obj'): device to use\n src_sgt (`str`): Source Group Tag\n dest_sgt (`str`): Destination Group Tag\n sgacl ('str'): Role-based Access-list name\n Returns:\n None\n Raises:\n SubCommandFailure: Failed to assign static SGACL(IPv4)\n ", + "module_name": "iosxe.cts.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "assign_static_ipv4_sgacl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/cts/configure.py#L152" + } + } + }, + "attach_device_tracking_policy_to_interface": { + "folders": { + "iosxe": { + "doc": " Attach Device Tracking Policy to a interface\n\n Args:\n device (`obj`): Device object\n policy_name (`str`): Policy name to be attached to interface\n interface (`str`): interface to attach policy\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "attach_device_tracking_policy_to_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L2374" + } + } + }, + "attach_dhcpv6_guard_policy_to_interface": { + "folders": { + "iosxe": { + "doc": " Attach DHCPv6 Guard Policy to an interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface to attach policy\n policy_name (`str`): Policy name to be attached to interface\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "attach_dhcpv6_guard_policy_to_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L1987" + } + } + }, + "attach_dhcpv6_guard_policy_to_vlan": { + "folders": { + "iosxe": { + "doc": " Attach DHCPv6 Guard Policy to a vlan\n\n Args:\n device (`obj`): Device object\n vlan (`str`): vlan to attach policy\n policy_name (`str`): Policy name to be attached to interface\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "attach_dhcpv6_guard_policy_to_vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L2306" + } + } + }, + "attach_ipv6_dhcp_guard_policy": { + "folders": { + "iosxe": { + "doc": " Attaches the given ipv6 dhcp guard policy to an interface or vlan(s)\n Args:\n device ('obj'): device to use\n policy_name ('str'): name of the policy to be attached\n interface (str): interface to attach policy to\n vlan (str): vlan or vlan range to attach the policy to. e.g: 1-10,15\n Returns:\n None\n Raises:\n SubCommandFailure: Failed to attach ipv6 dhcp guard policy {policy_name}\n ", + "module_name": "iosxe.sisf.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "attach_ipv6_dhcp_guard_policy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/sisf/configure.py#L356" + } + } + }, + "attach_ipv6_nd_suppress_policy": { + "folders": { + "iosxe": { + "doc": " Attaches the given ipv6 nd suppress policy to an interface or vlan(s)\n Args:\n device ('obj'): device to use\n policy_name ('str'): name of the policy to be attached\n interface (str): interface to attach policy to\n vlan (str): vlan or vlan range to attach the policy to. e.g: 1-10,15\n Returns:\n None\n Raises:\n SubCommandFailure: Failed to attach ipv6 nd suppress policy {policy_name}\n ", + "module_name": "iosxe.sisf.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "attach_ipv6_nd_suppress_policy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/sisf/configure.py#L428" + } + } + }, + "attach_ipv6_raguard_policy_to_interface": { + "folders": { + "iosxe": { + "doc": " Attach IPv6 RA Guard Policy to an interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface to attach policy\n policy_name (`str`): Policy name to be attached to interface\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "attach_ipv6_raguard_policy_to_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L1849" + } + } + }, + "attach_ipv6_raguard_policy_to_vlan": { + "folders": { + "iosxe": { + "doc": " Attach IPv6 RA Guard Policy to a vlan\n\n Args:\n device (`obj`): Device object\n vlan (`str`): vlan to attach policy\n policy_name (`str`): Policy name to be attached to interface\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "attach_ipv6_raguard_policy_to_vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L2123" + } + } + }, + "authentication_convert_to_new_style": { + "folders": { + "iosxe": { + "doc": "Common function to configure authentication convert-to new-style for both forced and without forced\n \n Args:\n device ('obj'): device to use\n force (`str`): Cli input to continue (default value is None)\n \n Returns:\n None\n \n Raises:\n SubCommandFailure: Failed to configure authentication convert-to new-style\n ", + "module_name": "iosxe.authentication.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "authentication_convert_to_new_style", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/authentication/configure.py#L13" + } + } + }, + "bits_to_netmask": { + "doc": " Convert bits to netmask\n Args:\n bits ('int'): bits to converts\n ex.) bits = 32\n Raise:\n None\n Returns:\n Net mask\n ", + "folders": {}, + "module_name": "utils", + "package": "genie.libs.sdk.apis", + "uid": "bits_to_netmask", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/utils.py#L827" + }, + "cdets_lookup": { + "folders": { + "linux": { + "doc": " Function to return matching cdets given a corefile\n Note: The corefile should already be decoded as this function searches\n for the entry within the decoder archived database ", + "module_name": "linux.decoder.execute", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "linux" + }, + "uid": "cdets_lookup", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/linux/decoder/execute.py#L29" + } + } + }, + "change_configuration_using_jinja_templates": { + "doc": "Use Jinja templates to change the device configuration\n\n Args:\n device (`obj`): Device object\n template (`obj`): Jinja template to be used in configuration\n parameters (`dict`): Dictionary of all the parameters\n to be passed to the Jinja template\n\n Returns:\n None\n Raises:\n SubCommandFailure: Failed configuring device\n ", + "folders": {}, + "module_name": "jinja.configure", + "package": "genie.libs.sdk.apis", + "uid": "change_configuration_using_jinja_templates", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/jinja/configure.py#L11" + }, + "change_hostname": { + "folders": { + "ios": { + "doc": " Change the hostname on device\n\n Args:\n device('obj'): device to change hostname on\n name('str'): name to change hostname to\n\n Returns:\n N/A\n ", + "module_name": "ios.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "ios" + }, + "uid": "change_hostname", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/ios/utils.py#L278" + }, + "iosxe": { + "doc": " Change the hostname on device\n\n Args:\n device('obj'): device to change hostname on\n name('str'): name to change hostname to\n\n Returns:\n N/A\n ", + "module_name": "iosxe.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "change_hostname", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/utils.py#L284" + } + } + }, + "change_power_cycler_state": { + "doc": " Turn on the power cycler\n Args:\n device ('obj'): Device object\n powercycler ('obj'): Powercycler object\n state ('str'): Power cycler state on/off\n outlets ('str'): Power cycler outlets\n Returns:\n None\n ", + "folders": {}, + "module_name": "execute", + "package": "genie.libs.sdk.apis", + "uid": "change_power_cycler_state", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/execute.py#L149" + }, + "check_if_device_in_testbed_yaml": { + "folders": { + "nxos": { + "doc": " Check if the given device name is part of the devices yaml file\n\n Args:\n device_name ('str'): Name of the device to be found as a string\n yaml_file ('str'): Name(path) of the yaml file where the device\n is to be found as a string\n Return value:\n Boolean. True, if found. False, if error/not found\n\n ", + "module_name": "nxos.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "nxos" + }, + "uid": "check_if_device_in_testbed_yaml", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/nxos/utils.py#L259" + } + } + }, + "check_traffic_drop_count": { + "folders": { + "iosxe": { + "doc": "Check for the drop count\n\n Args:\n testbed (`obj`): Testbed object\n traffic_stream (`str`): Traffic stream name\n drop_count (`str`): Expected drop count\n\n Returns:\n None\n Raises:\n KeyError: Could not find device on testbed\n Exception: Traffic drops found\n ", + "module_name": "iosxe.traffic.checks", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "check_traffic_drop_count", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/traffic/checks.py#L337" + } + } + }, + "check_traffic_expected_rate": { + "folders": { + "iosxe": { + "doc": "Check the expected rate\n\n Args:\n testbed (`obj`): Testbed object\n traffic_stream (`str`): Traffic stream name\n expected_rate (`str`): Traffic expected received rate\n tolerance (`str`): Traffic loss tolerance percentage\n traffic_gen (`str`): Traffic generating device\n\n Returns:\n None\n Raises:\n KeyError: Could not find device on testbed\n Exception: Traffic drops found\n ", + "module_name": "iosxe.traffic.checks", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "check_traffic_expected_rate", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/traffic/checks.py#L150" + } + } + }, + "check_traffic_transmitted_rate": { + "folders": { + "iosxe": { + "doc": "Check transmitted rate was set correctly or not\n\n Args:\n testbed (`obj`): Testbed object\n traffic_stream (`str`): Traffic stream name\n set_rate (`int`): Traffic set rate\n tolerance (`int`): Traffic tolerance\n max_time (`int`): Retry maximum time\n check_interval (`int`): Interval in seconds to do recheck\n\n Returns:\n None\n Raises:\n KeyError: Could not find device on testbed\n Exception: Traffic drops found\n ", + "module_name": "iosxe.traffic.checks", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "check_traffic_transmitted_rate", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/traffic/checks.py#L60" + } + } + }, + "clear_aaa_cache": { + "folders": { + "iosxe": { + "doc": " Clear AAA Cache\n Args:\n device (`obj`): Device object\n server_grp (`str`): Radius Server Grp name\n profile ('str',optional): Profile name to clear. Default 'all.'\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring\n Examples:\n switch1.api.clear_aaa_cache('radiusGroup')\n ", + "module_name": "iosxe.aaa.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_aaa_cache", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/aaa/configure.py#L683" + } + } + }, + "clear_access_list_counters": { + "folders": { + "iosxe": { + "doc": " clear access-list counters\n Args:\n device (`obj`): Device object\n option ('str', Optional): Which data to clear. Default will clear all access-list counters or \n can give access-list name(eg:input_packet) or number(eg:100)\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.acl.clear", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_access_list_counters", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/acl/clear.py#L12" + } + } + }, + "clear_access_session": { + "folders": { + "iosxe": { + "doc": " executes clear access-sesssion CLI \n Args:\n device ('obj'): device to use\n Returns:\n None\n Raises:\n SubCommandFailure: Failed to execute clear access-sesssion.\n ", + "module_name": "iosxe.dot1x.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_access_session", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/dot1x/configure.py#L285" + } + } + }, + "clear_access_session_intf": { + "folders": { + "iosxe": { + "doc": " clear access-session interface {}\n Args:\n device (`obj`): Device object\n intf('str'): Name of the interface to clear access-session\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.dot1x.clear", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_access_session_intf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/dot1x/clear.py#L12" + } + } + }, + "clear_arp_cache": { + "folders": { + "iosxe": { + "doc": " Clears device cache\n\n Args:\n device (`obj`): Device object\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.arp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_arp_cache", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/arp/configure.py#L49" + } + } + }, + "clear_bgp_neighbor": { + "folders": { + "junos": { + "doc": " Clear bgp neighbor using one of two commands\n Args:\n device ('obj'): Device object\n command ('str'): Command with a higher priority\n alternative_command ('str'): An alternative command that would be executed if the given command creates an error\n fail_regex ('str'): A regex string to look for which would indicate failure\n\n Returns:\n bool\n\n Raises:\n N/A or SubcommandFailure\n ", + "module_name": "junos.bgp.clear", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "junos" + }, + "uid": "clear_bgp_neighbor", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/junos/bgp/clear.py#L3" + } + } + }, + "clear_bgp_neighbor_soft": { + "folders": { + "junos": { + "doc": " Clear bgp neighbor soft using one of two commands\n Args:\n device ('obj'): Device object\n command ('str'): Command with a higher priority\n alternative_command ('str'): An alternative command that would be executed if the given command creates an error\n fail_regex ('str'): A regex string to look for which would indicate failure\n\n Returns:\n bool\n\n Raises:\n N/A or SubcommandFailure\n ", + "module_name": "junos.bgp.clear", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "junos" + }, + "uid": "clear_bgp_neighbor_soft", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/junos/bgp/clear.py#L29" + } + } + }, + "clear_bgp_neighbors_soft": { + "folders": { + "iosxe": { + "doc": " Reset connection to a BGP neighbor or to all neighbors, diretion in or out\n Args:\n device ('obj') : Device object\n direction ('str'): Direction type:\n ex.)\n direction = \"in\"\n direction = \"out\"\n neighbor (`str`): Neighbor address\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing command\n ", + "module_name": "iosxe.bgp.clear", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_bgp_neighbors_soft", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/clear.py#L39" + } + } + }, + "clear_counters": { + "folders": { + "iosxe": { + "doc": " clear logging\n Args:\n device ('obj'): Device object\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_counters", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/utils.py#L725" + } + } + }, + "clear_crypto_sa_counters": { + "folders": { + "iosxe": { + "doc": " Clear all the ipsec sa counters\n Args:\n device (`obj`): Device object\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.ipsec.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_crypto_sa_counters", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/ipsec/configure.py#L13" + } + } + }, + "clear_crypto_session": { + "folders": { + "iosxe": { + "doc": " Clear all crypto session\n Args:\n device (`obj`): Device object\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.ike.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_crypto_session", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/ike/configure.py#L995" + } + } + }, + "clear_cts_counters": { + "folders": { + "iosxe": { + "doc": " Clear CTS credentials\n Args:\n device ('obj'): device to use\n Returns:\n None\n Raises:\n SubCommandFailure: Failed to clear cts counters\n ", + "module_name": "iosxe.cts.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_cts_counters", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/cts/configure.py#L428" + } + } + }, + "clear_cts_credentials": { + "folders": { + "iosxe": { + "doc": " clear CTS credentials\n Args:\n device ('obj'): device to use\n Returns:\n None\n Raises:\n SubCommandFailure: Failed to clear cts credential\n ", + "module_name": "iosxe.cts.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_cts_credentials", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/cts/configure.py#L406" + } + } + }, + "clear_device_tracking_counters": { + "folders": { + "iosxe": { + "doc": " Clear device-tracking counters\n Args:\n device ('obj'): device object\n interface ('str', optional): interface name. Defaults to None\n vlan ('str', optional): vlan id. Defaults to None.\n bdi ('str', optional): bdi id. Defaults to None.\n Returns:\n None\n Raises:\n SubCommandFailure: Failed to clear device-tracking counters\n ", + "module_name": "iosxe.sisf.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_device_tracking_counters", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/sisf/configure.py#L2182" + } + } + }, + "clear_device_tracking_database": { + "folders": { + "iosxe": { + "doc": " Clear device-tracking database\n Args:\n device ('obj'): device object\n options ('list'): list of policy configuration options to be removed or reset:\n dictionary contains following keys:\n address ('dict', optional):\n address ('str'): IPv4 address or \"all\"\n target ('dict', optional):\n force ('bool', optional): Force to clear all (mac) entries\n interface ('str', optional): interface\n policy ('str', optional): policy name\n vlanid ('str', optional): vlanid\n force ('bool', optional): Force to clear all (mac) entries\n interface ('str', optional):\n target ('str'): interface\n force ('bool', optional): Force to clear all (mac) entries\n vlanid ('str', optional): vlanid\n mac ('str', optional):\n address ('str'): 48-bit hardware address\n target ('dict', optional):\n force ('bool', optional): Force to clear all (mac) entries\n interface ('str', optional): interface\n policy ('str', optional): policy name\n vlanid ('str', optional): vlanid\n policy ('str', optional): policy name\n prefix ('bool', optional)\n address ('str'): IPv6 address (X:X:X:X::X/<0-128>) or \"all\"\n target ('dict', optional):\n force ('bool', optional): Force to clear all (mac) entries\n interface ('str', optional): interface\n policy ('str', optional): policy name\n vlanid ('str', optional): vlanid\n vlanid ('str', optional): vlan id\n ex.)\n [\n {\n \"force\": True,\n \"mac\": {\n \"address\": \"dead.beef.0001\"\n \"target\":\n \"force\": True\n \"interface\": \"gigabitEthernet0/0\"\n \"policy\": \"test\"\n \"vlanid\": 10\n }\n }\n ]\n Returns:\n None\n Raises:\n SubCommandFailure: Failed to remove ipv6 source-guard policy configurations\n ", + "module_name": "iosxe.sisf.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_device_tracking_database", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/sisf/configure.py#L2080" + } + } + }, + "clear_device_tracking_messages": { + "folders": { + "iosxe": { + "doc": " Clear device-tracking database\n Args:\n device ('obj'): device object\n Returns:\n None\n Raises:\n SubCommandFailure: Failed to execute clear device-tracking messages\n ", + "module_name": "iosxe.sisf.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_device_tracking_messages", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/sisf/configure.py#L2066" + } + } + }, + "clear_dhcpv4_server_stats": { + "folders": { + "iosxe": { + "doc": "Clear dhcp server statistics on device\n Args:\n device('obj'): device object\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.dhcp.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_dhcpv4_server_stats", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/dhcp/utils.py#L11" + } + } + }, + "clear_dmvpn": { + "folders": { + "iosxe": { + "doc": " clear_dmvpn\n Args:\n device (`obj`): Device object\n peer('str', optional): DMVPN peer, default is None\n static('boolean', optional): static dmvpn entries, default is False\n vrf('str', optional) : vrf name, default is None\n timeout('int', optional): timeout for exec command execution, default is 30\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.nhrp.clear", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_dmvpn", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/nhrp/clear.py#L55" + } + } + }, + "clear_dmvpn_statistics": { + "folders": { + "iosxe": { + "doc": " clear_dmvpn_statistics\n Args:\n device (`obj`): Device object\n interface('str', optional): Tunnel interface name, default is None\n vrf('str', optional) : vrf name, default is None\n timeout('int', optional): timeout for exec command execution, default is 30\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.nhrp.clear", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_dmvpn_statistics", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/nhrp/clear.py#L94" + } + } + }, + "clear_errdisable_intf_vlan": { + "folders": { + "iosxe": { + "doc": " clear errdisable interface {} vlan\n Args:\n device (`obj`): Device object\n intf('str'): Name of the interface to clear errdisable\n Vlan('str', optional): Name of the vlan to to clear errdisable, default value is None\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.vlan.clear", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_errdisable_intf_vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/vlan/clear.py#L11" + } + } + }, + "clear_flow_monitor": { + "folders": { + "iosxe": { + "doc": " clear flow monitor data\n Args:\n device (`obj`): Device object\n name ('str'): Name of the flow (eg: created[ipv4_input] or user defined[monitor_ipv4_out])\n option ('str', optional): Which data to clear. Default will clear all flow monitor info or\n can give perticular option to clear eg:cache/statistics\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.flow.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_flow_monitor", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/flow/configure.py#L248" + } + } + }, + "clear_flow_monitor_statistics": { + "folders": { + "iosxe": { + "doc": " Clears Flow Monitor statistics on device\n\n Args:\n device (`obj`): Device object\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring interface\n ", + "module_name": "iosxe.flow.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_flow_monitor_statistics", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/flow/configure.py#L98" + } + } + }, + "clear_interface_config": { + "folders": { + "iosxe": { + "doc": " Clears interface config\n\n Args:\n device ('obj'): device to use\n interface ('str'): interface to clear\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_interface_config", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L824" + } + } + }, + "clear_interface_counters": { + "folders": { + "iosxe": { + "doc": " Clear interface counters\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface name\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_interface_counters", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L377" + } + } + }, + "clear_interface_interfaces": { + "folders": { + "iosxe": { + "doc": " clear interface configuration\n\n Args:\n device ('obj'): device to use\n interfaces ('list'): List of interface to be cleared\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_interface_interfaces", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L1288" + } + } + }, + "clear_iox": { + "folders": { + "iosxe": { + "doc": " \n Execute clear iox\n Uses disable_iox\n Args:\n device ('obj') : Device object\n max_time ('int') : max time to wait\n interval ('int') : interval timer\n disable_iox_then_clear ('boolean') : Disable IOX then clear\n wait_timer ('int') : wait timer after disable IOX if disable_iox_then_clear\n timeout ('int'): timeout arg for Unicon execute for this CLI\n Returns:\n True\n False\n Raises:\n None \n ", + "module_name": "iosxe.apphosting.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_iox", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/apphosting/configure.py#L53" + } + } + }, + "clear_ip_bgp_vrf_af_soft": { + "folders": { + "iosxe": { + "doc": " BGP soft clear using vrf, address family and AS number\n\n Args:\n device ('obj'): device object\n vrf ('str'): vrf name\n address_family ('str'): address family\n as_number ('int'): BGP AS number\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing command\n ", + "module_name": "iosxe.bgp.clear", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_ip_bgp_vrf_af_soft", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/clear.py#L12" + } + } + }, + "clear_ip_mroute_all": { + "folders": { + "iosxe": { + "doc": " clear ip mroute *\n Args:\n device (`obj`): Device object\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_ip_mroute_all", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/utils.py#L1319" + } + } + }, + "clear_ip_mroute_vrf": { + "folders": { + "iosxe": { + "doc": " clear ipv6 mld group\n Args:\n device (`obj`): Device object\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.mcast.clear", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_ip_mroute_vrf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mcast/clear.py#L12" + } + } + }, + "clear_ip_nat_translation_all": { + "folders": { + "iosxe": { + "doc": " clear ip nat translation *\n Args:\n device (`obj`): Device object\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_ip_nat_translation_all", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/utils.py#L1299" + } + } + }, + "clear_ipv6_mfib_vrf_counters": { + "folders": { + "iosxe": { + "doc": " clear ipv6 mfib vrf * counters\n Args:\n device (`obj`): Device object\n vrf_name ('str', optional): VRF name. Default will clear all vrf counters\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.ipv6.clear", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_ipv6_mfib_vrf_counters", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/ipv6/clear.py#L11" + } + } + }, + "clear_ipv6_mld_group": { + "folders": { + "iosxe": { + "doc": " clear ipv6 mld group\n Args:\n device (`obj`): Device object\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.ipv6.clear", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_ipv6_mld_group", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/ipv6/clear.py#L35" + } + } + }, + "clear_logging": { + "folders": { + "iosxe": { + "doc": " clear logging\n Args:\n device ('obj'): Device object\n Returns:\n output ('str'): Output of execution\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_logging", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/utils.py#L746" + }, + "iosxr": { + "doc": " clear logging\n Args:\n device ('obj'): Device object\n Returns:\n output ('str'): Output of execution\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxr.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxr" + }, + "uid": "clear_logging", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxr/utils.py#L346" + }, + "nxos": { + "doc": " clear logging\n Args:\n device ('obj'): Device object\n Returns:\n output ('str'): Output of execution\n Raises:\n SubCommandFailure\n ", + "module_name": "nxos.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "nxos" + }, + "uid": "clear_logging", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/nxos/utils.py#L312" + } + } + }, + "clear_macsec_counters": { + "folders": { + "iosxe": { + "doc": " Clears macsec counters on device\n\n Args:\n device ('obj'): device to use\n interfaces ('list'): List of interfaces\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.macsec.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_macsec_counters", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/macsec/configure.py#L315" + } + } + }, + "clear_mdns_query_db": { + "folders": { + "iosxe": { + "doc": " Clears mdns query database statistics on device\n Args:\n device (`obj`): Device object\n Return:\n None\n Raise:\n SubCommandFailure: Failed clearing query-db statistics\n ", + "module_name": "iosxe.mdns.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_mdns_query_db", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mdns/configure.py#L261" + } + } + }, + "clear_mdns_statistics": { + "folders": { + "iosxe": { + "doc": " Clears mdns statistics on device\n Args:\n device (`obj`): Device object\n Return:\n None\n Raise:\n SubCommandFailure: Failed clearing statistics\n ", + "module_name": "iosxe.mdns.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_mdns_statistics", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mdns/configure.py#L240" + } + } + }, + "clear_mpls_counters": { + "folders": { + "iosxe": { + "doc": " Clear mpls counters\n Args:\n device (`obj`): Device object\n\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_mpls_counters", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L230" + } + } + }, + "clear_mpls_ldp_neighbor": { + "folders": { + "iosxe": { + "doc": " clear mpls ldp neighbor {}\n Args:\n device ('obj'): Device object\n neighbor_ip ('str'): neighbor ip\n\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_mpls_ldp_neighbor", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L259" + } + } + }, + "clear_ospf3_neighbor": { + "folders": { + "junos": { + "doc": " Clear ospf3 neighbor using one of two commands\n Args:\n device ('obj'): Device object\n command ('str'): Command with a higher priority\n alternative_command ('str'): An alternative command that would be executed if the given command creates an error\n fail_regex ('str'): A regex string to look for which would indicate failure\n Returns:\n bool\n\n Raises:\n N/A or SubcommandFailure\n ", + "module_name": "junos.ospf3.clear", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "junos" + }, + "uid": "clear_ospf3_neighbor", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/junos/ospf3/clear.py#L3" + } + } + }, + "clear_ospf_neighbor": { + "folders": { + "junos": { + "doc": " Clear ospf neighbor using one of two commands\n Args:\n device ('obj'): Device object\n command ('str'): Command with a higher priority\n alternative_command ('str'): An alternative command that would be executed if the given command creates an error\n fail_regex ('str'): A regex string to look for which would indicate failure\n Returns:\n bool\n\n Raises:\n N/A or SubcommandFailure\n ", + "module_name": "junos.ospf.clear", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "junos" + }, + "uid": "clear_ospf_neighbor", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/junos/ospf/clear.py#L3" + } + } + }, + "clear_ospf_trace_log": { + "folders": { + "junos": { + "doc": "\n Clear log ospf_trace_log\n\n Args:\n device (`obj`): Device object\n ospf_trace_log(`str`): OSPF trace log\n\n Returns:\n None\n ", + "module_name": "junos.ospf.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "junos" + }, + "uid": "clear_ospf_trace_log", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/junos/ospf/configure.py#L74" + } + } + }, + "clear_packet_buffer": { + "folders": { + "ios": { + "doc": "Clear packet buffer\n\n Args:\n device (`obj`): Device object\n\n Returns:\n None\n\n Raises:\n pyATS Results\n ", + "module_name": "ios.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "ios" + }, + "uid": "clear_packet_buffer", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/ios/utils.py#L211" + }, + "iosxe": { + "doc": "Clear packet buffer\n\n Args:\n device (`obj`): Device object\n\n Returns:\n None\n\n Raises:\n pyATS Results\n ", + "module_name": "iosxe.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_packet_buffer", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/utils.py#L217" + } + } + }, + "clear_port_security": { + "folders": { + "iosxe": { + "doc": " clear port-security all\n Args:\n device ('obj'): Device object\n interface('str',optional) : interface name, default value is None\n Returns:\n output ('str'): Output of execution\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "clear_port_security", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/utils.py#L1363" + } + } + }, + "compare_archive_config_dicts": { + "folders": { + "iosxe": { + "doc": " Checks for differences between two 'show archive' dictionaries\n\n Args:\n dict1('dict'): first dictionary\n dict2('dict'): seconds dictionary\n\n Returns:\n list of commands that are different between the two configs\n Raises:\n None\n ", + "module_name": "iosxe.archive.verify", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "compare_archive_config_dicts", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/archive/verify.py#L9" + } + } + }, + "compare_config_dicts": { + "doc": " Compare two configuration dicts and return the differences\n\n Args:\n a (`dict`): Configuration dict\n b (`dict`): Configuration dict\n exclude (`list`): List of item to ignore. Supports Regex.\n Regex must begins with ( )\n Returns:\n out (`str`): differences\n ", + "folders": {}, + "module_name": "utils", + "package": "genie.libs.sdk.apis", + "uid": "compare_config_dicts", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/utils.py#L233" + }, + "compare_metric_of_route": { + "folders": { + "junos": { + "doc": " Compare the metric of best path and non best path\n\n Args:\n device ('obj'): Device object\n ip_address ('str'): IP address in show command.\n invert(bool, optional): Inverts from equals to not equals. Defaults to False.\n max_time ('int', optional): Max time, default: 60 seconds\n check_interval ('int', optional): Check interval, default: 10 seconds\n\n Returns:\n result (`bool`): Verified result\n\n Raises:\n N/A\n ", + "module_name": "junos.routing.verify", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "junos" + }, + "uid": "compare_metric_of_route", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/junos/routing/verify.py#L2643" + } + } + }, + "compared_with_running_config": { + "doc": " Show difference between given config and current config\n Args:\n config ('dict'): Config to compare with\n Raise:\n None\n Returns:\n Diff\n ", + "folders": {}, + "module_name": "utils", + "package": "genie.libs.sdk.apis", + "uid": "compared_with_running_config", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/utils.py#L1452" + }, + "concurrent_ssh_sessions": { + "folders": { + "iosxe": { + "doc": "\n Generates multiple ssh sessions\n Args:\n device (`obj`): Device object\n testbed (`str`): Testbed object\n enable_pass (`str`): enable password\n concurrent_sessions (`int`): count of ssh session to generate\n iteration_times (`int`): count of concurrent_sessions to repeat\n Returns:\n None\n ", + "module_name": "iosxe.utils", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "concurrent_ssh_sessions", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/utils.py#L1154" + } + } + }, + "config_acl_on_interface": { + "folders": { + "iosxe": { + "doc": " Configures acl on interface \n\n Args:\n device ('obj'): device to use\n interface ('str'): interface to configure\n acl_name ('str'): acl to apply\n ", + "module_name": "iosxe.acl.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_acl_on_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/acl/configure.py#L138" + } + } + }, + "config_device_tracking_policy": { + "folders": { + "iosxe": { + "doc": " Configure a device-tracking policy with specified options\n Args:\n device ('obj'): device object\n policy ('str'): policy name\n options ('list'): list of policy configuration options:\n dictionary contains any of the following keys:\n cache_guard ('str', optional): cache poisoning guard mode\n data_glean ('str', optional): source address gleaning\n destination_glean ('str', optional): destination address gleaning\n device_role ('str', optional): device role\n distribution_switch ('str', optional): hostname of ip address\n limit_address_count ('dict', optional):\n all ('int', optional): max value\n ipv4 ('int', optional): address limit for ipv4 per mac\n ipv6 ('int', optional): address limit for ipv6 per mac\n origin ('str', optional): configure origin of the policy\n prefix_glean ('str', optional): glean prefixes in RA and DHCP-PD traffic\n protocol ('dict', optional):\n name ('dict'): name can be arp, dhcp4, dhcp6, ndp, or udp\n prefix_list ('str'): name of prefix-list\n security_level ('str', optional): security level\n tracking ('str', optional): tracking behavior\n trusted_port ('bool', optional): setup trusted port\n vpc ('int', optional): setup vpc port\n ex.)\n [\n {\n \"cache_guard\": \"ipv4\",\n \"data_glean\": \"log-only\",\n \"destination_glean\": \"log-only\",\n \"device_role\": \"node\",\n \"distribution-switch\": \"\"10.10.10.10\"\",\n \"limit_address_count\": {\n \"all\": 1000,\n \"ipv4\": 50,\n \"ipv6\": 10\n },\n \"origin\": \"cli\",\n \"prefix_glean\": \"only\",\n \"protocol\": {\n \"arp\": {\n \"prefix_list\": \"name1\"\n },\n \"dhcp4\": {\n \"prefix_list\": \"name2\"\n }\n },\n \"security_level\": \"guard\",\n \"tracking\": \"enable\",\n \"trusted_port\": True,\n \"vpc\": 10\n }\n ]\n Returns:\n None\n Raises:\n SubCommandFailure: Failed to configure device-track policy\n ", + "module_name": "iosxe.sisf.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_device_tracking_policy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/sisf/configure.py#L500" + } + } + }, + "config_edge_trunk_on_interface": { + "folders": { + "iosxe": { + "doc": " Configure spanning portf edge trunk on Interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface on which the edge trunk config to be applied\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_edge_trunk_on_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L2247" + } + } + }, + "config_enable_ip_routing": { + "folders": { + "iosxe": { + "doc": " Enable IP Routing\n\n Args:\n device (`obj`): Device object\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_enable_ip_routing", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L58" + } + } + }, + "config_enable_ipv6_routing": { + "folders": { + "iosxe": { + "doc": " configure ipv6 routing on device\n\n Args:\n device (`obj`): Device object\n Returns:\n None\n ", + "module_name": "iosxe.ipv6.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_enable_ipv6_routing", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/ipv6/configure.py#L11" + } + } + }, + "config_encapsulation_on_interface": { + "folders": { + "iosxe": { + "doc": " Configure encapsulation on Interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface on which the edge trunk config to be applied\n vlan (`str`): Vlan to be configured with encapsulation\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_encapsulation_on_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L584" + } + } + }, + "config_eompls_pseudowire": { + "folders": { + "iosxe": { + "doc": "configure pseudowire interface \n Args:\n device (`obj`): Device \n pseudowire_name (`str`): Specifies the pseudowire interface\n neigh (`str`) : Specifies the peer IP address\n vc_id (`str`) : virtual circuit (VC) ID value of the Layer 2 VPN (L2VPN) pseudowire.\n flow_ip (`str`) : Specifies load-balance factor Eg:dst-ip so on\n flow_label (`str`) : core load balancing based on flow-labels.\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_eompls_pseudowire", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L1083" + } + } + }, + "config_extended_acl": { + "folders": { + "iosxe": { + "doc": " Configure extended ACL on device\n Args:\n device ('obj'): device object\n acl_name ('str'): acl name\n permission ('str'): (permit | deny), default value is None\n protocol ('str'): protocol, default value is None\n src_ip ('str'): source start ip, default value is None\n src_step ('str'): increment step for source ip, default value is None\n src_wildcard ('str'): source wildcard, default value is None\n dst_ip ('str'): destination start ip, default value is None\n dst_step ('str'): increment step for destination ip, default value is None\n dst_wildcard ('str'): destination wildcard, default value is None\n dst_port ('str'): Acl destination port, default value is None\n entries ('int'): Acl entries, default value is None\n acl_type ('str', optional): type of ACL like with or without host keyword, default value is None\n sequence_num ('str',optional): specific sequence number,default value is None\n Returns:\n config\n Raises:\n SubCommandFailure: Failed to configure access-list\n ", + "module_name": "iosxe.acl.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_extended_acl", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/acl/configure.py#L13" + } + } + }, + "config_flow_exporter": { + "folders": { + "iosxe": { + "doc": " Config Flow Exporter on Device\n\n Args:\n device (`obj`): Device object\n exporter_name (`str`): Flow exporter name\n monitor_name (`str`): Flow monitor name\n dest_ip (`str`): Destination IP\n udp_port (`str`): UDP port\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring interface\n ", + "module_name": "iosxe.flow.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_flow_exporter", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/flow/configure.py#L12" + } + } + }, + "config_flow_monitor_on_interface": { + "folders": { + "iosxe": { + "doc": " Config Flow Monitor on Interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface to be configured\n exporter_name (`str`): Flow exporter name\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring interface\n ", + "module_name": "iosxe.flow.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_flow_monitor_on_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/flow/configure.py#L72" + } + } + }, + "config_identity_ibns": { + "folders": { + "iosxe": { + "doc": " Configured 802.1x port based authentication for\n IBNS2.0 with service policy\n Mandatory args:\n device ('obj'): device to use\n interface (`str`): Interface name\n access(bol): Set to True, False to configure in Trunk mode\n Policy_map: Name of policy map to be attached.\n Optional args:\n data_vlan(`int`): vlan_id for data traffic\n voice_vlan(`int`): vlan_id for voice traffic\n max_req:(`int`) Max No. of Retries\n max-reauth-req(`int`): Max No. of Reauthentication Attempts\n authmod('str'): default(multi-auth), mult-host peer, multi-domain etc\n closed('bol'): {False: closed | True: open (default) }\n reauth('str'): server or numberic range is 1 to 65535 seconds\n ctr('str'): {both | in}\n txp(`int`):The range is 1 to 65535 seconds\n port_control ('str'): {auto|force-authorized|force-unauthorized}. Default = 'auto'\n Returns:\n None\n Raises:\n SubCommandFailure: Failed to configure 802.1x port based authentication\n ", + "module_name": "iosxe.dot1x.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_identity_ibns", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/dot1x/configure.py#L303" + } + } + }, + "config_interface_carrier_delay": { + "folders": { + "iosxe": { + "doc": " Configure interface carrier delay on device\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface name\n delay (`int`): Delay time in second\n delay_type (`str`): Delay type\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_interface_carrier_delay", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L339" + } + } + }, + "config_interface_mtu": { + "folders": { + "iosxe": { + "doc": " Config MTU on interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface name\n mtu_bytes (`int`): MTU bytes\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_interface_mtu", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L455" + } + } + }, + "config_interface_negotiation": { + "folders": { + "iosxe": { + "doc": " Config negotiation auto on interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface name\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_interface_negotiation", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L79" + } + } + }, + "config_interface_ospf": { + "folders": { + "iosxe": { + "doc": " Config OSPF on interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface name\n ospf_pid (`str`): Ospf process id\n area ('int'): Ospf area code\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_interface_ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L521" + } + } + }, + "config_interface_ospfv3": { + "folders": { + "iosxe": { + "doc": "config OSPF on interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface name\n ospfv3_pid (`str`): Ospfv3 process id\n area ('int'): Ospf area code\n ipv4 ('boolean',optional): Flag to configure IPv4 (Default False)\n ipv6 ('boolean',optional): Flag to configure IPv6 (Default True)\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_interface_ospfv3", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L553" + } + } + }, + "config_interface_subinterface_and_secondary_addresses": { + "folders": { + "iosxe": { + "doc": " Configure sub-interface and secondary addresses on device\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface name\n sub_interface_num (`int`): Subinterface to be added to\n interface name\n ip_address(`str`): IP addressed to be configured on interface\n prefix(`str`): prefix to be used in configuration\n encap_type (`str`): Encapsulation type\n start (`int`): start number on ip\n end (`int`): end number on ip\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_interface_subinterface_and_secondary_addresses", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L711" + } + } + }, + "config_ip_on_interface": { + "folders": { + "iosxe": { + "doc": " Configure IP on an interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface to get address\n ip_address (`str`): IP addressed to be configured on interface\n mask (`str`): Mask address to be used in configuration\n ipv6_address (`str`): IPv6 address with subnet mask\n eth_encap_type (`str`): Encapsulation type\n eth_encap_val (`str`): Encapsulation value\n sub_interface (`str`): Subinterface to be added to interface name\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_ip_on_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L588" + } + } + }, + "config_ip_on_vlan": { + "folders": { + "iosxe": { + "doc": "Configure an IPv4/IPv6 address on a vlan\n\n Args:\n device (`obj`): Device object\n vlanid (`str`): Vlan id\n ipv4_address (`str`): IPv4 address\n subnetmask (`str`): Subnet mask to be used for IPv4 address\n ipv6_address (`str`): Ipv6 address\n ipv6_prefix_len (`int`): length of IPv6 prefix\n Return:\n None\n Raise:\n SubCommandFailure: Failed to configure Ipv4/Ipv6 address on vlan\n ", + "module_name": "iosxe.vlan.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_ip_on_vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/vlan/configure.py#L39" + } + } + }, + "config_ip_pim": { + "folders": { + "iosxe": { + "doc": " Enables PIM sparse mode on an interface.\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface name\n mode (`str`): specifiy pim mode\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring interface\n ", + "module_name": "iosxe.multicast.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_ip_pim", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/multicast/configure.py#L13" + } + } + }, + "config_ip_subinterface": { + "folders": { + "iosxe": { + "doc": " Configure sub-interface with IP addresses on device\n Args:\n device (`obj`): Device object\n interface (`str`): Interface name\n sub_interface_num (`int`): Subinterface to be added to\n interface name\n ip_address(`str`): IP addressed to be configured on interface\n prefix(`str`): prefix to be used in configuration\n encap_type (`str`): Encapsulation type\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_ip_subinterface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L667" + } + } + }, + "config_ipv6_nd_raguard_policy": { + "folders": { + "iosxe": { + "doc": " Configure an ipv6 nd raguard policy with specified options\n Args:\n device ('obj'): device object\n policy ('str'): policy name\n options ('list'): list of policy configuration options:\n dictionary contains following keys:\n device_role ('str', optional): device role\n hop_limit ('dict', optional):\n max ('int'): maximum hop limit\n min ('int'): minimum hop limit\n managed_config_flag ('bool', optional): enable M flag\n match ('dict', optional):\n ipv6 ('str'): access list to match\n ra ('str'): prefix list to match\n other_config_flag ('bool', optional): enable O flag\n router_preference ('dict', optional): enable router preference flag\n trusted_port ('bool', optional): setup trusted port\n ex.)\n [\n {\n \"device_role\": \"host\",\n \"hop_limit\": {\n \"max\": 100,\n \"min\": 50\n },\n \"managed_config_flag\": True,\n \"match\": {\n \"ipv6\": \"test\",\n \"ra\": \"bar\"\n },\n \"other_config_flag\": False,\n \"router_preference\": \"high\",\n \"trusted_port\": True,\n }\n ]\n Returns:\n None\n Raises:\n SubCommandFailure: Failed to configure ipv6 nd raguard policy\n ", + "module_name": "iosxe.sisf.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_ipv6_nd_raguard_policy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/sisf/configure.py#L733" + } + } + }, + "config_ipv6_source_guard_policy": { + "folders": { + "iosxe": { + "doc": " Configure an ipv6 source-guard policy with specified options\n Args:\n device ('obj'): device object\n policy ('str'): policy name\n options ('list'): list of policy configuration options:\n dictionary contains following keys:\n deny ('str', optional): block data traffic\n permit ('str', optional): allow data traffic\n trusted ('bool', optional): setup trusted port\n validate ('str', optional): validate source of received data traffic\n ex.)\n [\n {\n \"deny\": \"global-autoconf\",\n \"permit\": \"link-local\",\n \"trusted\": True,\n \"validate\": \"address\",\n }\n ]\n Returns:\n None\n Raises:\n SubCommandFailure: Failed to configure ipv6 source-guard policy\n ", + "module_name": "iosxe.sisf.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_ipv6_source_guard_policy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/sisf/configure.py#L906" + } + } + }, + "config_license": { + "folders": { + "iosxe": { + "doc": " Config license on Device\n\n Args:\n device (`obj`): Device object\n license (`str`): License name\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring interface\n ", + "module_name": "iosxe.system.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_license", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/system/configure.py#L13" + } + } + }, + "config_mac_aging_time": { + "folders": { + "iosxe": { + "doc": " Config mac-aging time under bridge domain\n\n Args:\n device (`obj`): device object\n bridge_domain (`int`): bridge domain id\n aging_time (`int`): mac aging-time\n Return:\n None\n Raises:\n SubCommandFailure: Failed configuring device\n ", + "module_name": "iosxe.mac.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_mac_aging_time", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mac/configure.py#L12" + } + } + }, + "config_mac_learning": { + "folders": { + "iosxe": { + "doc": " Config mac learning under bridge domain\n\n Args:\n device (`obj`): device object\n bridge_domain (`int`): bridge domain id\n Return:\n None\n Raises:\n SubCommandFailure: Failed configuring device\n ", + "module_name": "iosxe.mac.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_mac_learning", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mac/configure.py#L70" + } + } + }, + "config_macsec_keychain_on_device": { + "folders": { + "iosxe": { + "doc": " Configures macsec key chain on device\n\n Args:\n device ('obj'): device to use\n keychain_name ('str'): keychain name to configure\n key_string ('str'): key string to configure\n lifetime ('list'): start and end timings\n ex.)\n lifetime = [\"10:36:55 Aug 18 2021\", \"10:37:55 Aug 18 2021\"]\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.macsec.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_macsec_keychain_on_device", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/macsec/configure.py#L86" + } + } + }, + "config_macsec_network_link_on_interface": { + "folders": { + "iosxe": { + "doc": " Configures macsec network-link on interface\n\n Args:\n device ('obj'): device to use\n interface ('str'): interface to configure\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.macsec.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_macsec_network_link_on_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/macsec/configure.py#L191" + } + } + }, + "config_macsec_replay_protection_window_size": { + "folders": { + "iosxe": { + "doc": " Configures macsec replay-protection window-size on interface\n\n Args:\n device ('obj'): device to use\n interface ('str'): interface to configure\n window_size ('str'): window size\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.macsec.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_macsec_replay_protection_window_size", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/macsec/configure.py#L55" + } + } + }, + "config_mka_keychain_on_interface": { + "folders": { + "iosxe": { + "doc": " Configures mka keychain on interface\n\n Args:\n device ('obj'): device to use\n interface ('str'): interface to configure\n key_string ('str'): key string to configure\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.macsec.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_mka_keychain_on_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/macsec/configure.py#L160" + } + } + }, + "config_mka_policy_xpn": { + "folders": { + "iosxe": { + "doc": " Configures mka policy xpn on device or interface\n\n Args:\n device ('obj'): device to use\n interface ('str'): interface to configure\n cipher ('str'): Cipher suite value\n sak_rekey_int ('str'): Sak rekey interval\n key_server_priority ('str'): Key server priority\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.macsec.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_mka_policy_xpn", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/macsec/configure.py#L251" + } + } + }, + "config_mpls_lable_protocol": { + "folders": { + "iosxe": { + "doc": " Config mpls lable protocol on interface or device\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface to be configured\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring interface\n ", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_mpls_lable_protocol", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L309" + } + } + }, + "config_mpls_ldp_explicit_on_device": { + "folders": { + "iosxe": { + "doc": " Config mpls ldp explicit on device\n\n Args:\n device (`obj`): Device object\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring interface\n ", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_mpls_ldp_explicit_on_device", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L514" + } + } + }, + "config_mpls_ldp_on_device": { + "folders": { + "iosxe": { + "doc": " Config ldp on Device\n\n Args:\n device (`obj`): Device object\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring interface\n ", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_mpls_ldp_on_device", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L61" + } + } + }, + "config_mpls_ldp_on_interface": { + "folders": { + "iosxe": { + "doc": " Config ldp on interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface name\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring interface\n ", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_mpls_ldp_on_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L16" + }, + "junos": { + "doc": " Config ldp on interface on junos device\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface name\n Return:\n None\n ", + "module_name": "junos.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "junos" + }, + "uid": "config_mpls_ldp_on_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/junos/mpls/configure.py#L12" + } + } + }, + "config_mpls_ldp_router_id_on_device": { + "folders": { + "iosxe": { + "doc": " Config mpls ldp router id on device\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface name\n force ('bool') : router-id is instantly changed when the interface is down if true\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring interface\n ", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_mpls_ldp_router_id_on_device", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L361" + } + } + }, + "config_mpls_on_device": { + "folders": { + "iosxe": { + "doc": " configure mpls on device\n Args:\n device (`obj`): Device object\n loopback_intf (`str`): Interface name\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_mpls_on_device", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L231" + } + } + }, + "config_multicast_routing_mvpn_vrf": { + "folders": { + "iosxe": { + "doc": " Enables IP multicast routing for the MVPN VRF specified for the vrf-name argument.\n\n Args:\n device (`obj`): Device object\n vrf (`str`): VRF name\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring interface\n ", + "module_name": "iosxe.multicast.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_multicast_routing_mvpn_vrf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/multicast/configure.py#L70" + } + } + }, + "config_no_keepalive_intf": { + "folders": { + "iosxe": { + "doc": " configure no switchport and no keepalive on Interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface on which the edge trunk config to be applied\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_no_keepalive_intf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L178" + } + } + }, + "config_port_security_on_interface": { + "folders": { + "iosxe": { + "doc": " Configuring port security on an interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface to get address\n maximum_addresses (`int`,optional): maximum mac addresses, default value is 1\n aging_time (`str`,optional): aging time for mac address, default value is None\n aging_type (`str`,optional): aging type for mac address, default value is None\n violation_mode (`str`,optional): violation mode, default value is None\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_port_security_on_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L3389" + } + } + }, + "config_portchannel_range": { + "folders": { + "iosxe": { + "doc": " Configure port channel\n e.g.\n interface range port-channel 1-50\n\n Args:\n device (`obj`): Device object\n portchannel_start(`int`): Port channel number start\n portchannel_end(`int`): Port channel number end\n\n Return:\n None\n Raise:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_portchannel_range", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L3236" + } + } + }, + "config_pseudowire_class": { + "folders": { + "iosxe": { + "doc": " configure pseudowire class\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface name/ip address\n pw_class ('str'): pseudowire class name\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_pseudowire_class", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L681" + } + } + }, + "config_pw_class_interface": { + "folders": { + "iosxe": { + "doc": " configure pseudowire class on interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface name\n peer_id (`str`): peer address\n vc_id (`str`): vc id \n pw_class (`str`): pseudowire class name\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_pw_class_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L726" + } + } + }, + "config_rp_address": { + "folders": { + "iosxe": { + "doc": "Configures a static IP address of a rendezvous point for a multicast group range.\n\n Args:\n device (`obj`): Device object\n vrf (`str`): VRF name\n ip_address (`str`): IP address of the group-range \n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring rp address\n ", + "module_name": "iosxe.multicast.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_rp_address", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/multicast/configure.py#L42" + } + } + }, + "config_speed_nonego_on_interface": { + "folders": { + "iosxe": { + "doc": " Configure speed nonego on interface\n\n Args:\n device (`obj`): Device object\n interface ('str'): Interface to be configured\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring interface\n ", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_speed_nonego_on_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L559" + } + } + }, + "config_standard_acl_for_ip_pim": { + "folders": { + "iosxe": { + "doc": " Configures a standard IP access list.\n Args:\n device ('obj'): device object\n acl_name ('str'): acl name\n permission ('str'): (permit | deny)\n host_ip ('str'): source start ip\n host_wildcard ('str'): increment step for source ip\n vrf ('str'): vrf name\n rp_address ('str'): mention the IP address of the rendezvous point for the group.\n bir_enabled ('boolean', optional): sets true if enabled. Defaults to False.\n Returns:\n config\n Raises:\n SubCommandFailure: Failed to configure access-list\n ", + "module_name": "iosxe.multicast.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_standard_acl_for_ip_pim", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/multicast/configure.py#L196" + } + } + }, + "config_vc_backup_peer": { + "folders": { + "iosxe": { + "doc": "configure backup peer vc on interface\n Args:\n\t device (`obj`): Device object\n\t interface (`str`): interface, backup peer need to be configured on\n peer_address (`str`): Address of the peer, main vc\n backup_peer('str'): Peer address of backup vc\n vc_id (`str`): VC ID for the back up peer\n backup_vc_id(`str`): Backup peer vc id\n pw_class(`str`): psuedowire class \n backup_pw_class(`str`): psuedowire class of backup peer\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_vc_backup_peer", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L1047" + } + } + }, + "config_vlan": { + "folders": { + "iosxe": { + "doc": " Configures a VLAN on Interface or Device\n e.g.\n vlan 666\n\n Args:\n device (`obj`): Device object\n vlanid (`str`): Vlan id\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring interface\n ", + "module_name": "iosxe.vlan.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/vlan/configure.py#L15" + } + } + }, + "config_vlan_range": { + "folders": { + "iosxe": { + "doc": " Configures a VLAN on Device\n e.g.\n vlan 1 - 4094\n\n Args:\n device (`obj`): Device object\n vlanid_start (`int`): Vlan id start \n vlanid_end (`int`): Vlan id end\n\n Return:\n None\n Raise:\n SubCommandFailure\n ", + "module_name": "iosxe.vlan.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_vlan_range", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/vlan/configure.py#L257" + } + } + }, + "config_vlan_tag_native": { + "folders": { + "iosxe": { + "doc": " Configure vlan dot1q tag native\n\n Args:\n device (`obj`): Device object\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring device\n ", + "module_name": "iosxe.vlan.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_vlan_tag_native", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/vlan/configure.py#L92" + } + } + }, + "config_wan_macsec_on_interface": { + "folders": { + "iosxe": { + "doc": " Configures WAN Macsec on interface \n\n Args:\n device ('obj'): device to use\n interface ('str'): interface to configure\n speed ('str'): Operation speed\n destination_address ('str'): eapol destination-address\n eth_type ('str'): eapol eth-type\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.macsec.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_wan_macsec_on_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/macsec/configure.py#L13" + } + } + }, + "config_xconnect_on_interface": { + "folders": { + "iosxe": { + "doc": " configure xconnect neighbor on Interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface on which the edge trunk config to be applied\n neighbor (`str`): Neighbor to be configured on xconnect\n vcid (`str`): Vcid to be configured through xconnect\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "config_xconnect_on_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L653" + } + } + }, + "configure_aaa_default_dot1x_methods": { + "folders": { + "iosxe": { + "doc": " configure aaa default dot1x methods\n Args:\n device (`obj`): Device object\n server_grp (`str`): Radius Server Grp name\n group_type ('str'): Group type. Options are 'group','cache','local'\n server_grp2 (`str`, optional): 2nd Radius Server Grp name. i.e aaa cache feature (Default is None)\n group_type2 ('str', optional): 2nd Group type. Options are 'group','cache','local' (Default is None)\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring\n Examples:\n configure_aaa_default_dot1x_methods(switch1,'testRadiusGrp')\n configure_aaa_default_dot1x_methods(switch1,'radiusGroup',group_type='cache',\n group_type2='group',server_grp2='radiusGroup')\n ", + "module_name": "iosxe.aaa.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_aaa_default_dot1x_methods", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/aaa/configure.py#L494" + } + } + }, + "configure_aaa_login_method_none": { + "folders": { + "iosxe": { + "doc": " This configure will enable login method none that is applicable for line and vty\n from getting locked for password \n Args:\n device (`obj`): Device object\n servergrp (`str`): Radius Server Grp name\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring\n ", + "module_name": "iosxe.aaa.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_aaa_login_method_none", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/aaa/configure.py#L552" + } + } + }, + "configure_aaa_new_model": { + "folders": { + "iosxe": { + "doc": " configure aaa new-model\n Args:\n device (`obj`): Device object\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring\n ", + "module_name": "iosxe.aaa.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_aaa_new_model", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/aaa/configure.py#L475" + } + } + }, + "configure_access_session_monitor": { + "folders": { + "iosxe": { + "doc": " Enable access-session monitor\n Args:\n device ('obj'): device to use\n Returns:\n None\n Raises:\n SubCommandFailure: Failed to enable access-session monitor\n ", + "module_name": "iosxe.dot1x.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_access_session_monitor", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/dot1x/configure.py#L209" + } + } + }, + "configure_access_session_single_policy_interface": { + "folders": { + "iosxe": { + "doc": "Common funtion to configure access-session single-policy interface for both forced and without forced\n Args:\n device ('obj'): device to use\n interface (`str`): Interface name\n force (`bool`): Force the CLI. Defaults to False\n max_time (`int`): Timeout for Dialog\n Returns:\n None\n Raises:\n SubCommandFailure:Failed to configure access-session single-policy interface\n ", + "module_name": "iosxe.single_policy.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_access_session_single_policy_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/single_policy/configure.py#L35" + } + } + }, + "configure_access_session_single_policy_policy_name": { + "folders": { + "iosxe": { + "doc": "Common function to configure access-session single-policy policy-name for both forced and without forced \n Args:\n device ('obj'): device to use\n policy_name (`str`): Policy name\n force (`bool`): Force the CLI. Defaults to False\n max_time (`int`): Timeout for Dialog\n Returns:\n None\n Raises:\n SubCommandFailure:Failed to configure access-session single-policy policy-name\n ", + "module_name": "iosxe.single_policy.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_access_session_single_policy_policy_name", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/single_policy/configure.py#L58" + } + } + }, + "configure_access_session_sticky": { + "folders": { + "iosxe": { + "doc": " configure interface-template sticky timer\n Args:\n device ('obj'): device to use\n timer (int): <1-65535> Enter a value between 1 and 65535\n Returns:\n None\n Raises:\n SubCommandFailure: Failed to configure interface-template sticky timer\n ", + "module_name": "iosxe.dot1x.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_access_session_sticky", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/dot1x/configure.py#L237" + } + } + }, + "configure_access_vlan": { + "folders": { + "iosxe": { + "doc": " configuring access vlan configuration on interface\n Args:\n device (`obj`): Device object\n vlanid ('int') : vlan id\n interface ('str) : interface name\n Returns:\n Bool\n Raises:\n SubCommandFailure\n Example: no vlan configuration 101\n ", + "module_name": "iosxe.vlan.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_access_vlan", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/vlan/configure.py#L207" + } + } + }, + "configure_any_radius_server": { + "folders": { + "iosxe": { + "doc": " Configure radius server on device\n Args:\n device (`obj`): Device object\n server_name (`str`): Radius server name\n addr_type (`str`): Address type v4 or v6\n address (`str`): ISE Ip\n authport (`int`): Auth port\n acctport (`int`): Acct port\n secret (`str`): ISE Secret key\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring\n ", + "module_name": "iosxe.aaa.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_any_radius_server", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/aaa/configure.py#L385" + } + } + }, + "configure_arp_timeout": { + "folders": { + "iosxe": { + "doc": " Config arp timeout on interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): Interface name\n timeout (`int`): timeout in second\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.arp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_arp_timeout", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/arp/configure.py#L12" + } + } + }, + "configure_attachment_circuit_vfi": { + "folders": { + "iosxe": { + "doc": "\n configure the Attachment Circuit with the VFI.\n Args:\n\t device (`obj`): Device \n interface(`str`): interface name\n vfiname(`str`): the Layer 2 VFI that you are binding to the VLAN port\n Returns:\n None\n Raises:\n SubCommandFailure\n\t", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_attachment_circuit_vfi", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L1385" + } + } + }, + "configure_auth_method": { + "folders": { + "iosxe": { + "doc": "Configure cli \n authentication method mab/dot1x pae authenticator\n Args:\n device (`obj`): Device object\n value (`str`): mab/dot1x\n intf (`str`): Interface to configure\n Return: \n None\n Raise:\n SubCommandFailure: Failed configuring \n ", + "module_name": "iosxe.dot1x.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_auth_method", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/dot1x/configure.py#L831" + } + } + }, + "configure_authentication_convert_to_new_style": { + "folders": { + "iosxe": { + "doc": "Common function to configure authentication convert-to new-style for both forced and without forced\n Args:\n device ('obj'): device to use\n force (`bool`): Force the CLI. Defaults to False\n max_time (`int`): Timeout for Dialog\n Returns:\n None\n Raises:\n SubCommandFailure:Failed to configure authentication convert-to new-style\n ", + "module_name": "iosxe.single_policy.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_authentication_convert_to_new_style", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/single_policy/configure.py#L80" + } + } + }, + "configure_authentication_convert_to_new_style_single_policy_interface": { + "folders": { + "iosxe": { + "doc": "Common funtion to configure authentication convert-to new-style\n single-policy interface for both forced and without forced \n Args:\n device ('obj'): device to use\n interface (`str`): Interface name\n force (`bool`): Force the CLI. Defaults to False\n max_time (`int`): Timeout for Dialog\n Returns:\n None\n Raises:\n SubCommandFailure:Failed to configure authentication convert-to new-style single-policy interface\n ", + "module_name": "iosxe.single_policy.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_authentication_convert_to_new_style_single_policy_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/single_policy/configure.py#L11" + } + } + }, + "configure_authentication_host_mode": { + "folders": { + "iosxe": { + "doc": "Configure legacy cli authentication host-mode multi-auth/multi-domain/multi-host/single-host\n Args:\n device (`obj`): Device object\n mode (`str`): Host mode\n intf (`str`): Interface to configure\n style (`str`, optional): legacy or new (Default is legacy)\n Return: \n None\n Raise:\n SubCommandFailure: Failed configuring \n ", + "module_name": "iosxe.dot1x.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_authentication_host_mode", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/dot1x/configure.py#L537" + } + } + }, + "configure_authentication_order": { + "folders": { + "iosxe": { + "doc": "Configure legacy cli authentication order dot1x/mab/webauth\n Args:\n device (`obj`): Device object\n order (`str`): mab dot1x/dot1x/mab/dot1x mab\n intf (`str`): Interface to configure\n Return: \n None\n Raise:\n SubCommandFailure: Failed configuring \n ", + "module_name": "iosxe.dot1x.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_authentication_order", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/dot1x/configure.py#L594" + } + } + }, + "configure_authentication_parameters_interface": { + "folders": { + "iosxe": { + "doc": " Configure authentication parameters on interface\n\n Args:\n device (`obj`): Device object\n interface (`str`): interface to configure the authentication parameters\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_authentication_parameters_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L2409" + } + } + }, + "configure_authentication_periodic": { + "folders": { + "iosxe": { + "doc": "Configure legacy cli \n authentication periodic\n Args:\n device (`obj`): Device object\n intf (`str`): Interface to configure\n Return: \n None\n Raise:\n SubCommandFailure: Failed configuring \n ", + "module_name": "iosxe.dot1x.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_authentication_periodic", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/dot1x/configure.py#L742" + } + } + }, + "configure_authentication_port_control": { + "folders": { + "iosxe": { + "doc": "Configure legacy cli \n authentication port-control auto/force-authorized/force-unauthorized\n Args:\n device (`obj`): Device object\n control (`str`): auto/force-authorized/force-unauthorized\n intf (`str`): Interface to configure\n style (`str`, optional): legacy or new (Default is legacy)\n Return: \n None\n Raise:\n SubCommandFailure: Failed configuring \n ", + "module_name": "iosxe.dot1x.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_authentication_port_control", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/dot1x/configure.py#L682" + } + } + }, + "configure_authentication_priority": { + "folders": { + "iosxe": { + "doc": "Configure legacy cli authentication priority dot1x/mab/webauth\n Args:\n device (`obj`): Device object\n priority (`str`): mab dot1x/dot1x/mab/dot1x mab\n intf (`str`): Interface to configure\n Return: \n None\n Raise:\n SubCommandFailure: Failed configuring \n ", + "module_name": "iosxe.dot1x.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_authentication_priority", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/dot1x/configure.py#L638" + } + } + }, + "configure_authentication_timer_reauth": { + "folders": { + "iosxe": { + "doc": "Configure legacy cli \n authentication timer reauthenticate value/server\n Args:\n device (`obj`): Device object\n value (`str`): authentication timer reauthenticate value/server\n intf (`str`): Interface to configure\n Return: \n None\n Raise:\n SubCommandFailure: Failed configuring \n ", + "module_name": "iosxe.dot1x.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_authentication_timer_reauth", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/dot1x/configure.py#L786" + } + } + }, + "configure_autodiscovery_bgp_signalling_ldp_template": { + "folders": { + "iosxe": { + "doc": " Config autodiscovery bgp signaling ldp template\n Args:\n device (`obj`): Device object\n context_name ('str'): context name for the template\n vpn_id ('str'): vpn id to be configured\n template_name('str'): name of the template\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring interface\n ", + "module_name": "iosxe.mpls.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_autodiscovery_bgp_signalling_ldp_template", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mpls/configure.py#L1511" + } + } + }, + "configure_bfd_on_interface": { + "folders": { + "iosxe": { + "doc": " Configures bfd on interface\n\n Args:\n device ('obj'): device to use\n interface ('str'): interface to configure\n interval ('str'): interval\n min_rx ('str'): min_rx\n multiplier ('str'): multiplier\n Returns:\n None\n Raises:\n SubCommandFailure: Failed configuring bfd on interface\n\n ", + "module_name": "iosxe.bfd.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bfd_on_interface", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bfd/configure.py#L12" + } + } + }, + "configure_bgp_additional_paths": { + "folders": { + "iosxe": { + "doc": " Configure additional_paths on bgp router\n\n Args:\n device ('obj'): device to use\n bgp_as ('int'): bgp router to configure\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing configure commands\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_additional_paths", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L825" + } + } + }, + "configure_bgp_address_advertisement": { + "folders": { + "iosxe": { + "doc": " Configure address advertisement on router bgp\n\n Args:\n device ('obj'): device to use\n bgp_as ('int'): bgp router to configure\n address_family ('str'): address family to configure under\n ip_address ('str'): ip address\n mask ('str'): mask\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing configure commands\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_address_advertisement", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L883" + } + } + }, + "configure_bgp_address_family_attributes": { + "folders": { + "iosxe": { + "doc": " configure attributes for bgp \n\n Args:\n device ('obj'): device to use\n bgp_as ('int'): bgp router to configure\n address_family ('str'): address family to configure under\n neighbor ('str'): neighbor address to send label\n send_label (`boolean`) : send MPLS labels with the routes if true\n route_reflector_client (`boolean`) : sets a device as routing information exchange server if true\n next-hop-self all (`boolean`) : sets a device as routing information exchange server if true\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing configure commands\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_address_family_attributes", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L954" + } + } + }, + "configure_bgp_advertise_additional_paths": { + "folders": { + "iosxe": { + "doc": " Configures advertisement for additional paths\n\n Args:\n device ('obj'): device to configure\n bgp_as ('str'): router bgp number\n neighbor ('str'): neighbor to advertise to\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing configure commands\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_advertise_additional_paths", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L853" + } + } + }, + "configure_bgp_graceful_restart": { + "folders": { + "iosxe": { + "doc": " Configures graceful-restart on BGP router\n\n Args:\n device('obj'): device to configure on\n bgp_as('str'): bgp_as to configure\n Return:\n N/A\n Raises:\n SubCommandFailure: Failed executing command\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_graceful_restart", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L1023" + } + } + }, + "configure_bgp_import_path_selection": { + "folders": { + "iosxe": { + "doc": " Configures import path selection on BGP router\n Args:\n device('obj'): device to configure\n bgp_as('str'): bgp id\n address_family:('str'): address family\n vrf('str'): vrf name\n type('str'): type of selection to configure\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing command\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_import_path_selection", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L25" + } + } + }, + "configure_bgp_l2vpn_neighbor_activate": { + "folders": { + "iosxe": { + "doc": " Activate bgp neighbor on bgp router \n\n Args:\n device ('obj') : Device to be configured\n bgp_as ('str') : Bgp Id to be added to configuration\n neighbor_address ('str') : Address of neighbor to be added to configuration\n address_family ('str') : Address family to be configured\n address_family_modifier ('str') : the endpoint provisioning information to be distributed\n to BGP peers.\n community('str') : Specifies the communities attribute to be sent to a BGP neighbor.\n\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing configure commands\n \n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_l2vpn_neighbor_activate", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L507" + } + } + }, + "configure_bgp_log_neighbor_changes": { + "folders": { + "iosxe": { + "doc": " Configures log-neighbor-changes on BGP router\n\n Args:\n device('obj'): device to configure on\n bgp_as('str'): bgp_as to configure\n Return:\n N/A\n Raises:\n SubCommandFailure: Failed executing command\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_log_neighbor_changes", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L1047" + } + } + }, + "configure_bgp_neighbor": { + "folders": { + "iosxe": { + "doc": " Configures bgp neighbor on bgp router\n\n Args:\n device('obj'): device to configure on\n bgp_as('str'): bgp_as to configure\n neighbor_as('str'): neighbor_as to configure\n neighbor_address('str'): address of neighbor\n source_interface('str',optional): used to configure update-source on neighbor ( Default is None )\n ebgp('str',optional): used to configure ebgp-mulithop ( Default is None )\n address_family('str',optional): address family ( Default is None )\n vrf('str',optional): vrf to configure address_family with ( Default is None )\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing command\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_neighbor", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L95" + } + } + }, + "configure_bgp_neighbor_activate": { + "folders": { + "iosxe": { + "doc": " Activate bgp neighbor on bgp router \n\n Args:\n device ('obj') : Device to be configured\n bgp_as ('str') : Bgp Id to be added to configuration\n neighbor_address ('str') : Address of neighbor to be added to configuration\n address_family ('str') : Address family to be configured\n steps('obj') : Context manager steps\n peer_policy('str') : peer policy to be configured\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing configure commands\n \n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_neighbor_activate", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L434" + } + } + }, + "configure_bgp_neighbor_as_override": { + "folders": { + "iosxe": { + "doc": " Configure AS override in VRF\n Args:\n device ('obj'): Device object\n bgp_as ('str'): Router bgp\n vrf ('str'): Vrf name\n neighbor_address ('str'): Neighbor address\n address_family ('str'): Address family\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing configure commands\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_neighbor_as_override", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L789" + } + } + }, + "configure_bgp_neighbor_remote_as": { + "folders": { + "iosxe": { + "doc": " Configure destination in vrf\n Args:\n device ('obj'): Device object\n bgp_as ('str'): Router bgp\n vrf ('str'): Vrf name\n neighbor_as ('str'): Destination\n neighbor_address ('str'): Neighbor address\n address_family ('str'): Address family\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing configure commands\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_neighbor_remote_as", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L730" + } + } + }, + "configure_bgp_neighbor_send_community": { + "folders": { + "iosxe": { + "doc": " Add send-community attribute for bgp neighbor on bgp router\n\n Args:\n device ('obj') : Device to be configured\n bgp_as ('str') : Bgp Id to be added to configuration\n neighbor_address ('str') : Address of neighbor to be added to configuration\n address_family ('str') : Address family to be configured\n vrf ('str') : vrf name\n send_community ('str') : send-community attribute to be configured\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing configure commands\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_neighbor_send_community", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L1071" + } + } + }, + "configure_bgp_redistribute_connected": { + "folders": { + "iosxe": { + "doc": " Configures redistrubute connected on BGP router\n Args:\n device('obj'): device to configure\n bgp_as('str'): bgp id\n address_family:('str'): address family\n vrf('str'): vrf name\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing command\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_redistribute_connected", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L1300" + } + } + }, + "configure_bgp_redistribute_ospf": { + "folders": { + "iosxe": { + "doc": " Configures redistribute ospf on BGP router\n Args:\n device('obj'): device to configure\n bgp_as('str'): bgp id\n address_family:('str'): address family\n ospf_instance('str'): ospf redistribute to configure\n vrf('str'): vrf name\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing command\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_redistribute_ospf", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L1195" + } + } + }, + "configure_bgp_router_id": { + "folders": { + "iosxe": { + "doc": " Configures router-id on BGP router\n\n Args:\n device('obj'): device to configure on\n bgp_as('str'): bgp_as to configure\n router_id('str'): router_id of device\n Return:\n N/A\n Raises:\n SubCommandFailure: Failed executing command\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_router_id", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L60" + } + } + }, + "configure_bgp_soo_on_inbound_from_neighbor": { + "folders": { + "iosxe": { + "doc": " Configures extended community SoO on inbound from neighbor using soo_rt\n\n Args:\n device('obj'): device to execute on\n soo_rt('str'): route to configure SoO with\n bgp_as('str'): what router bgp to configure on\n vrf('str'): what vrf to configure on\n neighbor_address('str'): what neighbor to configure on\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing configure commands\n\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_soo_on_inbound_from_neighbor", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L168" + } + } + }, + "configure_bgp_template_peer_policy": { + "folders": { + "iosxe": { + "doc": " Configures template peer-policy on BGP\n Args:\n device('obj'): device to configure\n bgp_as('str'): bgp id\n policy:('str'): policy to be configured\n send_community('str'): community to be configured\n route_reflect_client('str') : enable router to acts as a routing information exchange server for all other iBGP routers.\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing command\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_template_peer_policy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L1233" + } + } + }, + "configure_bgp_template_peer_session": { + "folders": { + "iosxe": { + "doc": " Configures template peer-session on BGP\n Args:\n device('obj'): device to configure\n bgp_as('str'): bgp id\n session_name:('str'): session name to be used\n remote_as('str'): remote as to configured\n source_intf('str'): source interface to be used\n neighbor('str'): neighbor ip\n Returns:\n N/A\n Raises:\n SubCommandFailure: Failed executing command\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_template_peer_session", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L1266" + } + } + }, + "configure_bgp_update_delay": { + "folders": { + "iosxe": { + "doc": " Configures update_delay time on BGP router\n Args:\n device('obj'): device to configure on\n bgp_as('str'): bgp_as to configure\n delay('int'): router_id of device\n Return:\n N/A\n Raises:\n SubCommandFailure: Failed executing command\n ", + "module_name": "iosxe.bgp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_bgp_update_delay", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/configure.py#L1497" + } + } + }, + "configure_boot_manual": { + "folders": { + "iosxe": { + "doc": " boot manual\n Args:\n device (`obj`): Device object\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.platform.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_boot_manual", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/platform/configure.py#L30" + } + } + }, + "configure_by_jinja2": { + "doc": " Configure using Jinja template\n\n Args:\n device ('obj'): Device object\n templates_dir ('str'): Template directory\n template_name ('str'): Template name\n kwargs ('obj'): Keyword arguments\n Returns:\n Boolean\n Raises:\n None\n ", + "folders": {}, + "module_name": "jinja.utils", + "package": "genie.libs.sdk.apis", + "uid": "configure_by_jinja2", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/jinja/utils.py#L20" + }, + "configure_cdp": { + "folders": { + "ios": { + "doc": " \n Enables cdp on target device\n Args:\n device ('obj'): Device object\n Returns:\n None\n ", + "module_name": "ios.cdp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "ios" + }, + "uid": "configure_cdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/ios/cdp/configure.py#L11" + }, + "iosxe": { + "doc": " Enables cdp on target device\n Args:\n device ('obj'): Device object\n Returns:\n None\n ", + "module_name": "iosxe.cdp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_cdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/cdp/configure.py#L11" + }, + "iosxr": { + "doc": " Enables cdp on target device\n Args:\n device ('obj'): Device object\n Returns:\n None\n ", + "module_name": "iosxr.cdp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxr" + }, + "uid": "configure_cdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxr/cdp/configure.py#L11" + }, + "nxos": { + "doc": " Enables cdp on target device\n Args:\n device ('obj'): Device object\n Returns:\n None\n ", + "module_name": "nxos.cdp.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "nxos" + }, + "uid": "configure_cdp", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/nxos/cdp/configure.py#L9" + } + } + }, + "configure_class_map": { + "folders": { + "iosxe": { + "doc": " Configures class-map\n Args:\n device ('obj'): device to use\n class_name ('str'): name of the class \n match_val ('str'): values of the match\n match_mode ('str',optional): name of the match_mode, default is None\n match_val1 ('str',optional): name of the match_mode 2, default is None\n match_mode1 ('str',optional): name of the match_mode type, default is None\n class_match_type ('str',optional): name of the match type, default is match-all\n access_group ('bool', optional): create class match with acls groups, default is False\n\n Returns:\n None\n Raises:\n SubCommandFailure \n ", + "module_name": "iosxe.policy_class_map.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_class_map", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/policy_class_map/configure.py#L13" + } + } + }, + "configure_coa": { + "folders": { + "iosxe": { + "doc": "\n COA Configuration for dot1x and mab\n Args:\n device ('obj'): Device object\n config_dict ('dict'): Dictionary of interface configuration details\n dictionary contains following keys:\n auth_type(all, any, session-key) : all(Matches when all attributes match)\n any(Matches when all sent attributes match)\n session-key(Matches with session key attribute only)\n hostname(hostname/ipv4/ipv6) : Ip/ipv6 or hostname of the RADIUS client\n encryption_type(0,6,7): 0(UNENCRYPTED), 6(ENCRYPTED), 7(HIDDEN)\n server_key(str) : Specify a RADIUS client server-key\n ignore_retransmission(bool) : Drop packets using same radius id\n ignore_server-key(bool) : Ignore shared secret\n ignore_session-key(bool) : Ignore attr 151\n\n Returns:\n None\n\n Example: {\n 'auth_type': 'all',\n 'hostname': 'hostname',\n 'encryption_type' : 0,\n 'server_key' : 'secretkey',\n 'ignore_retransmission': True,\n 'ignore_server_key': True,\n 'ignore_session_key': True\n }\n\n ", + "module_name": "iosxe.aaa.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_coa", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/aaa/configure.py#L209" + } + } + }, + "configure_common_criteria_policy": { + "folders": { + "iosxe": { + "doc": " Configure aaa common criteria policy\n Args:\n device (`obj`): Device object\n policy_name (`str`): Policy name\n char_changes (`str`, optional): Number of change characters between old and new passwords\n copy (`str`, optional): Copy from policy\n lifetime (`dict`, optional): lifetime configuration\n lower_case (`str`, optional): Number of lower-case characters\n upper_case (`str`, optional): Number of upper-case characters\n max_len (`str`, optional): Specify the maximum length of the password\n min_len (`str`, optional): Specify the minimum length of the password\n no_value (`dict`, optional): value to unconfigure\n num_count (`str`, optional): Number of numeric characters\n special_case (`str`, optional): Number of special characters\n\n Return:\n None\n Raise:\n SubCommandFailure: Failed configuring\n ", + "module_name": "iosxe.aaa.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_common_criteria_policy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/aaa/configure.py#L846" + } + } + }, + "configure_community_list_community_list_permit": { + "folders": { + "iosxe": { + "doc": " Configure community list permit\n\n Args:\n device ('obj'): Device object\n community_list('list'): community list which contains dictionary\n dictionary contains following 3 keys:\n seq ('int'): sequence number\n permit ('str'): permit value\n community ('str'): community value - Optional\n ex.)\n [ \n {\n 'seq': 1,\n 'permit': 'deny',\n 'community': 62000:1\n },\n { \n 'seq': 1,\n 'permit': 'permit'\n },\n {\n 'seq': 2,\n 'permit': 'deny',\n 'community': '62000:2'\n },\n {\n 'seq': 2,\n 'permit': 'permit'\n }\n ]\n Returns:\n None\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.community_list.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_community_list_community_list_permit", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/community_list/configure.py#L15" + } + } + }, + "configure_control_plane_control_plane_policy": { + "folders": { + "iosxe": { + "doc": " Configure control plane policy\n\n Args:\n device ('obj'): Device object\n config('list'): List of commands to configure\n ex.)\n [\n {\n 'policy_name': 'Control_Plane_In',\n 'remove': False\n },\n {\n 'policy_name': 'Control_Plane_In',\n 'remove': True\n }\n ]\n Returns:\n None\n Raises:\n SubCommandFailure: Failed configuring control plane policy\n\n ", + "module_name": "iosxe.control_plane.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_control_plane_control_plane_policy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/control_plane/configure.py#L11" + } + } + }, + "configure_control_policies": { + "folders": { + "iosxe": { + "doc": " Configure policy-map on an device\n\n Args:\n device (`obj`): Device object\n policy_name (`str`): name of the policy\n event (`str`,optional): event name, default value is None\n match (`str`,optional): match-all or match-first, default value is None\n class_number (`int`,optional): class number between 1 to 254, default value is None \n class_name (`str`,optional): class name if any exists, default value is None\n class_action (`str`,optional): class action to be perform, default value is None\n action_number (`int`,optional): action number between 1 to 254, default value is None\n action (`str`,optional): action to be perform under this class, default value is None\n action_method (`str`,optional): Mab or dot1x or webauth, default value is None\n auth_rest_timer ('int', optional): Authentication restart timer, default value is None\n template_name (`str`,optional): Template name, default value is None\n priority ('int', optional): Priority vlaue, default value is None\n dot1x_type (`str`,optional): Dot1 type. default value is None\n retries (`str`,optional): retries option. default value is None\n retry_time (`str`,optional): retry-time option. default value is None\n\n Returns:\n None\n\n Raises:\n SubCommandFailure\n ", + "module_name": "iosxe.interface.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_control_policies", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/interface/configure.py#L3449" + } + } + }, + "configure_controller_service_policy": { + "folders": { + "iosxe": { + "doc": " Configure mDNS(Multicast Domain Name System) controller service-policy\n \n mdns-sd controller service-policy contrl-policy\n service-list contrl-list3\n end\n \n Args:\n device ('obj'): device to use\n name ('str')\n service_list ('list'):\n\n Returns:\n None\n Raises:\n SubCommandFailure: Failed configuring mdns controller service-policy\n ", + "module_name": "iosxe.mdns.configure", + "package": "genie.libs.sdk.apis", + "tokens": { + "os": "iosxe" + }, + "uid": "configure_controller_service_policy", + "url": "https://github.com/CiscoTestAutomation/genielibs/tree/master/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/mdns/configure.py#L1361" + } + } + }, + "configure_crypto_ikev2_NAT_keepalive": { + "folders": { + "iosxe": { + "doc": " Configure crypto ikev2 nat keepalive