lib/vcloud-rest/vcloud/vapp_networking.rb
def generate_network_section(vAppId, network, config, type)
        params = {
          'method' => :get,
          'command' => "/vApp/vapp-#{vAppId}/networkConfigSection"
        }

        vapp_networks, headers = send_request(params)
        create_fake_network_node(vapp_networks, network[:name])

        if type.to_sym == :internal
          # Create a network configuration based on the config
          new_network = create_internal_network_node(config)
        else
          # Retrieve the requested network and prepare it for customization
          new_network = get_base_network(network[:id])
        end

        merge_network_config(vapp_networks, new_network, config)
      end
def generate_network_section(vAppId, network, config, type)
        params = {
          'method' => :get,
          'command' => "/vApp/vapp-#{vAppId}/networkConfigSection"
        }

        vapp_networks, headers = send_request(params)
        create_fake_network_node(vapp_networks, network[:name])

        if type.to_sym == :internal
          # Create a network configuration based on the config
          new_network = create_internal_network_node(config)
        else
          # Retrieve the requested network and prepare it for customization
          new_network = get_base_network(network[:id])
        end

        merge_network_config(vapp_networks, new_network, config)
      end
def generate_network_section ( vAppId , network , config , type ) params = { 'method' => :get , 'command' => "/vApp/vapp-#{vAppId}/networkConfigSection" } vapp_networks , headers = send_request ( params ) create_fake_network_node ( vapp_networks , network [ :name ] ) if type . to_sym == :internal # Create a network configuration based on the config new_network = create_internal_network_node ( config ) else # Retrieve the requested network and prepare it for customization new_network = get_base_network ( network [ :id ] ) end merge_network_config ( vapp_networks , new_network , config ) end
Create a NetworkConfigSection for a new internal or external network
Create a NetworkConfigSection for a new internal or external network