@itentialopensource/adapter-mockdevice 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "CORE-ATL-0",
3
+ "ipaddress": "10.0.1.31",
4
+ "port": "79999",
5
+ "ostype": "cisco-ios",
6
+ "current_state": 0,
7
+ "deleted" : false,
8
+ "online" : true,
9
+ "actions" : {
10
+ "reload" : {"action": "next_state"},
11
+ "reset" : {"action": "reset_state"},
12
+ "enable" : {"action": "turn_on"},
13
+ "disable" : {"action": "turn_off"}
14
+ },
15
+ "config": "Building configuration...\r\n\r\nCurrent configuration : 6625 bytes\r\n!\r\n! Last configuration change at 00:54:40 UTC Wed Sep 1 2021 by ec2-user\r\n! NVRAM config last updated at 00:54:40 UTC Wed Sep 1 2021 by ec2-user\r\n!\r\nversion 15.5\r\nservice tcp-keepalives-out\r\nservice timestamps debug datetime msec\r\nservice timestamps log datetime msec\r\nservice password-encryption\r\nservice compress-config\r\nno platform punt-keepalive disable-kernel-core\r\nplatform console virtual\r\n!\r\nhostname CORE-ATL-0\r\n!\r\nboot-start-marker\r\nboot system :\r\nboot-end-marker\r\n!\r\n!\r\nlogging persistent size 1000000 filesize 8192 immediate\r\n!\r\nno aaa new-model\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n\r\n\r\n\r\n!\r\n!\r\n!\r\nlogin on-success log\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\nsubscriber templating\r\n!\r\nmultilink bundle-name authenticated\r\n!\r\ncrypto pki trustpoint TP-self-signed-2651541731\r\n enrollment selfsigned\r\n subject-name cn=IOS-Self-Signed-Certificate-2651541731\r\n revocation-check none\r\n rsakeypair TP-self-signed-2651541731\r\n!\r\n!\r\ncrypto pki certificate chain TP-self-signed-2651541731\r\n certificate self-signed 01\r\n 3082022B 30820194 A0030201 02020101 300D0609 2A864886 F70D0101 05050030 \r\n 31312F30 2D060355 04031326 494F532D 53656C66 2D536967 6E65642D 43657274 \r\n 69666963 6174652D 32363531 35343137 3331301E 170D3138 30383239 31373033 \r\n 34385A17 0D323030 31303130 30303030 305A3031 312F302D 06035504 03132649 \r\n 4F532D53 656C662D 5369676E 65642D43 65727469 66696361 74652D32 36353135 \r\n 34313733 3130819F 300D0609 2A864886 F70D0101 01050003 818D0030 81890281 \r\n 8100B9C2 0B7AF6F6 BCDBAB55 7D9A0AFE D3214BC6 94F6DE34 5B68FD6E E145987F \r\n 81962C78 753604F1 0BEEA83A 3FBD3FBF 7A08C80B F40F0FB3 072E6C3F FD00EFAF \r\n 17A3E0E1 DFBEBB4D D8A2263A EB8E76FF 2BAF0244 6E112FF2 C04D6B74 B092AEDF \r\n A77CB023 7225D7C9 336BEED7 CC57B5D8 50B14AEF B969883B D6DC982E B5EF2D20 \r\n 0F230203 010001A3 53305130 0F060355 1D130101 FF040530 030101FF 301F0603 \r\n 551D2304 18301680 14339D5C 1D5A36EA 18E3D524 A591C436 192E40D5 D7301D06 \r\n 03551D0E 04160414 339D5C1D 5A36EA18 E3D524A5 91C43619 2E40D5D7 300D0609 \r\n 2A864886 F70D0101 05050003 81810082 A6B69F88 4291F345 AB0C706D FB685C3B \r\n BA29E96E B0777142 88A347A5 DDEAE3EE 941EE91F 1E538C0E DDA713ED A6486807 \r\n 6A9EE56C 8B8FBE33 9D57A5A8 33C4CE9B 2B678A44 341A0F40 AD30ED07 15BA63E4 \r\n 36690634 84F9EFEA 230B43D9 15E10002 0C43FC50 CB2FD50C A8A6516F 7F397E61 \r\n F2A0CBC2 A48E898E 19EE590F 99912D\r\n \tquit\r\nlicense udi pid CSR1000V sn 92QN4DDHCQA\r\n!\r\n!\r\nusername ec2-user privilege 15 secret 5 $1$NyT6$rLraHjnLXEDSjLIGmffux.\r\nusername cisco privilege 15 password 7 030752180500\r\n!\r\nredundancy\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\nip tcp window-size 8192\r\n! \r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\ninterface Loopback101\r\n description THIS IS A TEST LOOPBACK\r\n no ip address\r\n!\r\ninterface Loopback102\r\n description THIS IS A TEST LOOPBACK\r\n no ip address\r\n!\r\ninterface VirtualPortGroup0\r\n ip address 192.168.35.101 255.255.255.0\r\n ip nat inside\r\n!\r\ninterface GigabitEthernet1\r\n ip address dhcp\r\n ip nat outside\r\n negotiation auto\r\n!\r\ninterface GigabitEthernet1.1\r\n description reserved for dev1\r\n!\r\ninterface GigabitEthernet1.2\r\n description reserved for dev2\r\n!\r\ninterface GigabitEthernet1.3\r\n description reserved for dev3\r\n encapsulation dot1Q 3 second-dot1q 10-200\r\n ip address 30.0.144.0 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.4\r\n description reserved!\r\n encapsulation dot1Q 4 second-dot1q 100-200\r\n ip address 40.2.142.40 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.7\r\n description Test\r\n encapsulation dot1Q 7 second-dot1q 10-200\r\n ip address 1.1.1.1 255.255.255.0\r\n!\r\ninterface GigabitEthernet1.12\r\n description TEST\r\n encapsulation dot1Q 12 second-dot1q 100-200\r\n ip address 40.0.142.40 255.255.255.0\r\n!\r\ninterface GigabitEthernet1.16\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 16 second-dot1q 10-200\r\n ip address 40.0.144.62 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.17\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 17 second-dot1q 10-200\r\n ip address 40.0.144.68 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.18\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 18 second-dot1q 10-200\r\n ip address 40.0.144.70 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.19\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 19 second-dot1q 10-200\r\n ip address 40.0.144.80 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.20\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 20 second-dot1q 10-200\r\n ip address 40.0.144.90 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.21\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 21 second-dot1q 10-200\r\n ip address 40.0.144.92 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.22\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 22 second-dot1q 10-200\r\n ip address 40.0.144.122 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.24\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 24 second-dot1q 10-200\r\n ip address 40.0.144.126 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.25\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 25 second-dot1q 10-200\r\n ip address 40.0.144.134 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.26\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 26 second-dot1q 10-200\r\n ip address 40.0.144.138 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.27\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 27 second-dot1q 10-200\r\n ip address 40.0.144.140 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.100\r\n description lab\r\n!\r\ninterface GigabitEthernet1.518\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 518 second-dot1q 10-200\r\n ip address 30.0.148.0 255.255.255.254\r\n!\r\n!\r\nvirtual-service csr_mgmt\r\n ip shared host-interface GigabitEthernet1\r\n activate\r\n!\r\nip forward-protocol nd\r\n!\r\nno ip http server\r\nip http authentication local\r\nip http secure-server\r\nip ssh rsa keypair-name ssh-key\r\nip ssh version 2\r\nip ssh pubkey-chain\r\n username ec2-user\r\n key-hash ssh-rsa AB6694819452140F2AABB48553919F78 ec2-user\r\n!\r\nip access-list standard GQ_NAT_ACL\r\n permit 192.168.36.0 0.0.0.255\r\nip access-list standard GS_NAT_ACL\r\n permit 192.168.35.0 0.0.0.255\r\n!\r\nip access-list extended ALLOW-FROM-CORPIT-TO-ANY\r\n permit ip 10.10.10.0 0.0.0.255 any\r\n deny ip any any\r\nip access-list extended ALLOW_CORPIT\r\n!\r\naccess-list 4 permit 144.133.188.232\r\naccess-list 4 permit 144.133.188.237\r\naccess-list 4 permit 144.133.188.239\r\naccess-list 4 permit 144.133.188.231\r\naccess-list 4 permit 192.168.10.200\r\naccess-list 4 permit 14.126.166.12\r\naccess-list 4 permit 10.126.166.15\r\naccess-list 4 permit 10.126.166.12\r\n!\r\nsnmp-server location itential-snmk\r\n!\r\n!\r\ncontrol-plane\r\n!\r\nbanner motd ^Ces^C\r\n!\r\nline con 0\r\n stopbits 1\r\nline vty 0 4\r\n login local\r\n transport input ssh\r\n!\r\nntp server pool.ntp.org minpoll 10\r\nntp server ntp.itential.io\r\n!\r\nend",
16
+ "states" : [
17
+ {
18
+ "show ver": "Cisco IOS XE Software, Version 03.16.04a.S - Extended Support Release\r\nCisco IOS Software, CSR1000V Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 15.5(3)S4a, RELEASE SOFTWARE (fc1)\r\nTechnical Support: http:\/\/www.cisco.com\/techsupport\r\nCopyright (c) 1986-2016 by Cisco Systems, Inc.\r\nCompiled Tue 04-Oct-16 07:07 by mcpre\r\n\r\n\r\nCisco IOS-XE software, Copyright (c) 2005-2016 by cisco Systems, Inc.\r\nAll rights reserved. Certain components of Cisco IOS-XE software are\r\nlicensed under the GNU General Public License (\"GPL\") Version 2.0. The\r\nsoftware code licensed under GPL Version 2.0 is free software that comes\r\nwith ABSOLUTELY NO WARRANTY. You can redistribute and\/or modify such\r\nGPL code under the terms of GPL Version 2.0. For more details, see the\r\ndocumentation or \"License Notice\" file accompanying the IOS-XE software,\r\nor the applicable URL provided on the flyer accompanying the IOS-XE\r\nsoftware.\r\n\r\n\r\nROM: IOS-XE ROMMON\r\n\r\nCORE-ATL-0 uptime is 1 year, 17 weeks, 0 minutes\r\nUptime for this control processor is 1 year, 17 weeks, 6 minutes\r\nSystem returned to ROM by reload\r\nSystem restarted at 17:50:07 UTC Mon May 11 2020\r\nSystem image file is \"bootflash:packages.conf\"\r\nLast reload reason: <NULL>\r\n\r\n\r\n\r\nThis product contains cryptographic features and is subject to United\r\nStates and local country laws governing import, export, transfer and\r\nuse. Delivery of Cisco cryptographic products does not imply\r\nthird-party authority to import, export, distribute or use encryption.\r\nImporters, exporters, distributors and users are responsible for\r\ncompliance with U.S. and local country laws. By using this product you\r\nagree to comply with applicable laws and regulations. If you are unable\r\nto comply with U.S. and local laws, return this product immediately.\r\n\r\nA summary of U.S. laws governing Cisco cryptographic products may be found at:\r\nhttp:\/\/www.cisco.com\/wwl\/export\/crypto\/tool\/stqrg.html\r\n\r\nIf you require further assistance please contact us by sending email to\r\nexport@cisco.com.\r\n\r\nLicense Level: security\r\nLicense Type: Default. No valid license found.\r\nNext reload license Level: security\r\n\r\ncisco CSR1000V (VXE) processor (revision VXE) with 1672614K\/6147K bytes of memory.\r\nProcessor board ID 92QN4DDHCQA\r\n1 Gigabit Ethernet interface\r\n32768K bytes of non-volatile configuration memory.\r\n3603668K bytes of physical memory.\r\n7774207K bytes of virtual hard disk at bootflash:.\r\n\r\nConfiguration register is 0x2102",
19
+ "show running config" : "Building configuration...\r\n\r\nCurrent configuration : 6625 bytes\r\n!\r\n! Last configuration change at 00:54:40 UTC Wed Sep 1 2021 by ec2-user\r\n! NVRAM config last updated at 00:54:40 UTC Wed Sep 1 2021 by ec2-user\r\n!\r\nversion 15.5\r\nservice tcp-keepalives-out\r\nservice timestamps debug datetime msec\r\nservice timestamps log datetime msec\r\nservice password-encryption\r\nservice compress-config\r\nno platform punt-keepalive disable-kernel-core\r\nplatform console virtual\r\n!\r\nhostname CORE-ATL-0\r\n!\r\nboot-start-marker\r\nboot system :\r\nboot-end-marker\r\n!\r\n!\r\nlogging persistent size 1000000 filesize 8192 immediate\r\n!\r\nno aaa new-model\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n\r\n\r\n\r\n!\r\n!\r\n!\r\nlogin on-success log\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\nsubscriber templating\r\n!\r\nmultilink bundle-name authenticated\r\n!\r\ncrypto pki trustpoint TP-self-signed-2651541731\r\n enrollment selfsigned\r\n subject-name cn=IOS-Self-Signed-Certificate-2651541731\r\n revocation-check none\r\n rsakeypair TP-self-signed-2651541731\r\n!\r\n!\r\ncrypto pki certificate chain TP-self-signed-2651541731\r\n certificate self-signed 01\r\n 3082022B 30820194 A0030201 02020101 300D0609 2A864886 F70D0101 05050030 \r\n 31312F30 2D060355 04031326 494F532D 53656C66 2D536967 6E65642D 43657274 \r\n 69666963 6174652D 32363531 35343137 3331301E 170D3138 30383239 31373033 \r\n 34385A17 0D323030 31303130 30303030 305A3031 312F302D 06035504 03132649 \r\n 4F532D53 656C662D 5369676E 65642D43 65727469 66696361 74652D32 36353135 \r\n 34313733 3130819F 300D0609 2A864886 F70D0101 01050003 818D0030 81890281 \r\n 8100B9C2 0B7AF6F6 BCDBAB55 7D9A0AFE D3214BC6 94F6DE34 5B68FD6E E145987F \r\n 81962C78 753604F1 0BEEA83A 3FBD3FBF 7A08C80B F40F0FB3 072E6C3F FD00EFAF \r\n 17A3E0E1 DFBEBB4D D8A2263A EB8E76FF 2BAF0244 6E112FF2 C04D6B74 B092AEDF \r\n A77CB023 7225D7C9 336BEED7 CC57B5D8 50B14AEF B969883B D6DC982E B5EF2D20 \r\n 0F230203 010001A3 53305130 0F060355 1D130101 FF040530 030101FF 301F0603 \r\n 551D2304 18301680 14339D5C 1D5A36EA 18E3D524 A591C436 192E40D5 D7301D06 \r\n 03551D0E 04160414 339D5C1D 5A36EA18 E3D524A5 91C43619 2E40D5D7 300D0609 \r\n 2A864886 F70D0101 05050003 81810082 A6B69F88 4291F345 AB0C706D FB685C3B \r\n BA29E96E B0777142 88A347A5 DDEAE3EE 941EE91F 1E538C0E DDA713ED A6486807 \r\n 6A9EE56C 8B8FBE33 9D57A5A8 33C4CE9B 2B678A44 341A0F40 AD30ED07 15BA63E4 \r\n 36690634 84F9EFEA 230B43D9 15E10002 0C43FC50 CB2FD50C A8A6516F 7F397E61 \r\n F2A0CBC2 A48E898E 19EE590F 99912D\r\n \tquit\r\nlicense udi pid CSR1000V sn 92QN4DDHCQA\r\n!\r\n!\r\nusername ec2-user privilege 15 secret 5 $1$NyT6$rLraHjnLXEDSjLIGmffux.\r\nusername cisco privilege 15 password 7 030752180500\r\n!\r\nredundancy\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\nip tcp window-size 8192\r\n! \r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\ninterface Loopback101\r\n description THIS IS A TEST LOOPBACK\r\n no ip address\r\n!\r\ninterface Loopback102\r\n description THIS IS A TEST LOOPBACK\r\n no ip address\r\n!\r\ninterface VirtualPortGroup0\r\n ip address 192.168.35.101 255.255.255.0\r\n ip nat inside\r\n!\r\ninterface GigabitEthernet1\r\n ip address dhcp\r\n ip nat outside\r\n negotiation auto\r\n!\r\ninterface GigabitEthernet1.1\r\n description reserved for dev1\r\n!\r\ninterface GigabitEthernet1.2\r\n description reserved for dev2\r\n!\r\ninterface GigabitEthernet1.3\r\n description reserved for dev3\r\n encapsulation dot1Q 3 second-dot1q 10-200\r\n ip address 30.0.144.0 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.4\r\n description reserved!\r\n encapsulation dot1Q 4 second-dot1q 100-200\r\n ip address 40.2.142.40 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.7\r\n description Test\r\n encapsulation dot1Q 7 second-dot1q 10-200\r\n ip address 1.1.1.1 255.255.255.0\r\n!\r\ninterface GigabitEthernet1.12\r\n description TEST\r\n encapsulation dot1Q 12 second-dot1q 100-200\r\n ip address 40.0.142.40 255.255.255.0\r\n!\r\ninterface GigabitEthernet1.16\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 16 second-dot1q 10-200\r\n ip address 40.0.144.62 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.17\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 17 second-dot1q 10-200\r\n ip address 40.0.144.68 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.18\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 18 second-dot1q 10-200\r\n ip address 40.0.144.70 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.19\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 19 second-dot1q 10-200\r\n ip address 40.0.144.80 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.20\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 20 second-dot1q 10-200\r\n ip address 40.0.144.90 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.21\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 21 second-dot1q 10-200\r\n ip address 40.0.144.92 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.22\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 22 second-dot1q 10-200\r\n ip address 40.0.144.122 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.24\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 24 second-dot1q 10-200\r\n ip address 40.0.144.126 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.25\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 25 second-dot1q 10-200\r\n ip address 40.0.144.134 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.26\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 26 second-dot1q 10-200\r\n ip address 40.0.144.138 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.27\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 27 second-dot1q 10-200\r\n ip address 40.0.144.140 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.100\r\n description lab\r\n!\r\ninterface GigabitEthernet1.518\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 518 second-dot1q 10-200\r\n ip address 30.0.148.0 255.255.255.254\r\n!\r\n!\r\nvirtual-service csr_mgmt\r\n ip shared host-interface GigabitEthernet1\r\n activate\r\n!\r\nip forward-protocol nd\r\n!\r\nno ip http server\r\nip http authentication local\r\nip http secure-server\r\nip ssh rsa keypair-name ssh-key\r\nip ssh version 2\r\nip ssh pubkey-chain\r\n username ec2-user\r\n key-hash ssh-rsa AB6694819452140F2AABB48553919F78 ec2-user\r\n!\r\nip access-list standard GQ_NAT_ACL\r\n permit 192.168.36.0 0.0.0.255\r\nip access-list standard GS_NAT_ACL\r\n permit 192.168.35.0 0.0.0.255\r\n!\r\nip access-list extended ALLOW-FROM-CORPIT-TO-ANY\r\n permit ip 10.10.10.0 0.0.0.255 any\r\n deny ip any any\r\nip access-list extended ALLOW_CORPIT\r\n!\r\naccess-list 4 permit 144.133.188.232\r\naccess-list 4 permit 144.133.188.237\r\naccess-list 4 permit 144.133.188.239\r\naccess-list 4 permit 144.133.188.231\r\naccess-list 4 permit 192.168.10.200\r\naccess-list 4 permit 14.126.166.12\r\naccess-list 4 permit 10.126.166.15\r\naccess-list 4 permit 10.126.166.12\r\n!\r\nsnmp-server location itential-snmk\r\n!\r\n!\r\ncontrol-plane\r\n!\r\nbanner motd ^Ces^C\r\n!\r\nline con 0\r\n stopbits 1\r\nline vty 0 4\r\n login local\r\n transport input ssh\r\n!\r\nntp server pool.ntp.org minpoll 10\r\nntp server ntp.itential.io\r\n!\r\nend",
20
+ "show ip int br" : "Interface IP-Address OK? Method Status Protocol\r\nGigabitEthernet1 10.11.1.222 YES DHCP up up \r\nGigabitEthernet1.1 unassigned YES manual up up \r\nGigabitEthernet1.2 unassigned YES manual up up \r\nGigabitEthernet1.3 30.0.144.0 YES manual up up \r\nGigabitEthernet1.4 40.2.142.40 YES manual up up \r\nGigabitEthernet1.5 unassigned YES manual deleted down \r\nGigabitEthernet1.6 unassigned YES manual deleted down \r\nGigabitEthernet1.7 1.1.1.1 YES manual up up \r\nGigabitEthernet1.8 unassigned YES manual deleted down \r\nGigabitEthernet1.9 unassigned YES manual deleted down \r\nGigabitEthernet1.10 unassigned YES manual deleted down \r\nGigabitEthernet1.11 unassigned YES manual deleted down \r\nGigabitEthernet1.12 40.0.142.40 YES manual up up \r\nGigabitEthernet1.13 unassigned YES manual deleted down \r\nGigabitEthernet1.14 unassigned YES manual deleted down \r\nGigabitEthernet1.15 unassigned YES manual deleted down \r\nGigabitEthernet1.16 40.0.144.62 YES manual up up \r\nGigabitEthernet1.17 40.0.144.68 YES manual up up \r\nGigabitEthernet1.18 40.0.144.70 YES manual up up \r\nGigabitEthernet1.19 40.0.144.80 YES manual up up \r\nGigabitEthernet1.20 40.0.144.90 YES manual up up \r\nGigabitEthernet1.21 40.0.144.92 YES manual up up \r\nGigabitEthernet1.22 40.0.144.122 YES manual up up \r\nGigabitEthernet1.23 unassigned YES manual deleted down \r\nGigabitEthernet1.24 40.0.144.126 YES manual up up \r\nGigabitEthernet1.25 40.0.144.134 YES manual up up \r\nGigabitEthernet1.26 40.0.144.138 YES manual up up \r\nGigabitEthernet1.27 40.0.144.140 YES manual up up \r\nGigabitEthernet1.28 unassigned YES manual deleted down \r\nGigabitEthernet1.29 unassigned YES manual deleted down \r\nGigabitEthernet1.31 unassigned YES manual deleted down \r\nGigabitEthernet1.32 unassigned YES manual deleted down \r\nGigabitEthernet1.33 unassigned YES manual deleted down \r\nGigabitEthernet1.34 unassigned YES manual deleted down \r\nGigabitEthernet1.35 unassigned YES manual deleted down \r\nGigabitEthernet1.36 unassigned YES manual deleted down \r\nGigabitEthernet1.37 unassigned YES manual deleted down \r\nGigabitEthernet1.38 unassigned YES manual deleted down \r\nGigabitEthernet1.39 unassigned YES manual deleted down \r\nGigabitEthernet1.40 unassigned YES manual deleted down \r\nGigabitEthernet1.41 unassigned YES manual deleted down \r\nGigabitEthernet1.42 unassigned YES manual deleted down \r\nGigabitEthernet1.43 unassigned YES manual deleted down \r\nGigabitEthernet1.44 unassigned YES manual deleted down \r\nGigabitEthernet1.45 unassigned YES manual deleted down \r\nGigabitEthernet1.46 unassigned YES manual deleted down \r\nGigabitEthernet1.47 unassigned YES manual deleted down \r\nGigabitEthernet1.48 unassigned YES manual deleted down \r\nGigabitEthernet1.49 unassigned YES manual deleted down \r\nGigabitEthernet1.50 unassigned YES manual deleted down \r\nGigabitEthernet1.51 unassigned YES manual deleted down \r\nGigabitEthernet1.52 unassigned YES manual deleted down \r\nGigabitEthernet1.53 unassigned YES manual deleted down \r\nGigabitEthernet1.54 unassigned YES manual deleted down \r\nGigabitEthernet1.55 unassigned YES manual deleted down \r\nGigabitEthernet1.56 unassigned YES manual deleted down \r\nGigabitEthernet1.57 unassigned YES manual deleted down \r\nGigabitEthernet1.58 unassigned YES manual deleted down \r\nGigabitEthernet1.59 unassigned YES manual deleted down \r\nGigabitEthernet1.61 unassigned YES manual deleted down \r\nGigabitEthernet1.63 unassigned YES manual deleted down \r\nGigabitEthernet1.64 unassigned YES manual deleted down \r\nGigabitEthernet1.65 unassigned YES manual deleted down \r\nGigabitEthernet1.66 unassigned YES manual deleted down \r\nGigabitEthernet1.67 unassigned YES manual deleted down \r\nGigabitEthernet1.68 unassigned YES manual deleted down \r\nGigabitEthernet1.69 unassigned YES manual deleted down \r\nGigabitEthernet1.70 unassigned YES manual deleted down \r\nGigabitEthernet1.73 unassigned YES manual deleted down \r\nGigabitEthernet1.74 unassigned YES manual deleted down \r\nGigabitEthernet1.75 unassigned YES manual deleted down \r\nGigabitEthernet1.76 unassigned YES manual deleted down \r\nGigabitEthernet1.77 unassigned YES manual deleted down \r\nGigabitEthernet1.78 unassigned YES manual deleted down \r\nGigabitEthernet1.84 unassigned YES manual deleted down \r\nGigabitEthernet1.85 unassigned YES manual deleted down \r\nGigabitEthernet1.86 unassigned YES manual deleted down \r\nGigabitEthernet1.87 unassigned YES manual deleted down \r\nGigabitEthernet1.88 unassigned YES manual deleted down \r\nGigabitEthernet1.95 unassigned YES manual deleted down \r\nGigabitEthernet1.100 unassigned YES manual up up \r\nGigabitEthernet1.518 30.0.148.0 YES manual up up \r\nLoopback101 unassigned YES unset up up \r\nLoopback102 unassigned YES unset up up \r\nVirtualPortGroup0 192.168.35.101 YES manual down down",
21
+ "show license" : "Index 1 Feature: security\nIndex 2 Feature: internal_service",
22
+ "show clock" : "17:50:57.029 UTC Tue Sep 7 2021",
23
+ "show ntp status" : "Clock is synchronized, stratum 4, reference is 4.53.160.75 \r\nnominal freq is 250.0000 Hz, actual freq is 249.9993 Hz, precision is 2**10\r\nntp uptime is 4181760600 (1\/100 of seconds), resolution is 4016\r\nreference time is E4E22279.404189E8 (17:40:09.251 UTC Tue Sep 7 2021)\r\nclock offset is 1.5660 msec, root delay is 53.47 msec\r\nroot dispersion is 116.11 msec, peer dispersion is 20.62 msec\r\nloopfilter state is 'CTRL' (Normal Controlled Loop), drift is 0.000002619 s\/s\r\nsystem poll interval is 1024, last update was 648 sec ago.",
24
+ "show memory statistics" : " Head Total(b) Used(b) Free(b) Lowest(b) Largest(b)\r\nProcessor 7F6A6B8F0010 1712527552 238609640 1473917912 1440257872 921904364\r\n lsmpi_io 7F6A2F2EE1A8 6295128 6294304 824 824 412",
25
+ "show logging" : "Syslog logging: enabled (0 messages dropped, 2 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled)\r\n\r\nNo Active Message Discriminator.\r\n\r\n\r\n\r\nNo Inactive Message Discriminator.\r\n\r\n\r\n Console logging: level debugging, 4103 messages logged, xml disabled,\r\n filtering disabled\r\n Monitor logging: level debugging, 0 messages logged, xml disabled,\r\n filtering disabled\r\n Buffer logging: level debugging, 4103 messages logged, xml disabled,\r\n filtering disabled\r\n Exception Logging: size (4096 bytes)\r\n Count and timestamp logging messages: disabled\r\n Persistent logging: enabled, url bootflash:\/syslog, disk space 1000000 bytes, file size 8192 bytes, batch size 4096 bytes, threshold capacity 0 , immediate \r\n\r\nNo active filter modules.\r\n\r\n Trap logging: level informational, 4105 message lines logged\r\n Logging Source-Interface: VRF Name:\r\n\r\nLog Buffer (4096 bytes):\r\n1.119)\r\nSep 7 11:11:09.071: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 11:11:09 UTC Tue Sep 7 2021\r\nSep 7 11:11:40.157: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 13:13:01.578: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 13:13:01 UTC Tue Sep 7 2021\r\nSep 7 13:13:32.159: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 13:17:03.385: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 13:17:03 UTC Tue Sep 7 2021\r\nSep 7 13:17:49.159: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 13:21:52.411: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 13:21:52 UTC Tue Sep 7 2021\r\nSep 7 13:22:23.159: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 13:22:25.214: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 13:22:25 UTC Tue Sep 7 2021\r\nSep 7 13:22:56.158: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 14:12:29.946: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 14:12:29 UTC Tue Sep 7 2021\r\nSep 7 14:13:16.159: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 14:20:45.025: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 14:20:45 UTC Tue Sep 7 2021\r\nSep 7 14:21:16.159: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 14:21:17.867: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 14:21:17 UTC Tue Sep 7 2021\r\nSep 7 14:21:49.159: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 14:29:02.582: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 14:29:02 UTC Tue Sep 7 2021\r\nSep 7 14:29:57.158: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 14:34:51.970: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 14:34:51 UTC Tue Sep 7 2021\r\nSep 7 14:35:23.158: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 14:35:49.048: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 14:35:49 UTC Tue Sep 7 2021\r\nSep 7 14:36:20.159: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 15:04:22.348: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 15:04:22 UTC Tue Sep 7 2021\r\nSep 7 15:04:23.048: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 15:04:23 UTC Tue Sep 7 2021\r\nSep 7 15:04:53.159: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 16:34:19.443: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 16:34:19 UTC Tue Sep 7 2021\r\nSep 7 16:34:50.160: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 16:34:55.192: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 16:34:55 UTC Tue Sep 7 2021\r\nSep 7 16:35:26.155: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 16:38:38.109: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 16:38:38 UTC Tue Sep 7 2021\r\nSep 7 16:39:09.157: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 16:39:14.494: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 16:39:14 UTC Tue Sep 7 2021\r\nSep 7 16:39:45.156: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 17:50:52.667: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 17:50:52 UTC Tue Sep 7 2021"
26
+ },
27
+ {
28
+ "show ver": "Cisco IOS XE Software, Version 03.17.04a.S - Extended Support Release\r\nCisco IOS Software, CSR1000V Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 15.5(3)S4a, RELEASE SOFTWARE (fc1)\r\nTechnical Support: http:\/\/www.cisco.com\/techsupport\r\nCopyright (c) 1986-2016 by Cisco Systems, Inc.\r\nCompiled Tue 04-Oct-16 07:07 by mcpre\r\n\r\n\r\nCisco IOS-XE software, Copyright (c) 2005-2016 by cisco Systems, Inc.\r\nAll rights reserved. Certain components of Cisco IOS-XE software are\r\nlicensed under the GNU General Public License (\"GPL\") Version 2.0. The\r\nsoftware code licensed under GPL Version 2.0 is free software that comes\r\nwith ABSOLUTELY NO WARRANTY. You can redistribute and\/or modify such\r\nGPL code under the terms of GPL Version 2.0. For more details, see the\r\ndocumentation or \"License Notice\" file accompanying the IOS-XE software,\r\nor the applicable URL provided on the flyer accompanying the IOS-XE\r\nsoftware.\r\n\r\n\r\nROM: IOS-XE ROMMON\r\n\r\nCORE-ATL-0 uptime is 1 year, 17 weeks, 0 minutes\r\nUptime for this control processor is 1 year, 17 weeks, 6 minutes\r\nSystem returned to ROM by reload\r\nSystem restarted at 17:50:07 UTC Mon May 11 2020\r\nSystem image file is \"bootflash:packages.conf\"\r\nLast reload reason: <NULL>\r\n\r\n\r\n\r\nThis product contains cryptographic features and is subject to United\r\nStates and local country laws governing import, export, transfer and\r\nuse. Delivery of Cisco cryptographic products does not imply\r\nthird-party authority to import, export, distribute or use encryption.\r\nImporters, exporters, distributors and users are responsible for\r\ncompliance with U.S. and local country laws. By using this product you\r\nagree to comply with applicable laws and regulations. If you are unable\r\nto comply with U.S. and local laws, return this product immediately.\r\n\r\nA summary of U.S. laws governing Cisco cryptographic products may be found at:\r\nhttp:\/\/www.cisco.com\/wwl\/export\/crypto\/tool\/stqrg.html\r\n\r\nIf you require further assistance please contact us by sending email to\r\nexport@cisco.com.\r\n\r\nLicense Level: security\r\nLicense Type: Default. No valid license found.\r\nNext reload license Level: security\r\n\r\ncisco CSR1000V (VXE) processor (revision VXE) with 1672614K\/6147K bytes of memory.\r\nProcessor board ID 92QN4DDHCQA\r\n1 Gigabit Ethernet interface\r\n32768K bytes of non-volatile configuration memory.\r\n3603668K bytes of physical memory.\r\n7774207K bytes of virtual hard disk at bootflash:.\r\n\r\nConfiguration register is 0x2102",
29
+ "show running config" : "Building configuration...\r\n\r\nCurrent configuration : 6625 bytes\r\n!\r\n! Last configuration change at 00:54:40 UTC Wed Sep 1 2021 by ec2-user\r\n! NVRAM config last updated at 00:54:40 UTC Wed Sep 1 2021 by ec2-user\r\n!\r\nversion 15.5\r\nservice tcp-keepalives-out\r\nservice timestamps debug datetime msec\r\nservice timestamps log datetime msec\r\nservice password-encryption\r\nservice compress-config\r\nno platform punt-keepalive disable-kernel-core\r\nplatform console virtual\r\n!\r\nhostname CORE-ATL-0\r\n!\r\nboot-start-marker\r\nboot system :\r\nboot-end-marker\r\n!\r\n!\r\nlogging persistent size 1000000 filesize 8192 immediate\r\n!\r\nno aaa new-model\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n\r\n\r\n\r\n!\r\n!\r\n!\r\nlogin on-success log\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\nsubscriber templating\r\n!\r\nmultilink bundle-name authenticated\r\n!\r\ncrypto pki trustpoint TP-self-signed-2651541731\r\n enrollment selfsigned\r\n subject-name cn=IOS-Self-Signed-Certificate-2651541731\r\n revocation-check none\r\n rsakeypair TP-self-signed-2651541731\r\n!\r\n!\r\ncrypto pki certificate chain TP-self-signed-2651541731\r\n certificate self-signed 01\r\n 3082022B 30820194 A0030201 02020101 300D0609 2A864886 F70D0101 05050030 \r\n 31312F30 2D060355 04031326 494F532D 53656C66 2D536967 6E65642D 43657274 \r\n 69666963 6174652D 32363531 35343137 3331301E 170D3138 30383239 31373033 \r\n 34385A17 0D323030 31303130 30303030 305A3031 312F302D 06035504 03132649 \r\n 4F532D53 656C662D 5369676E 65642D43 65727469 66696361 74652D32 36353135 \r\n 34313733 3130819F 300D0609 2A864886 F70D0101 01050003 818D0030 81890281 \r\n 8100B9C2 0B7AF6F6 BCDBAB55 7D9A0AFE D3214BC6 94F6DE34 5B68FD6E E145987F \r\n 81962C78 753604F1 0BEEA83A 3FBD3FBF 7A08C80B F40F0FB3 072E6C3F FD00EFAF \r\n 17A3E0E1 DFBEBB4D D8A2263A EB8E76FF 2BAF0244 6E112FF2 C04D6B74 B092AEDF \r\n A77CB023 7225D7C9 336BEED7 CC57B5D8 50B14AEF B969883B D6DC982E B5EF2D20 \r\n 0F230203 010001A3 53305130 0F060355 1D130101 FF040530 030101FF 301F0603 \r\n 551D2304 18301680 14339D5C 1D5A36EA 18E3D524 A591C436 192E40D5 D7301D06 \r\n 03551D0E 04160414 339D5C1D 5A36EA18 E3D524A5 91C43619 2E40D5D7 300D0609 \r\n 2A864886 F70D0101 05050003 81810082 A6B69F88 4291F345 AB0C706D FB685C3B \r\n BA29E96E B0777142 88A347A5 DDEAE3EE 941EE91F 1E538C0E DDA713ED A6486807 \r\n 6A9EE56C 8B8FBE33 9D57A5A8 33C4CE9B 2B678A44 341A0F40 AD30ED07 15BA63E4 \r\n 36690634 84F9EFEA 230B43D9 15E10002 0C43FC50 CB2FD50C A8A6516F 7F397E61 \r\n F2A0CBC2 A48E898E 19EE590F 99912D\r\n \tquit\r\nlicense udi pid CSR1000V sn 92QN4DDHCQA\r\n!\r\n!\r\nusername ec2-user privilege 15 secret 5 $1$NyT6$rLraHjnLXEDSjLIGmffux.\r\nusername cisco privilege 15 password 7 030752180500\r\n!\r\nredundancy\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\nip tcp window-size 8192\r\n! \r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\ninterface Loopback101\r\n description THIS IS A TEST LOOPBACK\r\n no ip address\r\n!\r\ninterface Loopback102\r\n description THIS IS A TEST LOOPBACK\r\n no ip address\r\n!\r\ninterface VirtualPortGroup0\r\n ip address 192.168.35.101 255.255.255.0\r\n ip nat inside\r\n!\r\ninterface GigabitEthernet1\r\n ip address dhcp\r\n ip nat outside\r\n negotiation auto\r\n!\r\ninterface GigabitEthernet1.1\r\n description reserved for dev1\r\n!\r\ninterface GigabitEthernet1.2\r\n description reserved for dev2\r\n!\r\ninterface GigabitEthernet1.3\r\n description reserved for dev3\r\n encapsulation dot1Q 3 second-dot1q 10-200\r\n ip address 30.0.144.0 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.4\r\n description reserved!\r\n encapsulation dot1Q 4 second-dot1q 100-200\r\n ip address 40.2.142.40 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.7\r\n description Test\r\n encapsulation dot1Q 7 second-dot1q 10-200\r\n ip address 1.1.1.1 255.255.255.0\r\n!\r\ninterface GigabitEthernet1.12\r\n description TEST\r\n encapsulation dot1Q 12 second-dot1q 100-200\r\n ip address 40.0.142.40 255.255.255.0\r\n!\r\ninterface GigabitEthernet1.16\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 16 second-dot1q 10-200\r\n ip address 40.0.144.62 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.17\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 17 second-dot1q 10-200\r\n ip address 40.0.144.68 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.18\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 18 second-dot1q 10-200\r\n ip address 40.0.144.70 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.19\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 19 second-dot1q 10-200\r\n ip address 40.0.144.80 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.20\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 20 second-dot1q 10-200\r\n ip address 40.0.144.90 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.21\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 21 second-dot1q 10-200\r\n ip address 40.0.144.92 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.22\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 22 second-dot1q 10-200\r\n ip address 40.0.144.122 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.24\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 24 second-dot1q 10-200\r\n ip address 40.0.144.126 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.25\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 25 second-dot1q 10-200\r\n ip address 40.0.144.134 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.26\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 26 second-dot1q 10-200\r\n ip address 40.0.144.138 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.27\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 27 second-dot1q 10-200\r\n ip address 40.0.144.140 255.255.255.254\r\n!\r\ninterface GigabitEthernet1.100\r\n description lab\r\n!\r\ninterface GigabitEthernet1.518\r\n description Port Turn Up Request from Itential\r\n encapsulation dot1Q 518 second-dot1q 10-200\r\n ip address 30.0.148.0 255.255.255.254\r\n!\r\n!\r\nvirtual-service csr_mgmt\r\n ip shared host-interface GigabitEthernet1\r\n activate\r\n!\r\nip forward-protocol nd\r\n!\r\nno ip http server\r\nip http authentication local\r\nip http secure-server\r\nip ssh rsa keypair-name ssh-key\r\nip ssh version 2\r\nip ssh pubkey-chain\r\n username ec2-user\r\n key-hash ssh-rsa AB6694819452140F2AABB48553919F78 ec2-user\r\n!\r\nip access-list standard GQ_NAT_ACL\r\n permit 192.168.36.0 0.0.0.255\r\nip access-list standard GS_NAT_ACL\r\n permit 192.168.35.0 0.0.0.255\r\n!\r\nip access-list extended ALLOW-FROM-CORPIT-TO-ANY\r\n permit ip 10.10.10.0 0.0.0.255 any\r\n deny ip any any\r\nip access-list extended ALLOW_CORPIT\r\n!\r\naccess-list 4 permit 144.133.188.232\r\naccess-list 4 permit 144.133.188.237\r\naccess-list 4 permit 144.133.188.239\r\naccess-list 4 permit 144.133.188.231\r\naccess-list 4 permit 192.168.10.200\r\naccess-list 4 permit 14.126.166.12\r\naccess-list 4 permit 10.126.166.15\r\naccess-list 4 permit 10.126.166.12\r\n!\r\nsnmp-server location itential-snmk\r\n!\r\n!\r\ncontrol-plane\r\n!\r\nbanner motd ^Ces^C\r\n!\r\nline con 0\r\n stopbits 1\r\nline vty 0 4\r\n login local\r\n transport input ssh\r\n!\r\nntp server pool.ntp.org minpoll 10\r\nntp server ntp.itential.io\r\n!\r\nend",
30
+ "show ip int br" : "Interface IP-Address OK? Method Status Protocol\r\nGigabitEthernet1 10.11.1.222 YES DHCP up up \r\nGigabitEthernet1.1 unassigned YES manual up up \r\nGigabitEthernet1.2 unassigned YES manual up up \r\nGigabitEthernet1.3 30.0.144.0 YES manual up up \r\nGigabitEthernet1.4 40.2.142.40 YES manual up up \r\nGigabitEthernet1.5 unassigned YES manual deleted down \r\nGigabitEthernet1.6 unassigned YES manual deleted down \r\nGigabitEthernet1.7 1.1.1.1 YES manual up up \r\nGigabitEthernet1.8 unassigned YES manual deleted down \r\nGigabitEthernet1.9 unassigned YES manual deleted down \r\nGigabitEthernet1.10 unassigned YES manual deleted down \r\nGigabitEthernet1.11 unassigned YES manual deleted down \r\nGigabitEthernet1.12 40.0.142.40 YES manual up up \r\nGigabitEthernet1.13 unassigned YES manual deleted down \r\nGigabitEthernet1.14 unassigned YES manual deleted down \r\nGigabitEthernet1.15 unassigned YES manual deleted down \r\nGigabitEthernet1.16 40.0.144.62 YES manual up up \r\nGigabitEthernet1.17 40.0.144.68 YES manual up up \r\nGigabitEthernet1.18 40.0.144.70 YES manual up up \r\nGigabitEthernet1.19 40.0.144.80 YES manual up up \r\nGigabitEthernet1.20 40.0.144.90 YES manual up up \r\nGigabitEthernet1.21 40.0.144.92 YES manual up up \r\nGigabitEthernet1.22 40.0.144.122 YES manual up up \r\nGigabitEthernet1.23 unassigned YES manual deleted down \r\nGigabitEthernet1.24 40.0.144.126 YES manual up up \r\nGigabitEthernet1.25 40.0.144.134 YES manual up up \r\nGigabitEthernet1.26 40.0.144.138 YES manual up up \r\nGigabitEthernet1.27 40.0.144.140 YES manual up up \r\nGigabitEthernet1.28 unassigned YES manual deleted down \r\nGigabitEthernet1.29 unassigned YES manual deleted down \r\nGigabitEthernet1.31 unassigned YES manual deleted down \r\nGigabitEthernet1.32 unassigned YES manual deleted down \r\nGigabitEthernet1.33 unassigned YES manual deleted down \r\nGigabitEthernet1.34 unassigned YES manual deleted down \r\nGigabitEthernet1.35 unassigned YES manual deleted down \r\nGigabitEthernet1.36 unassigned YES manual deleted down \r\nGigabitEthernet1.37 unassigned YES manual deleted down \r\nGigabitEthernet1.38 unassigned YES manual deleted down \r\nGigabitEthernet1.39 unassigned YES manual deleted down \r\nGigabitEthernet1.40 unassigned YES manual deleted down \r\nGigabitEthernet1.41 unassigned YES manual deleted down \r\nGigabitEthernet1.42 unassigned YES manual deleted down \r\nGigabitEthernet1.43 unassigned YES manual deleted down \r\nGigabitEthernet1.44 unassigned YES manual deleted down \r\nGigabitEthernet1.45 unassigned YES manual deleted down \r\nGigabitEthernet1.46 unassigned YES manual deleted down \r\nGigabitEthernet1.47 unassigned YES manual deleted down \r\nGigabitEthernet1.48 unassigned YES manual deleted down \r\nGigabitEthernet1.49 unassigned YES manual deleted down \r\nGigabitEthernet1.50 unassigned YES manual deleted down \r\nGigabitEthernet1.51 unassigned YES manual deleted down \r\nGigabitEthernet1.52 unassigned YES manual deleted down \r\nGigabitEthernet1.53 unassigned YES manual deleted down \r\nGigabitEthernet1.54 unassigned YES manual deleted down \r\nGigabitEthernet1.55 unassigned YES manual deleted down \r\nGigabitEthernet1.56 unassigned YES manual deleted down \r\nGigabitEthernet1.57 unassigned YES manual deleted down \r\nGigabitEthernet1.58 unassigned YES manual deleted down \r\nGigabitEthernet1.59 unassigned YES manual deleted down \r\nGigabitEthernet1.61 unassigned YES manual deleted down \r\nGigabitEthernet1.63 unassigned YES manual deleted down \r\nGigabitEthernet1.64 unassigned YES manual deleted down \r\nGigabitEthernet1.65 unassigned YES manual deleted down \r\nGigabitEthernet1.66 unassigned YES manual deleted down \r\nGigabitEthernet1.67 unassigned YES manual deleted down \r\nGigabitEthernet1.68 unassigned YES manual deleted down \r\nGigabitEthernet1.69 unassigned YES manual deleted down \r\nGigabitEthernet1.70 unassigned YES manual deleted down \r\nGigabitEthernet1.73 unassigned YES manual deleted down \r\nGigabitEthernet1.74 unassigned YES manual deleted down \r\nGigabitEthernet1.75 unassigned YES manual deleted down \r\nGigabitEthernet1.76 unassigned YES manual deleted down \r\nGigabitEthernet1.77 unassigned YES manual deleted down \r\nGigabitEthernet1.78 unassigned YES manual deleted down \r\nGigabitEthernet1.84 unassigned YES manual deleted down \r\nGigabitEthernet1.85 unassigned YES manual deleted down \r\nGigabitEthernet1.86 unassigned YES manual deleted down \r\nGigabitEthernet1.87 unassigned YES manual deleted down \r\nGigabitEthernet1.88 unassigned YES manual deleted down \r\nGigabitEthernet1.95 unassigned YES manual deleted down \r\nGigabitEthernet1.100 unassigned YES manual up up \r\nGigabitEthernet1.518 30.0.148.0 YES manual up up \r\nLoopback101 unassigned YES unset up up \r\nLoopback102 unassigned YES unset up up \r\nVirtualPortGroup0 192.168.35.101 YES manual down down",
31
+ "show license" : "Index 1 Feature: security\nIndex 2 Feature: internal_service",
32
+ "show clock" : "17:50:57.029 UTC Tue Sep 7 2021",
33
+ "show ntp status" : "Clock is synchronized, stratum 4, reference is 4.53.160.75 \r\nnominal freq is 250.0000 Hz, actual freq is 249.9993 Hz, precision is 2**10\r\nntp uptime is 4181760600 (1\/100 of seconds), resolution is 4016\r\nreference time is E4E22279.404189E8 (17:40:09.251 UTC Tue Sep 7 2021)\r\nclock offset is 1.5660 msec, root delay is 53.47 msec\r\nroot dispersion is 116.11 msec, peer dispersion is 20.62 msec\r\nloopfilter state is 'CTRL' (Normal Controlled Loop), drift is 0.000002619 s\/s\r\nsystem poll interval is 1024, last update was 648 sec ago.",
34
+ "show memory statistics" : " Head Total(b) Used(b) Free(b) Lowest(b) Largest(b)\r\nProcessor 7F6A6B8F0010 1712527552 238609640 1473917912 1440257872 921904364\r\n lsmpi_io 7F6A2F2EE1A8 6295128 6294304 824 824 412",
35
+ "show logging" : "Syslog logging: enabled (0 messages dropped, 2 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled)\r\n\r\nNo Active Message Discriminator.\r\n\r\n\r\n\r\nNo Inactive Message Discriminator.\r\n\r\n\r\n Console logging: level debugging, 4103 messages logged, xml disabled,\r\n filtering disabled\r\n Monitor logging: level debugging, 0 messages logged, xml disabled,\r\n filtering disabled\r\n Buffer logging: level debugging, 4103 messages logged, xml disabled,\r\n filtering disabled\r\n Exception Logging: size (4096 bytes)\r\n Count and timestamp logging messages: disabled\r\n Persistent logging: enabled, url bootflash:\/syslog, disk space 1000000 bytes, file size 8192 bytes, batch size 4096 bytes, threshold capacity 0 , immediate \r\n\r\nNo active filter modules.\r\n\r\n Trap logging: level informational, 4105 message lines logged\r\n Logging Source-Interface: VRF Name:\r\n\r\nLog Buffer (4096 bytes):\r\n1.119)\r\nSep 7 11:11:09.071: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 11:11:09 UTC Tue Sep 7 2021\r\nSep 7 11:11:40.157: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 13:13:01.578: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 13:13:01 UTC Tue Sep 7 2021\r\nSep 7 13:13:32.159: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 13:17:03.385: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 13:17:03 UTC Tue Sep 7 2021\r\nSep 7 13:17:49.159: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 13:21:52.411: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 13:21:52 UTC Tue Sep 7 2021\r\nSep 7 13:22:23.159: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 13:22:25.214: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 13:22:25 UTC Tue Sep 7 2021\r\nSep 7 13:22:56.158: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 14:12:29.946: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 14:12:29 UTC Tue Sep 7 2021\r\nSep 7 14:13:16.159: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 14:20:45.025: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 14:20:45 UTC Tue Sep 7 2021\r\nSep 7 14:21:16.159: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 14:21:17.867: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 14:21:17 UTC Tue Sep 7 2021\r\nSep 7 14:21:49.159: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 14:29:02.582: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 14:29:02 UTC Tue Sep 7 2021\r\nSep 7 14:29:57.158: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 14:34:51.970: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 14:34:51 UTC Tue Sep 7 2021\r\nSep 7 14:35:23.158: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 14:35:49.048: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 14:35:49 UTC Tue Sep 7 2021\r\nSep 7 14:36:20.159: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 15:04:22.348: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 15:04:22 UTC Tue Sep 7 2021\r\nSep 7 15:04:23.048: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 15:04:23 UTC Tue Sep 7 2021\r\nSep 7 15:04:53.159: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 16:34:19.443: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 16:34:19 UTC Tue Sep 7 2021\r\nSep 7 16:34:50.160: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 16:34:55.192: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 16:34:55 UTC Tue Sep 7 2021\r\nSep 7 16:35:26.155: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 16:38:38.109: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 16:38:38 UTC Tue Sep 7 2021\r\nSep 7 16:39:09.157: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 16:39:14.494: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 16:39:14 UTC Tue Sep 7 2021\r\nSep 7 16:39:45.156: %SYS-6-LOGOUT: User ec2-user has exited tty session 1(10.11.1.119)\r\nSep 7 17:50:52.667: %SEC_LOGIN-5-LOGIN_SUCCESS: Login Success [user: ec2-user] [Source: 10.11.1.119] [localport: 22] at 17:50:52 UTC Tue Sep 7 2021"
36
+ }
37
+ ]
38
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "ZRK001",
3
+ "ipaddress": "192.168.1.1",
4
+ "port": "20",
5
+ "ostype": "dungeon-os",
6
+ "current_state": 0,
7
+ "deleted" : false,
8
+ "online" : true,
9
+ "actions" : {
10
+ "move" : {"action": "next_state"},
11
+ "restart" : {"action": "reset_state"},
12
+ "sync" : {"action": "overwrite_config", "value":"inventory"}
13
+ },
14
+ "config" : "You are empty handed",
15
+ "states" : [
16
+ {
17
+ "look" : "You are standing in an open field west of a white house, wih a boarded front door.\nThere is a small mailbox here.",
18
+ "examine mailbox" : "The small mailbox is closed.",
19
+ "inventory" : "You are empty-handed"
20
+ },
21
+ {
22
+ "look" : "This is a forest, with trees in all directions. To the east, there appears to be sunlight.",
23
+ "examine mailbox" : "You can't see any mailbox here.",
24
+ "inventory" : "You are carrying:\n A leaflet",
25
+ "read leaflet" : "ZORK is a game of adventure, danger, and low cunning. In it you will explore some of the most amazing territory ever seen by mortals. No computer should be without one!"
26
+ },
27
+ {
28
+ "look" : "You are in a clearing, with a forest surrounding you on all sides. A path leads south.\nOn the ground is a pile of leaves.",
29
+ "examine leaves" : "There's nothing special about the pile of leaves.",
30
+ "inventory" : "You are carrying:\n A leaflet"
31
+ }
32
+ ]
33
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "ATL001",
3
+ "ipaddress": "10.0.1.1",
4
+ "port": "9999",
5
+ "ostype": "cisco-ios",
6
+ "current_state": 0,
7
+ "deleted" : false,
8
+ "online" : true,
9
+ "actions" : {
10
+ "reload" : {"action": "next_state"},
11
+ "show" : {"action": "return_state"}
12
+ },
13
+ "states" : [
14
+ {
15
+ "running config" : "this is some config",
16
+ "interfaces" : "blah blah blah",
17
+ "interfaces brief" : "blah"
18
+ },
19
+ {
20
+ "running config" : "this is some other config",
21
+ "interfaces" : "bleh bleh bleh",
22
+ "interfaces brief" : "bleh"
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "http://example.com/example.json",
4
+ "type": "object",
5
+ "title": "Mock Device Schema",
6
+ "description": "The root schema of mock device comprises the entire JSON document.",
7
+ "required": [
8
+ "name",
9
+ "ipaddress",
10
+ "port",
11
+ "ostype",
12
+ "deleted",
13
+ "online",
14
+ "actions"
15
+ ],
16
+ "properties": {
17
+ "name": {
18
+ "type": "string"
19
+ },
20
+ "ipaddress": {
21
+ "type": "string"
22
+ },
23
+ "port": {
24
+ "type": "number"
25
+ },
26
+ "ostype": {
27
+ "type": "string"
28
+ },
29
+ "current_state": {
30
+ "type": "integer"
31
+ },
32
+ "deleted": {
33
+ "type": "boolean"
34
+ },
35
+ "online": {
36
+ "type": "string"
37
+ },
38
+ "actions": {
39
+ "type": "array"
40
+ },
41
+ "config": {
42
+ "type": "string"
43
+ },
44
+ "states": {
45
+ "type": "array",
46
+ "items": {
47
+ "type": "object"
48
+ }
49
+ }
50
+ }
51
+ }
package/package.json ADDED
@@ -0,0 +1,84 @@
1
+ {
2
+ "name": "@itentialopensource/adapter-mockdevice",
3
+ "version": "1.0.0",
4
+ "description": "mock implementation of device broker",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git@gitlab.com:itentialopensource/adapters/adapter-mockdevice.git"
9
+ },
10
+ "author": "Itential",
11
+ "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-mockdevice#readme",
12
+ "main": "adapter.js",
13
+ "engines": {
14
+ "node": ">=16.2.0 <17.0.0",
15
+ "npm": ">=7.18.1 <8.0.0"
16
+ },
17
+ "scripts": {
18
+ "artifactize": "npm i && node utils/packModificationScript.js",
19
+ "preinstall": "node utils/setup.js && npm install --package-lock-only --ignore-scripts && npx npm-force-resolutions",
20
+ "deinstall": "node utils/removeHooks.js",
21
+ "lint": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js",
22
+ "test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
23
+ "lint:errors": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js --quiet",
24
+ "test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
25
+ "test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
26
+ "test": "npm run test:unit",
27
+ "deploy": "npm publish --registry=https://registry.npmjs.org --access=public",
28
+ "build": "npm run deploy"
29
+ },
30
+ "keywords": [
31
+ "Itential",
32
+ "IAP",
33
+ "Automation",
34
+ "Integration",
35
+ "App-Artifacts",
36
+ "Adapter",
37
+ "mockdevice",
38
+ "Pre-Release"
39
+ ],
40
+ "dependencies": {
41
+ "ajv": "^8.6.3",
42
+ "axios": "^0.21.0",
43
+ "esprima": "^4.0.1",
44
+ "fs-extra": "^8.1.0",
45
+ "package-json-validator": "^0.6.3",
46
+ "readline-sync": "^1.4.10",
47
+ "semver": "^7.3.2"
48
+ },
49
+ "devDependencies": {
50
+ "chai": "^4.3.4",
51
+ "eslint": "^7.23.0",
52
+ "eslint-config-airbnb": "^18.2.1",
53
+ "eslint-config-prettier": "^8.1.0",
54
+ "eslint-plugin-import": "^2.22.1",
55
+ "eslint-plugin-jsdoc": "^32.3.0",
56
+ "eslint-plugin-json": "^2.1.2",
57
+ "eslint-plugin-mocha": "^8.1.0",
58
+ "eslint-plugin-node": "^11.1.0",
59
+ "eslint-plugin-prettier": "^3.3.1",
60
+ "eslint-plugin-yaml": "^0.4.1",
61
+ "husky": "^4.3.8",
62
+ "jsdoc": "^4.0.2",
63
+ "lint-staged": "^10.5.4",
64
+ "minami": "^1.2.3",
65
+ "mocha": "^9.2.2",
66
+ "mochawesome": "^7.1.3",
67
+ "nyc": "^15.1.0",
68
+ "prettier": "^2.2.1",
69
+ "prettier-plugin-package": "^1.3.0",
70
+ "pretty-quick": "^3.1.0",
71
+ "shellcheck": "^1.0.0",
72
+ "testdouble": "^3.16.1",
73
+ "winston": "^3.3.3"
74
+ },
75
+ "lint-staged": {
76
+ "*.{js,json,jsx,yaml,yml,md}": [
77
+ "./node_modules/.bin/eslint --fix"
78
+ ]
79
+ },
80
+ "resolutions": {
81
+ "minimist": "^1.2.5"
82
+ },
83
+ "private": false
84
+ }
package/pronghorn.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "id": "@itentialopensource/adapter-mockdevice",
3
+ "title": "mockdevice",
4
+ "export": "MockDevice",
5
+ "type": "Adapter",
6
+ "encrypted": false,
7
+ "src": "adapter.js",
8
+ "roles": [
9
+ "admin"
10
+ ],
11
+ "methods": [
12
+ {
13
+ "name": "restoreConfig",
14
+ "summary": "Restore Device Config",
15
+ "description": "Restore entire device config with the given config",
16
+ "input": [
17
+ {
18
+ "name": "deviceId",
19
+ "type": "string",
20
+ "description": "Device Name",
21
+ "schema": {
22
+ "type": "string"
23
+ }
24
+ },
25
+ {
26
+ "name": "config",
27
+ "type": "string",
28
+ "description": "Native Device Config",
29
+ "schema": {
30
+ "type": "string"
31
+ }
32
+ }
33
+ ],
34
+ "output": {
35
+ "name": "result",
36
+ "type": "string",
37
+ "description": "Result of restore action"
38
+ },
39
+ "task": true,
40
+ "roles": [
41
+ "admin"
42
+ ]
43
+ }
44
+
45
+ ],
46
+ "views": [],
47
+ "topics": {
48
+ "adapterOnline" : {
49
+ "type": "object",
50
+ "properties": {
51
+ "server": {
52
+ "type": "string",
53
+ "examples": []
54
+ },
55
+ "type": {
56
+ "type": "string",
57
+ "examples": [
58
+ "NSO"
59
+ ]
60
+ },
61
+ "id": {
62
+ "type": "string"
63
+ },
64
+ "time": {
65
+ "type": "string",
66
+ "default": "2020-02-27 15:54:29",
67
+ "examples": [
68
+ "2020-02-27 15:54:29"
69
+ ]
70
+ }
71
+ },
72
+ "required": [
73
+ "server",
74
+ "type",
75
+ "id",
76
+ "time"
77
+ ],
78
+ "additionalProperties": false
79
+ },
80
+ "adapterOffline" : {},
81
+ "adapterDegraded" :{},
82
+ "adapterStable":{},
83
+ "serviceCrash" : {},
84
+ "applicationStop" :{},
85
+ "applicationStart":{}
86
+ }
87
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "$id": "adapter-mockdevice",
3
+ "type": "object",
4
+ "definitions": {},
5
+ "$schema": "http://json-schema.org/draft-07/schema#",
6
+ "properties": {}
7
+ }
Binary file
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "mockdevice",
3
+ "model": "@itential/adapter-mockdevice",
4
+ "type": "Adapter",
5
+ "properties": {
6
+ "id": "mockdevice",
7
+ "type": "MockDevice",
8
+ "properties": {
9
+ "devices": [
10
+ {
11
+ "prefix": "ATL",
12
+ "type": "cisco-ios-xr",
13
+ "count": "2"
14
+ },
15
+ {
16
+ "prefix": "NYC",
17
+ "type": "f5-bigip",
18
+ "count": "7"
19
+ }
20
+ ]
21
+ },
22
+ "brokers": [
23
+ "device"
24
+ ],
25
+ "groups": []
26
+ },
27
+ "isEncrypted": false,
28
+ "loggerProps": {
29
+ "description": "Logging",
30
+ "log_max_files": 100,
31
+ "log_max_file_size": 1048576,
32
+ "log_level": "warn",
33
+ "log_directory": "./logs",
34
+ "log_filename": "mockdevice.log",
35
+ "console_level": "debug"
36
+ },
37
+ "virtual": false
38
+ }
@@ -0,0 +1,146 @@
1
+ #!/usr/bin/env node
2
+ /* @copyright Itential, LLC 2019 */
3
+
4
+ const fs = require('fs-extra');
5
+ const path = require('path');
6
+
7
+ async function createBundle(adapterOldDir) {
8
+ // set directories
9
+ const artifactDir = path.join(adapterOldDir, '../artifactTemp');
10
+ const workflowsDir = path.join(adapterOldDir, 'workflows');
11
+
12
+ // read adapter's package and set names
13
+ const adapterPackage = fs.readJSONSync(path.join(adapterOldDir, 'package.json'));
14
+ const originalName = adapterPackage.name.substring(adapterPackage.name.lastIndexOf('/') + 1);
15
+ const shortenedName = originalName.replace('adapter-', '');
16
+ const artifactName = originalName.replace('adapter', 'bundled-adapter');
17
+
18
+ const adapterNewDir = path.join(artifactDir, 'bundles', 'adapters', originalName);
19
+ fs.ensureDirSync(adapterNewDir);
20
+
21
+ const ops = [];
22
+
23
+ // copy old adapterDir to bundled hierarchy location
24
+ ops.push(() => fs.copySync(adapterOldDir, adapterNewDir));
25
+
26
+ // copy readme
27
+ ops.push(() => fs.copySync(path.join(adapterOldDir, 'README.md'), path.join(artifactDir, 'README.md')));
28
+
29
+ // copy changelog
30
+ if (fs.existsSync(path.join(adapterOldDir, 'CHANGELOG.md'))) {
31
+ ops.push(() => fs.copySync(path.join(adapterOldDir, 'CHANGELOG.md'), path.join(artifactDir, 'CHANGELOG.md')));
32
+ }
33
+
34
+ // copy license
35
+ if (fs.existsSync(path.join(adapterOldDir, 'LICENSE'))) {
36
+ ops.push(() => fs.copySync(path.join(adapterOldDir, 'LICENSE'), path.join(artifactDir, 'LICENSE')));
37
+ }
38
+
39
+ // create package
40
+ const artifactPackage = {
41
+ name: artifactName,
42
+ version: adapterPackage.version,
43
+ description: `A bundled version of the ${originalName} to be used in adapter-artifacts for easy installation`,
44
+ scripts: {
45
+ test: 'echo "Error: no test specified" && exit 1',
46
+ deploy: 'npm publish --registry=http://registry.npmjs.org'
47
+ },
48
+ keywords: [
49
+ 'IAP',
50
+ 'artifacts',
51
+ 'Itential',
52
+ 'Pronghorn',
53
+ 'Adapter',
54
+ 'Adapter-Artifacts',
55
+ shortenedName
56
+ ],
57
+ author: 'Itential Artifacts',
58
+ license: 'Apache-2.0',
59
+ repository: adapterPackage.repository,
60
+ private: false,
61
+ devDependencies: {
62
+ r2: '^2.0.1',
63
+ ajv: '6.10.0',
64
+ 'better-ajv-errors': '^0.6.1',
65
+ 'fs-extra': '^7.0.1'
66
+ }
67
+ };
68
+
69
+ ops.push(() => fs.writeJSONSync(path.join(artifactDir, 'package.json'), artifactPackage, { spaces: 2 }));
70
+
71
+ // create manifest
72
+ const manifest = {
73
+ bundleName: originalName,
74
+ version: adapterPackage.version,
75
+ fingerprint: 'Some verifiable token',
76
+ createdEpoch: '1554836984020',
77
+ artifacts: [
78
+ {
79
+ id: `${shortenedName}-adapter`,
80
+ name: `${shortenedName}-adapter`,
81
+ type: 'adapter',
82
+ location: `/bundles/adapters/${originalName}`,
83
+ description: artifactPackage.description,
84
+ properties: {
85
+ entryPoint: false
86
+ }
87
+ }
88
+ ]
89
+ };
90
+
91
+ // add workflows into artifact
92
+ if (fs.existsSync(workflowsDir)) {
93
+ const workflowFileNames = fs.readdirSync(workflowsDir);
94
+
95
+ // if folder isnt empty and only file is not readme
96
+ if (workflowFileNames.length !== 0 && (!(workflowFileNames.length === 1 && workflowFileNames[0].split('.')[1] === 'md'))) {
97
+ // add workflows to correct location in bundle
98
+ ops.push(() => fs.copySync(workflowsDir, path.join(artifactDir, 'bundles', 'workflows')));
99
+
100
+ // add workflows to manifest
101
+ workflowFileNames.forEach((filename) => {
102
+ const [filenameNoExt, ext] = filename.split('.');
103
+ if (ext === 'json') {
104
+ manifest.artifacts.push({
105
+ id: `workflow-${filenameNoExt}`,
106
+ name: filenameNoExt,
107
+ type: 'workflow',
108
+ location: `/bundles/workflows/${filename}`,
109
+ description: 'Main entry point to artifact',
110
+ properties: {
111
+ entryPoint: false
112
+ }
113
+ });
114
+ }
115
+ });
116
+ }
117
+ }
118
+
119
+ ops.push(() => fs.writeJSONSync(path.join(artifactDir, 'manifest.json'), manifest, { spaces: 2 }));
120
+
121
+ // Run the commands in parallel
122
+ try {
123
+ await Promise.all(ops.map(async (op) => op()));
124
+ } catch (e) {
125
+ throw new Error(e);
126
+ }
127
+
128
+ const pathObj = {
129
+ bundlePath: artifactDir,
130
+ bundledAdapterPath: path.join(artifactDir, 'bundles', 'adapters', originalName)
131
+ };
132
+ return pathObj;
133
+ }
134
+
135
+ async function artifactize(entryPathToAdapter) {
136
+ const truePath = path.resolve(entryPathToAdapter);
137
+ const packagePath = path.join(truePath, 'package');
138
+ // remove adapter from package and move bundle in
139
+ const pathObj = await createBundle(packagePath);
140
+ const { bundlePath } = pathObj;
141
+ fs.removeSync(packagePath);
142
+ fs.moveSync(bundlePath, packagePath);
143
+ return 'Bundle successfully created and old folder system removed';
144
+ }
145
+
146
+ module.exports = { createBundle, artifactize };