def get_provisioning_state(**_): utils.validate_node_properties(constants.STORAGE_ACCOUNT_REQUIRED_PROPERTIES, ctx.node.properties) resource_group_name = ctx.instance.runtime_properties[constants.RESOURCE_GROUP_KEY] storage_account_name = ctx.instance.runtime_properties[constants.STORAGE_ACCOUNT_KEY] ctx.logger.info("Searching for storage account {0} in resource group {1}".format(storage_account_name, resource_group_name)) headers, location, subscription_id = auth.get_credentials() storage_account_url = "{0}/subscriptions/{1}/resourceGroups/{2}/providers/" \ "Microsoft.Storage/storageAccounts/{3}?api-version={4}".\ format(constants.azure_url, subscription_id, resource_group_name, storage_account_name, constants.api_version) return azurerequests.get_provisioning_state(headers, storage_account_name, storage_account_url)
def get_provisioning_state(**_): utils.validate_node_properties( constants.STORAGE_ACCOUNT_REQUIRED_PROPERTIES, ctx.node.properties) resource_group_name = ctx.instance.runtime_properties[ constants.RESOURCE_GROUP_KEY] storage_account_name = ctx.instance.runtime_properties[ constants.STORAGE_ACCOUNT_KEY] ctx.logger.info( "Searching for storage account {0} in resource group {1}".format( storage_account_name, resource_group_name)) headers, location, subscription_id = auth.get_credentials() storage_account_url = "{0}/subscriptions/{1}/resourceGroups/{2}/providers/" \ "Microsoft.Storage/storageAccounts/{3}?api-version={4}".\ format(constants.azure_url, subscription_id, resource_group_name, storage_account_name, constants.api_version) return azurerequests.get_provisioning_state(headers, storage_account_name, storage_account_url)
def creation_validation(**_): for property_key in constants.VM_REQUIRED_PROPERTIES: utils.validate_node_properties(property_key, ctx.node.properties)
def creation_validation(**_): for property_key in constants.VNET_REQUIRED_PROPERTIES: utils.validate_node_properties(property_key, ctx.node.properties)
def creation_validation(**_): utils.validate_node_properties(constants.VM_REQUIRED_PROPERTIES, ctx.node.properties) utils.validate_node_properties(constants.NIC_REQUIRED_PROPERTIES, ctx.node.properties)