def main():
<EOL>try:<EOL><INDENT>with open('<STR_LIT>') as config_file:<EOL><INDENT>config_data = json.load(config_file)<EOL><DEDENT><DEDENT>except FileNotFoundError:<EOL><INDENT>sys.exit('<STR_LIT>')<EOL><DEDENT>tenant_id = config_data['<STR_LIT>']<EOL>app_id = config_data['<STR_LIT>']<EOL>app_secret = config_data['<STR_LIT>']<EOL>subscription_id = config_data['<STR_LIT>']<EOL>access_token = azurerm.get_access_token(tenant_id, app_id, app_secret)<EOL>vmsslist = azurerm.list_vmss_sub(access_token, subscription_id)<EOL>for vmss in vmsslist['<STR_LIT:value>']:<EOL><INDENT>name = vmss['<STR_LIT:name>']<EOL>location = vmss['<STR_LIT:location>']<EOL>capacity = vmss['<STR_LIT>']['<STR_LIT>']<EOL>print('<STR_LIT>'.join(['<STR_LIT>', name, '<STR_LIT>',<EOL>location, '<STR_LIT>', str(capacity)]))<EOL>print('<STR_LIT>')<EOL>rgname = get_rg_from_id(vmss['<STR_LIT:id>'])<EOL>vmss_nics = azurerm.get_vmss_nics(<EOL>access_token, subscription_id, rgname, name)<EOL>print(json.dumps(vmss_nics, sort_keys=False,<EOL>indent=<NUM_LIT:2>, separators=('<STR_LIT:U+002C>', '<STR_LIT>')))<EOL>print('<STR_LIT>')<EOL>vms = azurerm.list_vmss_vms(<EOL>access_token, subscription_id, rgname, name)<EOL>for vmssvm in vms['<STR_LIT:value>']:<EOL><INDENT>vm_id = vmssvm['<STR_LIT>']<EOL>print(vm_id + '<STR_LIT:U+002CU+0020>' + vmssvm['<STR_LIT:name>'] + '<STR_LIT:\n>')<EOL>print('<STR_LIT>')<EOL>vmnics = azurerm.get_vmss_vm_nics(access_token, subscription_id, rgname, name,<EOL>vm_id)<EOL>print(json.dumps(vmnics, sort_keys=False,<EOL>indent=<NUM_LIT:2>, separators=('<STR_LIT:U+002C>', '<STR_LIT>')))<EOL><DEDENT><DEDENT>
main routine