Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue #1244 #1336

Merged

Conversation

chidanandpujar
Copy link
Collaborator

Fix for issue #1244

systemstorage.yml changes handles multiple routing-engine file system storage information.

(venv) root@masterhost:~/pyez_release_test1# python issue_1244.py 
{'fpc0': {'filesystems': {'/dev/gpt/junos': {'available_blocks': '1004408',
                                             'mounted_on': '/.mount',
                                             'name': '/dev/gpt/junos',
                                             'total_blocks': '2943456',
                                             'used_blocks': '1703576',
                                             'used_percent': '63'},
                          'tmpfs': {'available_blocks': '663392',
                                    'mounted_on': '/.mount/mfs',
                                    'name': 'tmpfs',
                                    'total_blocks': '664456',
                                    'used_blocks': '1064',
                                    'used_percent': '0'}},
          're-name': 'fpc0'},
 'fpc1': {'filesystems': {'/dev/gpt/junos': {'available_blocks': '1006936',
                                             'mounted_on': '/.mount',
                                             'name': '/dev/gpt/junos',
                                             'total_blocks': '2943456',
                                             'used_blocks': '1701048',
                                             'used_percent': '63'},
                          'tmpfs': {'available_blocks': '663664',
                                    'mounted_on': '/.mount/mfs',
                                    'name': 'tmpfs',
                                    'total_blocks': '664456',
                                    'used_blocks': '792',
                                    'used_percent': '0'}},
          're-name': 'fpc1'},
 'fpc2': {'filesystems': {'/dev/gpt/junos': {'available_blocks': '954616',
                                             'mounted_on': '/.mount',
                                             'name': '/dev/gpt/junos',
                                             'total_blocks': '2943456',
                                             'used_blocks': '1753368',
                                             'used_percent': '65'},
                          'tmpfs': {'available_blocks': '663808',
                                    'mounted_on': '/.mount/mfs',
                                    'name': 'tmpfs',
                                    'total_blocks': '664456',
                                    'used_blocks': '648',
                                    'used_percent': '0'}},
          're-name': 'fpc2'},
 'fpc3': {'filesystems': {'/dev/gpt/junos': {'available_blocks': '1024040',
                                             'mounted_on': '/.mount',
                                             'name': '/dev/gpt/junos',
                                             'total_blocks': '2943456',
                                             'used_blocks': '1683944',
                                             'used_percent': '62'},
                          'tmpfs': {'available_blocks': '663808',
                                    'mounted_on': '/.mount/mfs',
                                    'name': 'tmpfs',
                                    'total_blocks': '664456',
                                    'used_blocks': '648',
                                    'used_percent': '0'}},
          're-name': 'fpc3'}}
(venv) root@masterhost:~/pyez_release_test1# python issue_1244.py 
{'filesystems': {'/dev/gpt/junos': {'available_blocks': '29118242',
                                    'mounted_on': '/.mount',
                                    'name': '/dev/gpt/junos',
                                    'total_blocks': '41803892',
                                    'used_blocks': '9341340',
                                    'used_percent': '24'},
                 '/var/jails/rest-api': {'available_blocks': '29118242',
                                         'mounted_on': '/.mount/packages/mnt/junos-runtime/web-api/var',
                                         'name': '/var/jails/rest-api',
                                         'total_blocks': '41803892',
                                         'used_blocks': '9341340',
                                         'used_percent': '24'},
                 'tmpfs': {'available_blocks': '1367720',
                           'mounted_on': '/.mount/mfs',
                           'name': 'tmpfs',
                           'total_blocks': '1369592',
                           'used_blocks': '1872',
                           'used_percent': '0'}},
 're-name': None}

@chidanandpujar
Copy link
Collaborator Author

FT pass logs:

(venv) root@masterhost:~/pyez_release_test1/py-junos-eznc# nose2 -v -c nose2.cfg
test_load_config_jinja2 (tests.functional.test_config.TestCore.test_load_config_jinja2) ... ok
test_load_config_jinja2_template (tests.functional.test_config.TestCore.test_load_config_jinja2_template) ... ok
test_load_config_json (tests.functional.test_config.TestCore.test_load_config_json) ... ok
test_load_config_set (tests.functional.test_config.TestCore.test_load_config_set) ... ok
test_load_config_text (tests.functional.test_config.TestCore.test_load_config_text) ... ok
test_load_config_xml (tests.functional.test_config.TestCore.test_load_config_xml) ... ok
test_config_exception (tests.functional.test_exception.TestUtilFs.test_config_exception) ... ok
test_device_rpc_timeout (tests.functional.test_exception.TestUtilFs.test_device_rpc_timeout) ... ok
test_exception (tests.functional.test_exception.TestUtilFs.test_exception) ... ok
test_exception_commitError (tests.functional.test_exception.TestUtilFs.test_exception_commitError) ... ok
test_exception_commitError_commitCheck (tests.functional.test_exception.TestUtilFs.test_exception_commitError_commitCheck) ... ok
test_exception_severity (tests.functional.test_exception.TestUtilFs.test_exception_severity) ... ok
test_FS_checksum (tests.functional.test_exception.TestUtilFs.test_FS_checksum) ... ok
test_load_exception (tests.functional.test_exception.TestUtilFs.test_load_exception) ... ok
test_lock_exception (tests.functional.test_exception.TestUtilFs.test_lock_exception) ... ok
test_rescue_action (tests.functional.test_exception.TestUtilFs.test_rescue_action) ... ok
test_rollback_id (tests.functional.test_exception.TestUtilFs.test_rollback_id) ... ok
test_rpc_exception (tests.functional.test_exception.TestUtilFs.test_rpc_exception) ... ok
test_rpc_exist (tests.functional.test_exception.TestUtilFs.test_rpc_exist) ... ok
test_rpc_load_extension (tests.functional.test_exception.TestUtilFs.test_rpc_load_extension) ... ok
test_rpc_no_format (tests.functional.test_exception.TestUtilFs.test_rpc_no_format) ... ok
test_rpc_set_override (tests.functional.test_exception.TestUtilFs.test_rpc_set_override) ... ok
test_unlock_exception (tests.functional.test_exception.TestUtilFs.test_unlock_exception) ... ok
test_device_rpc (tests.functional.test_rpc.TestCore.test_device_rpc) ... ok
test_device_rpc_format_text (tests.functional.test_rpc.TestCore.test_device_rpc_format_text) ... ok
test_device_rpc_timeout (tests.functional.test_rpc.TestCore.test_device_rpc_timeout) ... ok
test_display_xml_rpc (tests.functional.test_rpc.TestCore.test_display_xml_rpc) ... ok
test_getConfig (tests.functional.test_rpc.TestCore.test_getConfig) ... ok
test_interface_terse_text (tests.functional.test_rpc.TestCore.test_interface_terse_text) ... ok
test_route_information (tests.functional.test_rpc.TestCore.test_route_information) ... ok
test_rpc_get_interface_information_mtun (tests.functional.test_rpc.TestCore.test_rpc_get_interface_information_mtun) ... ok
test_scp_put (tests.functional.test_file_scp.test.test_scp_put) ... 10.220.2.221: b'scp_file.txt': 1 / 1 (100%)
ok
test_scp_put_file_get (tests.functional.test_file_scp.test.test_scp_put_file_get) ... ok
test_arp_table (tests.functional.test_table_present.test_table.test_arp_table) ... ['56:03:02:00:25:06', '00:01:00:02:00:03', 'bc:24:11:5d:8d:1d', 'bc:24:11:33:49:b3', '54:04:0a:dc:01:26', '54:04:0a:dc:01:29', '54:04:0a:dc:01:3c', '54:04:0a:dc:01:3e', '54:04:0a:dc:01:51', '54:04:0a:dc:01:65', '54:04:0a:dc:01:6f', '54:04:0a:dc:01:70', '54:04:0a:dc:01:79', '54:04:0a:dc:01:95', '54:04:0a:dc:01:b8', '54:04:0a:dc:01:c3', '54:04:0a:dc:01:c6', '54:04:0a:dc:01:e5', '54:04:0a:dc:01:f8', '54:04:0a:dc:01:fa', '54:04:0a:dc:01:fd', '54:04:0a:dc:02:24', '54:04:0a:dc:02:27', '54:04:0a:dc:02:2a', '54:04:0a:dc:02:fd', '54:04:0a:dc:03:0f', '54:04:0a:dc:03:12', '54:04:0a:dc:03:22', '54:04:0a:dc:03:23', '54:04:0a:dc:03:a2', '54:04:0a:dc:03:a4', '54:04:0a:dc:03:b8', '54:04:0a:dc:03:b9', '54:04:0a:dc:03:c2', '54:04:0a:dc:04:06', '54:04:0a:dc:04:08', '54:04:0a:dc:04:22', '54:04:0a:dc:04:27', '54:04:0a:dc:04:39', '54:04:0a:dc:04:90', '54:04:0a:dc:04:9b', '54:04:0a:dc:04:a0', '54:04:0a:dc:04:c8', '54:04:0a:dc:04:e5', '54:04:0a:dc:04:ee', '54:04:0a:dc:04:fb', '54:04:0a:dc:05:14', '54:04:0a:dc:05:a5', '54:04:0a:dc:05:ae', '54:04:0a:dc:05:b4', '54:04:0a:dc:05:fd', '54:04:0a:dc:06:5c', '54:04:0a:dc:06:99', '54:04:0a:dc:06:9b', '54:04:0a:dc:06:a7', '54:04:0a:dc:07:3f', '54:04:0a:dc:07:5d', '54:04:0a:dc:07:6b', '54:04:0a:dc:07:aa', '54:04:0a:dc:08:0e', '54:04:0a:dc:08:1c', '54:04:0a:dc:08:48', '54:04:0a:dc:08:52', '54:04:0a:dc:08:5a', '54:04:0a:dc:08:5c', '54:04:0a:dc:08:87', '54:04:0a:dc:08:b6', '54:04:0a:dc:08:ba', '54:04:0a:dc:08:c0', '54:04:0a:dc:08:c2', '54:04:0a:dc:08:da', '54:04:0a:dc:08:ec', '54:04:0a:dc:08:ed', '02:42:c0:dc:08:ef', '54:04:0a:dc:09:5d', '54:04:0a:dc:09:64', '54:04:0a:dc:09:77', '54:04:0a:dc:09:7c', '54:04:0a:dc:09:8c', '54:04:0a:dc:09:b8', '54:04:0a:dc:09:9b', '54:04:0a:dc:09:9d', '54:04:0a:dc:09:b2', '02:42:c0:dc:09:c1', '54:04:0a:dc:09:c4', '54:04:0a:dc:09:d4', '54:04:0a:dc:09:d6', '54:04:0a:dc:09:ee', '54:04:0a:dc:09:f6', '54:04:0a:dc:09:fa', '54:04:0a:dc:0a:17', '54:04:0a:dc:0a:22', '54:04:0a:dc:0a:25', '54:04:0a:dc:0a:2e', '54:04:0a:dc:0a:34', '54:04:0a:dc:0a:48', '54:04:0a:dc:0a:51', '54:04:0a:dc:0a:5d', '54:04:0a:dc:0a:74', '54:04:0a:dc:0a:76', '54:04:0a:dc:0a:78', '54:04:0a:dc:0a:c6', '54:04:0a:dc:0a:cc', '54:04:0a:dc:0a:da', '54:04:0a:dc:0a:e2', '54:04:0a:dc:0a:e6', '54:04:0a:dc:0a:f2', '54:04:0a:dc:0a:f5', '54:04:0a:dc:0a:ff', '54:04:0a:dc:0b:0d', '54:04:0a:dc:0b:26', '54:04:0a:dc:0b:3f', '54:04:0a:dc:0b:45', '54:04:0a:dc:0b:48', '54:04:0a:dc:0b:51', '54:04:0a:dc:0b:54', '54:04:0a:dc:0b:57', '54:04:0a:dc:0b:5d', '54:04:0a:dc:0b:74', '54:04:0a:dc:0b:78', '54:04:0a:dc:0b:81', '54:04:0a:dc:0b:83', '54:04:0a:dc:0b:a9', '54:04:0a:dc:0b:ab', '54:04:0a:dc:0b:af', '54:04:0a:dc:0b:b0', '54:04:0a:dc:0b:b5', '54:04:0a:dc:0b:b7', '54:04:0a:dc:0b:b9', '54:04:0a:dc:0b:c1', '54:04:0a:dc:0c:11', '54:04:0a:dc:0c:14', '54:04:0a:dc:0c:17', '54:04:0a:dc:0c:1e', '54:04:0a:dc:0c:26', '54:04:0a:dc:0c:2b', '54:04:0a:dc:0c:2d', '54:04:0a:dc:0c:58', '54:04:0a:dc:0c:63', '0c:86:10:7c:60:00', '56:03:02:00:25:06', '56:03:02:00:25:06', '56:03:02:00:25:0d']
ok
test_arp_table_to_json (tests.functional.test_table_present.test_table.test_arp_table_to_json) ... ok
test_table_get_value (tests.functional.test_table_present.test_table.test_table_get_value) ... ok
test_utils_fs_cat (tests.functional.test_utils_file_system.TestUtilsFS.test_utils_fs_cat) ... ok
test_utils_fs_checksum (tests.functional.test_utils_file_system.TestUtilsFS.test_utils_fs_checksum) ... ok
test_utils_fs_cp (tests.functional.test_utils_file_system.TestUtilsFS.test_utils_fs_cp) ... ok
test_utils_fs_ls (tests.functional.test_utils_file_system.TestUtilsFS.test_utils_fs_ls) ... ok
test_utils_fs_mkdir (tests.functional.test_utils_file_system.TestUtilsFS.test_utils_fs_mkdir) ... ok
test_utils_fs_mv (tests.functional.test_utils_file_system.TestUtilsFS.test_utils_fs_mv) ... ok
test_utils_fs_pwd (tests.functional.test_utils_file_system.TestUtilsFS.test_utils_fs_pwd) ... ok
test_utils_fs_rm (tests.functional.test_utils_file_system.TestUtilsFS.test_utils_fs_rm) ... ok
test_utils_fs_rmdir (tests.functional.test_utils_file_system.TestUtilsFS.test_utils_fs_rmdir) ... ok
test_utils_fs_stat (tests.functional.test_utils_file_system.TestUtilsFS.test_utils_fs_stat) ... ok
test_utils_fs_storageUsage (tests.functional.test_utils_file_system.TestUtilsFS.test_utils_fs_storageUsage) ... ok
test_utils_fs_symlink (tests.functional.test_utils_file_system.TestUtilsFS.test_utils_fs_symlink) ... ok
test_utils_fs_tgz (tests.functional.test_utils_file_system.TestUtilsFS.test_utils_fs_tgz) ... ok
test_device_cli (tests.functional.test_core.TestCore.test_device_cli) ... /root/pyez_release_test1/venv/lib/python3.12/site-packages/jnpr/junos/device.py:723: RuntimeWarning:
CLI command is for debug use only!
Instead of:
cli('show version')
Use:
rpc.get_software_information()

warnings.warn(warning_string, RuntimeWarning)
ok
test_device_facts (tests.functional.test_core.TestCore.test_device_facts) ... ok
test_device_get_timeout (tests.functional.test_core.TestCore.test_device_get_timeout) ... ok
test_device_open (tests.functional.test_core.TestCore.test_device_open) ... ok
test_device_rpc (tests.functional.test_core.TestCore.test_device_rpc) ... ok
test_device_rpc_format_text (tests.functional.test_core.TestCore.test_device_rpc_format_text) ... ok
test_device_rpc_normalize_true (tests.functional.test_core.TestCore.test_device_rpc_normalize_true) ... ok
test_device_rpc_timeout (tests.functional.test_core.TestCore.test_device_rpc_timeout) ... ok
test_device_set_timeout (tests.functional.test_core.TestCore.test_device_set_timeout) ... ok
test_load_config (tests.functional.test_core.TestCore.test_load_config) ... ok
test_table_json (tests.functional.test_table.TestTable.test_table_json) ... ok
test_table_union (tests.functional.test_table.TestTable.test_table_union) ... ok
test_shell_run (tests.functional.test_shell.test.test_shell_run) ... ok
test_device_open_key_pass (tests.functional.test_device_ssh.TestDeviceSsh.test_device_open_key_pass) ... ok


Ran 63 tests in 211.505s

OK

@dineshbaburam91 dineshbaburam91 merged commit 9cf7d1e into Juniper:master Oct 16, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants