diff --git a/test/unit/mocked_data/test_get_config/SG300-10/expected_result.json b/test/unit/mocked_data/test_get_config/SG300-10/expected_result.json new file mode 100644 index 0000000..5b589ce --- /dev/null +++ b/test/unit/mocked_data/test_get_config/SG300-10/expected_result.json @@ -0,0 +1,5 @@ +{ + "candidate": "", + "running": "\nssd-control-start\nssd config\nssd file passphrase control unrestricted\nno ssd file integrity control\nssd-control-end cb0a3fdb1f3a1af4e4430033719968c0\n!\nvoice vlan oui-table add 0001e3 Siemens_AG_phone________\nvoice vlan oui-table add 00036b Cisco_phone_____________\nvoice vlan oui-table add 00096e Avaya___________________\nvoice vlan oui-table add 000fe2 H3C_Aolynk______________\nvoice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone\nvoice vlan oui-table add 00d01e Pingtel_phone___________\nvoice vlan oui-table add 00e075 Polycom/Veritel_phone___\nvoice vlan oui-table add 00e0bb 3Com_phone______________\nhostname switchf5bcdb\nusername root password encrypted dddd5d7b474d2c78ebbb833789c4bfd721edf4bf privilege 15\nip ssh server\nip ssh password-auth\nsntp unicast client enable\nsntp unicast client poll\nsntp server 1.2.3.4\n!\ninterface gigabitethernet1\n description test1\n!\ninterface gigabitethernet2\n description test2\n!\ninterface gigabitethernet5\n description test5\n!\nexit", + "startup": "\nssd-control-start\nssd config\nssd file passphrase control unrestricted\nno ssd file integrity control\nssd-control-end cb0a3fdb1f3a1af4e4430033719968c0\n!\nvoice vlan oui-table add 0001e3 Siemens_AG_phone________\nvoice vlan oui-table add 00036b Cisco_phone_____________\nvoice vlan oui-table add 00096e Avaya___________________\nvoice vlan oui-table add 000fe2 H3C_Aolynk______________\nvoice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone\nvoice vlan oui-table add 00d01e Pingtel_phone___________\nvoice vlan oui-table add 00e075 Polycom/Veritel_phone___\nvoice vlan oui-table add 00e0bb 3Com_phone______________\nhostname switchf5bcdb\nusername root password encrypted dddd5d7b474d2c78ebbb833789c4bfd721edf4bf privilege 15\nip ssh server\nip ssh password-auth\n!" +} diff --git a/test/unit/mocked_data/test_get_config/SG300-10/show_running_config.txt b/test/unit/mocked_data/test_get_config/SG300-10/show_running_config.txt new file mode 100644 index 0000000..962fd27 --- /dev/null +++ b/test/unit/mocked_data/test_get_config/SG300-10/show_running_config.txt @@ -0,0 +1,40 @@ +config-file-header +switchf5bcdb +v1.4.11.5 / R800_NIK_1_4_220_026 +CLI v1.0 +set system mode switch + +file SSD indicator encrypted +@ +ssd-control-start +ssd config +ssd file passphrase control unrestricted +no ssd file integrity control +ssd-control-end cb0a3fdb1f3a1af4e4430033719968c0 +! +voice vlan oui-table add 0001e3 Siemens_AG_phone________ +voice vlan oui-table add 00036b Cisco_phone_____________ +voice vlan oui-table add 00096e Avaya___________________ +voice vlan oui-table add 000fe2 H3C_Aolynk______________ +voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone +voice vlan oui-table add 00d01e Pingtel_phone___________ +voice vlan oui-table add 00e075 Polycom/Veritel_phone___ +voice vlan oui-table add 00e0bb 3Com_phone______________ +hostname switchf5bcdb +username root password encrypted dddd5d7b474d2c78ebbb833789c4bfd721edf4bf privilege 15 +ip ssh server +ip ssh password-auth +sntp unicast client enable +sntp unicast client poll +sntp server 1.2.3.4 +! +interface gigabitethernet1 + description test1 +! +interface gigabitethernet2 + description test2 +! +interface gigabitethernet5 + description test5 +! +exit diff --git a/test/unit/mocked_data/test_get_config/SG300-10/show_startup_config.txt b/test/unit/mocked_data/test_get_config/SG300-10/show_startup_config.txt new file mode 100644 index 0000000..c69a979 --- /dev/null +++ b/test/unit/mocked_data/test_get_config/SG300-10/show_startup_config.txt @@ -0,0 +1,27 @@ +config-file-header +switchaabbcc +v1.4.11.5 / R800_NIK_1_4_220_026 +CLI v1.0 +set system mode switch + +file SSD indicator encrypted +@ +ssd-control-start +ssd config +ssd file passphrase control unrestricted +no ssd file integrity control +ssd-control-end cb0a3fdb1f3a1af4e4430033719968c0 +! +voice vlan oui-table add 0001e3 Siemens_AG_phone________ +voice vlan oui-table add 00036b Cisco_phone_____________ +voice vlan oui-table add 00096e Avaya___________________ +voice vlan oui-table add 000fe2 H3C_Aolynk______________ +voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone +voice vlan oui-table add 00d01e Pingtel_phone___________ +voice vlan oui-table add 00e075 Polycom/Veritel_phone___ +voice vlan oui-table add 00e0bb 3Com_phone______________ +hostname switchf5bcdb +username root password encrypted dddd5d7b474d2c78ebbb833789c4bfd721edf4bf privilege 15 +ip ssh server +ip ssh password-auth +! diff --git a/test/unit/mocked_data/test_get_config_filtered/SG300-10/expected_result.json b/test/unit/mocked_data/test_get_config_filtered/SG300-10/expected_result.json new file mode 100644 index 0000000..dcddbba --- /dev/null +++ b/test/unit/mocked_data/test_get_config_filtered/SG300-10/expected_result.json @@ -0,0 +1,5 @@ +{ + "startup": "", + "running": "", + "candidate": "" +} diff --git a/test/unit/mocked_data/test_get_config_filtered/SG300-10/show_running_config.txt b/test/unit/mocked_data/test_get_config_filtered/SG300-10/show_running_config.txt new file mode 100644 index 0000000..962fd27 --- /dev/null +++ b/test/unit/mocked_data/test_get_config_filtered/SG300-10/show_running_config.txt @@ -0,0 +1,40 @@ +config-file-header +switchf5bcdb +v1.4.11.5 / R800_NIK_1_4_220_026 +CLI v1.0 +set system mode switch + +file SSD indicator encrypted +@ +ssd-control-start +ssd config +ssd file passphrase control unrestricted +no ssd file integrity control +ssd-control-end cb0a3fdb1f3a1af4e4430033719968c0 +! +voice vlan oui-table add 0001e3 Siemens_AG_phone________ +voice vlan oui-table add 00036b Cisco_phone_____________ +voice vlan oui-table add 00096e Avaya___________________ +voice vlan oui-table add 000fe2 H3C_Aolynk______________ +voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone +voice vlan oui-table add 00d01e Pingtel_phone___________ +voice vlan oui-table add 00e075 Polycom/Veritel_phone___ +voice vlan oui-table add 00e0bb 3Com_phone______________ +hostname switchf5bcdb +username root password encrypted dddd5d7b474d2c78ebbb833789c4bfd721edf4bf privilege 15 +ip ssh server +ip ssh password-auth +sntp unicast client enable +sntp unicast client poll +sntp server 1.2.3.4 +! +interface gigabitethernet1 + description test1 +! +interface gigabitethernet2 + description test2 +! +interface gigabitethernet5 + description test5 +! +exit diff --git a/test/unit/mocked_data/test_get_config_filtered/SG300-10/show_startup_config.txt b/test/unit/mocked_data/test_get_config_filtered/SG300-10/show_startup_config.txt new file mode 100644 index 0000000..c69a979 --- /dev/null +++ b/test/unit/mocked_data/test_get_config_filtered/SG300-10/show_startup_config.txt @@ -0,0 +1,27 @@ +config-file-header +switchaabbcc +v1.4.11.5 / R800_NIK_1_4_220_026 +CLI v1.0 +set system mode switch + +file SSD indicator encrypted +@ +ssd-control-start +ssd config +ssd file passphrase control unrestricted +no ssd file integrity control +ssd-control-end cb0a3fdb1f3a1af4e4430033719968c0 +! +voice vlan oui-table add 0001e3 Siemens_AG_phone________ +voice vlan oui-table add 00036b Cisco_phone_____________ +voice vlan oui-table add 00096e Avaya___________________ +voice vlan oui-table add 000fe2 H3C_Aolynk______________ +voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone +voice vlan oui-table add 00d01e Pingtel_phone___________ +voice vlan oui-table add 00e075 Polycom/Veritel_phone___ +voice vlan oui-table add 00e0bb 3Com_phone______________ +hostname switchf5bcdb +username root password encrypted dddd5d7b474d2c78ebbb833789c4bfd721edf4bf privilege 15 +ip ssh server +ip ssh password-auth +! diff --git a/test/unit/mocked_data/test_get_config_sanitized/SG300-10/expected_result.json b/test/unit/mocked_data/test_get_config_sanitized/SG300-10/expected_result.json new file mode 100644 index 0000000..d781ae8 --- /dev/null +++ b/test/unit/mocked_data/test_get_config_sanitized/SG300-10/expected_result.json @@ -0,0 +1,5 @@ +{ + "candidate": "", + "running": "\nssd-control-start\nssd config\nssd file passphrase control unrestricted\nno ssd file integrity control\nssd-control-end cb0a3fdb1f3a1af4e4430033719968c0\n!\nvoice vlan oui-table add 0001e3 Siemens_AG_phone________\nvoice vlan oui-table add 00036b Cisco_phone_____________\nvoice vlan oui-table add 00096e Avaya___________________\nvoice vlan oui-table add 000fe2 H3C_Aolynk______________\nvoice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone\nvoice vlan oui-table add 00d01e Pingtel_phone___________\nvoice vlan oui-table add 00e075 Polycom/Veritel_phone___\nvoice vlan oui-table add 00e0bb 3Com_phone______________\nhostname switchf5bcdb\nusername root password encrypted privilege 15\nip ssh server\nip ssh password-auth\nsntp unicast client enable\nsntp unicast client poll\nsntp server 1.2.3.4\n!\ninterface gigabitethernet1\n description test1\n!\ninterface gigabitethernet2\n description test2\n!\ninterface gigabitethernet5\n description test5\n!\nexit", + "startup": "\nssd-control-start\nssd config\nssd file passphrase control unrestricted\nno ssd file integrity control\nssd-control-end cb0a3fdb1f3a1af4e4430033719968c0\n!\nvoice vlan oui-table add 0001e3 Siemens_AG_phone________\nvoice vlan oui-table add 00036b Cisco_phone_____________\nvoice vlan oui-table add 00096e Avaya___________________\nvoice vlan oui-table add 000fe2 H3C_Aolynk______________\nvoice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone\nvoice vlan oui-table add 00d01e Pingtel_phone___________\nvoice vlan oui-table add 00e075 Polycom/Veritel_phone___\nvoice vlan oui-table add 00e0bb 3Com_phone______________\nhostname switchf5bcdb\nusername root password encrypted privilege 15\nip ssh server\nip ssh password-auth\n!" +} diff --git a/test/unit/mocked_data/test_get_config_sanitized/SG300-10/show_running_config.txt b/test/unit/mocked_data/test_get_config_sanitized/SG300-10/show_running_config.txt new file mode 100644 index 0000000..962fd27 --- /dev/null +++ b/test/unit/mocked_data/test_get_config_sanitized/SG300-10/show_running_config.txt @@ -0,0 +1,40 @@ +config-file-header +switchf5bcdb +v1.4.11.5 / R800_NIK_1_4_220_026 +CLI v1.0 +set system mode switch + +file SSD indicator encrypted +@ +ssd-control-start +ssd config +ssd file passphrase control unrestricted +no ssd file integrity control +ssd-control-end cb0a3fdb1f3a1af4e4430033719968c0 +! +voice vlan oui-table add 0001e3 Siemens_AG_phone________ +voice vlan oui-table add 00036b Cisco_phone_____________ +voice vlan oui-table add 00096e Avaya___________________ +voice vlan oui-table add 000fe2 H3C_Aolynk______________ +voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone +voice vlan oui-table add 00d01e Pingtel_phone___________ +voice vlan oui-table add 00e075 Polycom/Veritel_phone___ +voice vlan oui-table add 00e0bb 3Com_phone______________ +hostname switchf5bcdb +username root password encrypted dddd5d7b474d2c78ebbb833789c4bfd721edf4bf privilege 15 +ip ssh server +ip ssh password-auth +sntp unicast client enable +sntp unicast client poll +sntp server 1.2.3.4 +! +interface gigabitethernet1 + description test1 +! +interface gigabitethernet2 + description test2 +! +interface gigabitethernet5 + description test5 +! +exit diff --git a/test/unit/mocked_data/test_get_config_sanitized/SG300-10/show_startup_config.txt b/test/unit/mocked_data/test_get_config_sanitized/SG300-10/show_startup_config.txt new file mode 100644 index 0000000..c69a979 --- /dev/null +++ b/test/unit/mocked_data/test_get_config_sanitized/SG300-10/show_startup_config.txt @@ -0,0 +1,27 @@ +config-file-header +switchaabbcc +v1.4.11.5 / R800_NIK_1_4_220_026 +CLI v1.0 +set system mode switch + +file SSD indicator encrypted +@ +ssd-control-start +ssd config +ssd file passphrase control unrestricted +no ssd file integrity control +ssd-control-end cb0a3fdb1f3a1af4e4430033719968c0 +! +voice vlan oui-table add 0001e3 Siemens_AG_phone________ +voice vlan oui-table add 00036b Cisco_phone_____________ +voice vlan oui-table add 00096e Avaya___________________ +voice vlan oui-table add 000fe2 H3C_Aolynk______________ +voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone +voice vlan oui-table add 00d01e Pingtel_phone___________ +voice vlan oui-table add 00e075 Polycom/Veritel_phone___ +voice vlan oui-table add 00e0bb 3Com_phone______________ +hostname switchf5bcdb +username root password encrypted dddd5d7b474d2c78ebbb833789c4bfd721edf4bf privilege 15 +ip ssh server +ip ssh password-auth +!