Chapter 09/circuit-oneops-1-master/components/cookbooks/azure/recipes/del_node.rb
#Delete public ip assocaited with the VM
Delete public ip assocaited with the VM
Delete public ip assocaited with the VM
def delete_publicip(credentials,subscription_id,resource_group_name, public_ip_name)
  begin
    start_time = Time.now.to_i
    networkclient = NetworkResourceProviderClient.new(credentials)
    networkclient.subscription_id = subscription_id
    promise = networkclient.public_ip_addresses.delete(resource_group_name, public_ip_name)
    details = promise.value!
    end_time = Time.now.to_i
    duration = end_time - start_time
    Chef::Log.info("Deleting public ip '#{public_ip_name}' in #{duration} seconds")
 end
end
def delete_publicip ( credentials , subscription_id , resource_group_name , public_ip_name ) begin start_time = Time . now . to_i networkclient = NetworkResourceProviderClient . new ( credentials ) networkclient . subscription_id = subscription_id promise = networkclient . public_ip_addresses . delete ( resource_group_name , public_ip_name ) details = promise . value! end_time = Time . now . to_i duration = end_time - start_time Chef :: Log . info ( "Deleting public ip '#{public_ip_name}' in #{duration} seconds" ) end end
Delete public ip assocaited with the VM
Delete public ip assocaited with the VM
credentials
<not_specific>
subscription_id
<not_specific>
resource_group_name
<not_specific>
public_ip_name
<not_specific>