def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME, None) disk = Disk(gcp_config, ctx.logger, name=name) utils.delete_if_not_external(disk) ctx.instance.runtime_properties.pop(constants.DISK, None) ctx.instance.runtime_properties.pop(constants.NAME, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME, None) if name: url_map = UrlMap(gcp_config, ctx.logger, name=name) utils.delete_if_not_external(url_map) ctx.instance.runtime_properties.pop(constants.NAME, None) ctx.instance.runtime_properties.pop(constants.SELF_URL, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME, None) if name: static_ip = StaticIP(gcp_config, ctx.logger, name=name) utils.delete_if_not_external(static_ip) ctx.instance.runtime_properties.pop(constants.NAME, None) ctx.instance.runtime_properties.pop(constants.IP, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME, None) if name: instance_group = InstanceGroup(gcp_config, ctx.logger, name=name) utils.delete_if_not_external(instance_group) ctx.instance.runtime_properties.pop(constants.NAME, None) ctx.instance.runtime_properties.pop(constants.SELF_URL, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME, None) if not name: return network = Network(gcp_config, ctx.logger, network={'name': name}) utils.delete_if_not_external(network) ctx.instance.runtime_properties.pop(constants.NAME, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME, None) disk = Disk(gcp_config, ctx.logger, name=name) utils.delete_if_not_external(disk) ctx.instance.runtime_properties.pop(constants.DISK, None) ctx.instance.runtime_properties.pop(constants.NAME, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME, None) if name: forwarding_rule = GlobalForwardingRule(gcp_config, ctx.logger, name=name) utils.delete_if_not_external(forwarding_rule) ctx.instance.runtime_properties.pop(constants.NAME, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME) if name: ssl_certificate = SslCertificate(config=gcp_config, logger=ctx.logger, name=name) utils.delete_if_not_external(ssl_certificate) ctx.instance.runtime_properties.pop(constants.NAME, None) ctx.instance.runtime_properties.pop(constants.SELF_URL, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME, None) if name: static_ip = StaticIP(gcp_config, ctx.logger, name=name) utils.delete_if_not_external(static_ip) ctx.instance.runtime_properties.pop(constants.NAME, None) ctx.instance.runtime_properties.pop(constants.IP, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME, None) if not name: return network = Network(gcp_config, ctx.logger, network={'name': name}) utils.delete_if_not_external(network) ctx.instance.runtime_properties.pop(constants.NAME, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME, None) if name: backend_service = BackendService(gcp_config, ctx.logger, name=name) utils.delete_if_not_external(backend_service) ctx.instance.runtime_properties.pop(constants.NAME, None) ctx.instance.runtime_properties.pop(constants.SELF_URL, None) ctx.instance.runtime_properties.pop(constants.BACKENDS, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() firewall_name = ctx.instance.runtime_properties.get(constants.NAME, None) if not firewall_name: return network_name = utils.get_gcp_resource_name(gcp_config['network']) firewall = FirewallRule(gcp_config, ctx.logger, firewall={'name': firewall_name}, network=network_name) utils.delete_if_not_external(firewall) ctx.instance.runtime_properties.pop(constants.NAME, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME, None) if name: instance = Instance(gcp_config, ctx.logger, name=name) utils.delete_if_not_external(instance) ctx.instance.runtime_properties.pop(constants.DISK, None) ctx.instance.runtime_properties.pop(constants.NAME, None) ctx.instance.runtime_properties.pop(constants.GCP_ZONE, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() firewall_name = ctx.instance.runtime_properties.get(constants.NAME, None) if not firewall_name: return network_name = utils.get_gcp_resource_name(gcp_config['network']) firewall = FirewallRule(gcp_config, ctx.logger, firewall={'name': firewall_name}, network=network_name) utils.delete_if_not_external(firewall) ctx.instance.runtime_properties.pop(constants.NAME, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME) health_check_type = ctx.instance.runtime_properties.get( constants.HEALTH_CHECK_TYPE) if name: health_check = health_check_of_type(health_check_type, config=gcp_config, logger=ctx.logger, name=name) utils.delete_if_not_external(health_check) ctx.instance.runtime_properties.pop(constants.NAME, None) ctx.instance.runtime_properties.pop(constants.HEALTH_CHECK_TYPE, None) ctx.instance.runtime_properties.pop(constants.SELF_URL, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME) target_proxy_type = ctx.instance.runtime_properties.get( constants.TARGET_PROXY_TYPE) if name: target_proxy = target_proxy_of_type(target_proxy_type, config=gcp_config, logger=ctx.logger, name=name) utils.delete_if_not_external(target_proxy) ctx.instance.runtime_properties.pop(constants.NAME, None) ctx.instance.runtime_properties.pop(constants.TARGET_PROXY_TYPE, None) ctx.instance.runtime_properties.pop(constants.SELF_URL, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME) target_proxy_type = ctx.instance.runtime_properties.get( constants.TARGET_PROXY_TYPE) if name: target_proxy = target_proxy_of_type(target_proxy_type, config=gcp_config, logger=ctx.logger, name=name) utils.delete_if_not_external(target_proxy) ctx.instance.runtime_properties.pop(constants.NAME, None) ctx.instance.runtime_properties.pop(constants.TARGET_PROXY_TYPE, None) ctx.instance.runtime_properties.pop(constants.SELF_URL, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME, None) image = Image(gcp_config, ctx.logger, name) utils.delete_if_not_external(image) ctx.instance.runtime_properties.pop(constants.NAME, None)
def delete(**kwargs): gcp_config = utils.get_gcp_config() name = ctx.instance.runtime_properties.get(constants.NAME, None) image = Image(gcp_config, ctx.logger, name) utils.delete_if_not_external(image) ctx.instance.runtime_properties.pop(constants.NAME, None)