Chapter 09/circuit-oneops-1-master/components/cookbooks/azure/libraries/public_ip.rb
# this will build the public_ip object to be used for creating a public
# ip in azure
this will build the public_ip object to be used for creating a public
ip in azure
this will build the public_ip object to be used for creating a public ip in azure
def build_public_ip_object(ci_id)
      public_ip_configs =
        Azure::ARM::Network::Models::PublicIpAddressPropertiesFormat.new
      public_ip_configs.public_ipallocation_method =
        Azure::ARM::Network::Models::IpAllocationMethod::Dynamic
      public_ip_address = Azure::ARM::Network::Models::PublicIpAddress.new
      public_ip_address.location = @location
      public_ip_address.name = Utils.get_component_name('publicip',ci_id)
      public_ip_address.properties = public_ip_configs
      OOLog.info("Public IP name is: #{public_ip_address.name}")
      public_ip_address
    end
def build_public_ip_object ( ci_id ) public_ip_configs = Azure :: ARM :: Network :: Models :: PublicIpAddressPropertiesFormat . new public_ip_configs . public_ipallocation_method = Azure :: ARM :: Network :: Models :: IpAllocationMethod :: Dynamic public_ip_address = Azure :: ARM :: Network :: Models :: PublicIpAddress . new public_ip_address . location = @location public_ip_address . name = Utils . get_component_name ( 'publicip' , ci_id ) public_ip_address . properties = public_ip_configs OOLog . info ( "Public IP name is: #{public_ip_address.name}" ) public_ip_address end
this will build the public_ip object to be used for creating a public
ip in azure
this will build the public_ip object to be used for creating a public ip in azure
ci_id
<not_specific>