def main(input_files: str, output_file: str) -> None: """EVA Entry point :param input_files: :param output_file: """ template_path = os.path.join(get_bundle_dir(), r'resources\eva-template.xlsx') workbook = load_workbook(template_path) raw_content_patterns = ('*EVA_config.xml', ) raw_content = load_raw_content(tuple(input_files), raw_content_patterns) eva_content = get_separated_content(raw_content, (raw_content_patterns[0], )) storage_inventory(workbook, eva_content) controller(workbook, eva_content) disk_group(workbook, eva_content) virtual_disks(workbook, eva_content) hosts(workbook, eva_content) disks(workbook, eva_content) disks_enclosure(workbook, eva_content) workbook.save(output_file)
def main(input_files: str, output_file: str) -> None: """IBM DS Entry point :param input_files: :param output_file: """ template_path = os.path.join(get_bundle_dir(), r'resources\ibmds-template.xlsx') workbook = load_workbook(template_path) raw_content_patterns = ('*.csv', ) raw_content = load_raw_content(tuple(input_files), raw_content_patterns) ibmds_content = get_separated_content(raw_content, (raw_content_patterns[0], )) storage_controllers(workbook, ibmds_content) features(workbook, ibmds_content) storage_enclosures(workbook, ibmds_content) drives(workbook, ibmds_content) arrays(workbook, ibmds_content) volumes(workbook, ibmds_content) pools(workbook, ibmds_content) san_hosts(workbook, ibmds_content) workbook.save(output_file)
def main(input_files: str, output_file: str) -> None: """XIV Entry point :param input_files: :param output_file: """ template_path = os.path.join(get_bundle_dir(), r'resources\xiv-template.xlsx') workbook = load_workbook(template_path) raw_content_patterns = ('*cod_list_-f_all/cli.txt', '*version_get/cli.txt', '*conf_get_path=system/cli.txt', '*conf_get_path=misc.status/cli.txt', '*disk_list_-f_all/cli.txt', '*pool_list_-f_all/cli.txt', '*vol_list_-f_all_show_proxy=yes/cli.xml', '*all_mappings_list/cli.xml', '*host_list_-f_all/cli.xml') raw_content = list( raw_tar_content(tuple(input_files), raw_content_patterns)) storage_controllers_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[1], raw_content_patterns[2]), '*' * 20 + '\n') disk_drivers_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[3], raw_content_patterns[4]), '*' * 20 + '\n') pools_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[5]), '*' * 20 + '\n') volumes_content_txt = get_separated_content(raw_content, (raw_content_patterns[0], )) volumes_content_xml = get_separated_content(raw_content, (raw_content_patterns[6], )) all_content_xml = get_separated_content(raw_content, (raw_content_patterns[7], )) hosts_mappings_content_xml = get_separated_content( raw_content, (raw_content_patterns[8], )) volumes_content = zip(volumes_content_txt, volumes_content_xml) hosts_content = zip(volumes_content_txt, all_content_xml, hosts_mappings_content_xml) storage_controllers(workbook, storage_controllers_content) disk_drives(workbook, disk_drivers_content) pools(workbook, pools_content) volumes(workbook, volumes_content) san_hosts(workbook, hosts_content) workbook.save(output_file)
def main(input_files: str, output_file: str) -> None: """VNX Entry point :param input_files: :param output_file: """ template_path = os.path.join(get_bundle_dir(), r'resources\emc-vnx-template.xlsx') workbook = load_workbook(template_path) raw_content_patterns = ('SPA_cfg_info.txt', 'SPB_cfg_info.txt', '*SPA_mirror_info.txt', '*SPB_mirror_info.txt', '*SPA_snap_info.txt', '*SPB_snap_info.txt', '*SPA_clone_info.txt', '*SPB_clone_info.txt') raw_content = load_raw_content(tuple(input_files), raw_content_patterns) spa_spb_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[1])) mirror_view_content = get_relevant_content( raw_content, (raw_content_patterns[2], raw_content_patterns[3])) snap_view_content = get_relevant_content( raw_content, (raw_content_patterns[4], raw_content_patterns[5])) snap_clones_content = get_relevant_content( raw_content, (raw_content_patterns[6], raw_content_patterns[7])) array_names, array_models, array_revisions = storage_array_summary( workbook, spa_spb_content) sp_frontend_data = sp_frontend_ports(workbook, spa_spb_content) storage_array_pivot(workbook, (sp_frontend_data, array_models, array_revisions)) initiator_type_pivot(workbook, sp_frontend_data) storage_groups_data = storage_groups(workbook, spa_spb_content) luns_data = luns(workbook, spa_spb_content, storage_groups_data) luns_pivot(workbook, luns_data) lun_storage_pivot(workbook, luns_data) software_packages(workbook, spa_spb_content) disks_data = disks(workbook, spa_spb_content) disks_pivot(workbook, disks_data) raid_groups(workbook, spa_spb_content) mirror_view_s(workbook, mirror_view_content, array_names) mirror_view_a(workbook, mirror_view_content, array_names) snap_view(workbook, snap_view_content, array_names) snap_clones(workbook, snap_clones_content, array_names) workbook.save(output_file)
def main(input_files: str, output_file: str) -> None: """Celerra Entry point :param input_files: :param output_file: """ template_path = os.path.join( get_bundle_dir(), r'resources\celerra-template.xlsx') workbook = load_workbook(template_path) raw_content_patterns = ( '*cmd_outputs/hostname', '*cmd_outputs/server_version', '*cmd_outputs/nas_summary', '*cmd_outputs/nas_license', '*cmd_outputs/nas_storage', '*cmd_outputs/nas_pool-info', '*cmd_outputs/*/navicli-getcrus', '*cmd_outputs/*/navicli-getagent', '*cmd_outputs/nas_server-list', '*cmd_outputs/server_export', '*cmd_outputs/server_df', '*cmd_outputs/fs_dedupe-list', '*cmd_outputs/nas_fs-info-all-o-mpd.txt', '*cmd_outputs/nas_replicate-info-all', '*cmd_outputs/nas_volume-info-size', ) raw_content = load_raw_content(tuple(input_files), raw_content_patterns) system_details_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[1], raw_content_patterns[6], raw_content_patterns[7]), '*' * 20 + '\n') nas_summary_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[2])) nas_license_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[3]), '*' * 20 + '\n') pool_configuration_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[4]), '*' * 20 + '\n') nas_pool_info_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[5]), '*' * 20 + '\n') disk_groups_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[4]), '*' * 20 + '\n') backend_storage_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[4]), '*' * 20 + '\n') backend_disk_info_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[4]), '*' * 20 + '\n') backend_details_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[4]), '*' * 20 + '\n') physical_dm_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[8]), '*' * 20 + '\n') virtual_dm_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[8]), '*' * 20 + '\n') cifs_share_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[9]), '*' * 20 + '\n') serverd_df_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[10]), '*' * 20 + '\n') fs_dedupe_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[11]), '*' * 20 + '\n') nas_fs_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[12]), '*' * 20 + '\n') nas_replicate_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[13]), '*' * 20 + '\n') volume_size_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[14]), '*' * 20 + '\n') system_details(workbook, system_details_content) nas_summary(workbook, nas_summary_content) nas_license(workbook, nas_license_content) pool_configuration(workbook, pool_configuration_content) nas_pool_info_all(workbook, nas_pool_info_content) disk_groups(workbook, disk_groups_content) backend_storage(workbook, backend_storage_content) backend_disk_info(workbook, backend_disk_info_content) backend_storage_details(workbook, backend_details_content) physical_dm(workbook, physical_dm_content) virtual_dm(workbook, virtual_dm_content) cifs_share(workbook, cifs_share_content) server_df(workbook, serverd_df_content) fs_dedupe(workbook, fs_dedupe_content) nas_fs_info_all(workbook, nas_fs_content) nas_replicate_info(workbook, nas_replicate_content) volume_size(workbook, volume_size_content) workbook.save(output_file)
def main(input_files: str, output_file: str) -> None: """Isilon Entry point :param input_files: :param output_file: """ template_path = os.path.join(get_bundle_dir(), r'resources\isilon-template.xlsx') workbook = load_workbook(template_path) raw_content_patterns = ('*.xml.gz', '*fsa_export_module_directories.csv', '*fsa_export_module_filecountlogical.csv', '*perf_export_ext_net_bytes_by_direction.csv', '*fsa_export_module_filecountmodified.csv', '*perf_export_module_proto_latency.csv', '*perf_export_module_proto_op_rate.csv', '*.xml') raw_content = list(isilon_raw_content(tuple(input_files))) perf_raw_content = [] # type: list for input_file in raw_content: perf_raw_content += raw_tar_content((input_file[0], ), raw_content_patterns[1:]) isilon_content = get_separated_content( raw_content, (raw_content_patterns[0], raw_content_patterns[7])) top_level_content = relevant_content_file_join(perf_raw_content, (raw_content_patterns[1], )) count_logical_content = relevant_content_file_join( perf_raw_content, (raw_content_patterns[2], )) throughput_content = relevant_content_file_join( perf_raw_content, (raw_content_patterns[3], )) count_modified_content = relevant_content_file_join( perf_raw_content, (raw_content_patterns[4], )) latency_content = relevant_content_file_join(perf_raw_content, (raw_content_patterns[5], )) ops_content = relevant_content_file_join(perf_raw_content, (raw_content_patterns[6], )) storage_inventory(workbook, isilon_content) storage_pool_summary(workbook, isilon_content) license_summary(workbook, isilon_content) nfs_rows = nfs_exports_list(workbook, isilon_content) smb_rows = smb_shares_list(workbook, isilon_content) quotas(workbook, isilon_content) file_system_protocol(workbook, nfs_rows, smb_rows) nfs_exports_zone(workbook, isilon_content) smb_shares_zone(workbook, isilon_content) zone_list(workbook, isilon_content) protocol_stats(workbook, isilon_content) pstat(workbook, isilon_content) drive_list(workbook, isilon_content) hw_status(workbook, isilon_content) sync_policies(workbook, isilon_content) perf_data = top_level_directories(workbook, top_level_content), \ throughput(workbook, throughput_content), \ ops(workbook, ops_content), \ latency(workbook, latency_content), \ count_logical(workbook, count_logical_content) performance_dashboard(workbook, perf_data) count_modified(workbook, count_modified_content) workbook.save(output_file)
def main(input_files: str, output_file: str) -> None: """3Par Entry point :param input_files: :param output_file: """ template_path = os.path.join( get_bundle_dir(), r'resources\3par-template.xlsx') workbook = load_workbook(template_path) raw_content_patterns = ( '*showsys.out', '*showsys_-d.out', '*showversion.out', '*showpd.out', '*showcage.out', '*showport.out', '*showcpg.out', '*shownode_-d.out', '*showhost_-verbose.out', '*showvv.out', '*showvv_-cpgalloc.out', '*showvlun.out', '*controlencryption_status.out', '*showlicense.out' ) raw_content = list(raw_tar_content(tuple(input_files), raw_content_patterns)) storage_array_summary_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[1], raw_content_patterns[2]), '*' * 20 + '\n') disks_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[3]), '*' * 20 + '\n') cage_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[4]), '*' * 20 + '\n') ports_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[5]), '*' * 20 + '\n') cpg_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[6]), '*' * 20 + '\n') nodes_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[7]), '*' * 20 + '\n') hosts_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[8]), '*' * 20 + '\n') volumes_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[9], raw_content_patterns[10], raw_content_patterns[11]), '*' * 20 + '\n') license_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[13], raw_content_patterns[12]), '*' * 20 + '\n') storage_array_summary(workbook, storage_array_summary_content) disks(workbook, disks_content) cage(workbook, cage_content) ports(workbook, ports_content) cpg(workbook, cpg_content) nodes(workbook, nodes_content) hosts(workbook, hosts_content) volumes(workbook, volumes_content) license_sheet(workbook, license_content) workbook.save(output_file)
def main(input_files: str, output_file: str) -> None: """XtremIO Entry point :param input_files: :param output_file: """ template_path = os.path.join(get_bundle_dir(), r'resources\xtremio-template.xlsx') workbook = load_workbook(template_path) raw_content_patterns = ( '*ShowClusters.out', '*ShowClustersInfo.out', '*ShowX-Bricks.out', '*ShowStorageControllersInfo.out', '*ShowClustersSavings.out', '*ShowSSDs.out', '*ShowTargets.out', '*ShowVolumes.out', '*ShowDataProtectionGroups.out', '*ShowVolumesPerformance.out', '*ShowLunMappings.out', '*ShowInitiators.out', '*ShowInitiatorGroups.out', '*performance_history.csv', ) raw_content = load_raw_content(tuple(input_files), raw_content_patterns) storage_array_summary_content = get_relevant_content( raw_content, (raw_content_patterns[0], raw_content_patterns[1], raw_content_patterns[2], raw_content_patterns[3], raw_content_patterns[4]), '\n' + '*' * 20 + '\n') disks_content = get_relevant_content(raw_content, (raw_content_patterns[5], ), '*' * 20 + '\n') target_ports_content = get_relevant_content(raw_content, (raw_content_patterns[6], ), '*' * 20 + '\n') show_volumes_content = get_relevant_content(raw_content, (raw_content_patterns[7], ), '*' * 20 + '\n') data_protection_content = get_relevant_content(raw_content, (raw_content_patterns[8], ), '*' * 20 + '\n') volume_performance_content = get_relevant_content( raw_content, (raw_content_patterns[9], ), '*' * 20 + '\n') lun_mapping_content = get_relevant_content(raw_content, (raw_content_patterns[10], ), '*' * 20 + '\n') initiator_groups_content = get_relevant_content( raw_content, (raw_content_patterns[11], raw_content_patterns[12]), '\n' + '*' * 20 + '\n') performance_content = get_relevant_content(raw_content, (raw_content_patterns[13], ), '\n' + '*' * 20 + '\n') performance_files = relevant_content_file_join( raw_content, (raw_content_patterns[13], )) clusters_files = relevant_content_file_join(raw_content, (raw_content_patterns[0], )) clusters = storage_array_summary(workbook, storage_array_summary_content) if len(performance_files) > 1: output_wb = output_file.split(os.sep) template_path = os.path.join( get_bundle_dir(), r'resources\xtremio-performance-template.xlsx') for file_content, file_cluster in \ zip(performance_files, clusters_files): perf_workbook = load_workbook(template_path) output_wb[-1] = file_content.split('/')[0] perf_output = os.sep.join(output_wb) + '_perf.xlsx' file_content = '\n'.join(file for file in file_content.split('\n')[1:]) perf_data = performance_output(perf_workbook, file_content) cluster_names = clusters_info(file_cluster) performance_summary(perf_workbook, perf_data + cluster_names) perf_workbook.save(perf_output) else: perf_data = performance_output(workbook, performance_content) performance_summary(workbook, perf_data + clusters) disks(workbook, disks_content) target_ports(workbook, target_ports_content) volumes(workbook, show_volumes_content) data_protection_groups(workbook, data_protection_content) volume_performance(workbook, volume_performance_content) lun_mapping(workbook, lun_mapping_content) initiators_and_groups(workbook, initiator_groups_content) workbook.save(output_file)
def main(input_files: str, output_file: str) -> None: """VMAX Entry point :param input_files: :param output_file: """ template_path = os.path.join(get_bundle_dir(), r'resources\vmax-template.xlsx') workbook = load_workbook(template_path) raw_content_patterns = ('*_symcfg_list.txt', '*_symaccess_list_devinfo.txt', '*_dskgrp_summary.txt', '*_symaccess_list_view.txt', '*_symaccess_show_init.txt', '*_list_tdev_gb_detail.txt', '*_symdev_list_identifier_device_name.txt', '*_symdev_list_wwn.txt', '*_type_backend.txt', '*_type_disks.txt', '*_type_requests.txt') raw_content = load_raw_content(tuple(input_files), raw_content_patterns) symcfg_list_content = get_relevant_content(raw_content, (raw_content_patterns[0], )) symdev_info_content = get_relevant_content(raw_content, (raw_content_patterns[1], ), '*' * 20) dskgrp_summary_content = get_relevant_content(raw_content, (raw_content_patterns[2], )) access_view_content = get_relevant_content(raw_content, (raw_content_patterns[3], ), '*' * 20) access_initiator_content = get_relevant_content( raw_content, (raw_content_patterns[4], )) thin_devices_content = get_relevant_content(raw_content, (raw_content_patterns[5], )) device_name_content = get_relevant_content(raw_content, (raw_content_patterns[6], ), '*' * 20) list_wwn_content = get_relevant_content(raw_content, (raw_content_patterns[7], ), '*' * 20) symcfg_list(workbook, symcfg_list_content) symdev_info(workbook, symdev_info_content) dskgrp_summary(workbook, dskgrp_summary_content) access_view(workbook, access_view_content) access_initiator(workbook, access_initiator_content) thin_devices(workbook, thin_devices_content) device_name_list(workbook, device_name_content) list_wwn(workbook, list_wwn_content) backend_content = relevant_content_file_join(raw_content, (raw_content_patterns[8], )) disks_content = relevant_content_file_join(raw_content, (raw_content_patterns[9], )) requests_content = relevant_content_file_join(raw_content, (raw_content_patterns[10], )) if len(backend_content) > 1: output_wb = output_file.split(os.sep) template_path = os.path.join( get_bundle_dir(), r'resources\vmax-performance-template.xlsx') for back_ct, disks_ct, requests_ct \ in zip(backend_content, disks_content, requests_content): perf_workbook = load_workbook(template_path) output_wb[-1] = back_ct.split('_')[0] perf_output = os.sep.join(output_wb) + '_perf.xlsx' backend(perf_workbook, back_ct) disks(perf_workbook, disks_ct) requests(perf_workbook, requests_ct) perf_workbook.save(perf_output) else: backend(workbook, backend_content[0]) disks(workbook, disks_content[0]) requests(workbook, requests_content[0]) workbook.save(output_file)