lib/azure/armrest/virtual_machine_service.rb
# Delete a +service+ type resource using its name and resource group,
# and wait for the operation to complete before returning.
#
# If the operation fails because a dependent resource is still attached,
# then the error is logged (in verbose mode) and ignored.
#
Delete a +service+ type resource using its name and resource group,
and wait for the operation to complete before returning.

If the operation fails because a dependent resource is still attached,
then the error is logged (in verbose mode) and ignored.
Delete a + service + type resource using its name and resource group and wait for the operation to complete before returning . If the operation fails because a dependent resource is still attached then the error is logged ( in verbose mode ) and ignored .
def delete_and_wait(service, name, group, options)
        resource_type = service.class.to_s.sub('Service', '').split('::').last
        log("Deleting #{resource_type} #{name}/#{group}") if options[:verbose]
        wait(service.delete(name, group), 0)
        log("Deleted #{resource_type} #{name}/#{group}") if options[:verbose]
      rescue Azure::Armrest::BadRequestException, Azure::Armrest::PreconditionFailedException => err
        if options[:verbose]
          msg = "Unable to delete #{resource_type} #{name}/#{group}, skipping. Message: #{err.message}"
          log('warn', msg)
        end
      end
def delete_and_wait ( service , name , group , options ) resource_type = service . class . to_s . sub ( 'Service' , '' ) . split ( '::' ) . last log ( "Deleting #{resource_type} #{name}/#{group}" ) if options [ :verbose ] wait ( service . delete ( name , group ) , 0 ) log ( "Deleted #{resource_type} #{name}/#{group}" ) if options [ :verbose ] rescue Azure :: Armrest :: BadRequestException , Azure :: Armrest :: PreconditionFailedException => err if options [ :verbose ] msg = "Unable to delete #{resource_type} #{name}/#{group}, skipping. Message: #{err.message}" log ( 'warn' , msg ) end end
Delete a +service+ type resource using its name and resource group,
and wait for the operation to complete before returning.
Delete a + service + type resource using its name and resource group and wait for the operation to complete before returning .
service
<not_specific>
name
<not_specific>
group
<not_specific>
options
<not_specific>