lib/vcloud-rest/vcloud/vapp_networking.rb
def create_internal_network_node(network_config)
        builder = Nokogiri::XML::Builder.new do |xml|
          xml.Configuration {
            xml.IpScopes {
              xml.IpScope {
                xml.IsInherited(network_config[:is_inherited] || "false")
                xml.Gateway network_config[:gateway]
                xml.Netmask network_config[:netmask]
                xml.Dns1 network_config[:dns1] if network_config[:dns1]
                xml.Dns2 network_config[:dns2] if network_config[:dns2]
                xml.DnsSuffix network_config[:dns_suffix] if network_config[:dns_suffix]
                xml.IsEnabled(network_config[:is_enabled] || true)
                xml.IpRanges {
                  xml.IpRange {
                    xml.StartAddress network_config[:start_address]
                    xml.EndAddress network_config[:end_address]
                  }
                }
              }
            }
            xml.FenceMode 'isolated'
            xml.RetainNetInfoAcrossDeployments(network_config[:retain_info] || false)
          }
        end
        builder.doc
      end
def create_internal_network_node(network_config)
        builder = Nokogiri::XML::Builder.new do |xml|
          xml.Configuration {
            xml.IpScopes {
              xml.IpScope {
                xml.IsInherited(network_config[:is_inherited] || "false")
                xml.Gateway network_config[:gateway]
                xml.Netmask network_config[:netmask]
                xml.Dns1 network_config[:dns1] if network_config[:dns1]
                xml.Dns2 network_config[:dns2] if network_config[:dns2]
                xml.DnsSuffix network_config[:dns_suffix] if network_config[:dns_suffix]
                xml.IsEnabled(network_config[:is_enabled] || true)
                xml.IpRanges {
                  xml.IpRange {
                    xml.StartAddress network_config[:start_address]
                    xml.EndAddress network_config[:end_address]
                  }
                }
              }
            }
            xml.FenceMode 'isolated'
            xml.RetainNetInfoAcrossDeployments(network_config[:retain_info] || false)
          }
        end
        builder.doc
      end
def create_internal_network_node ( network_config ) builder = Nokogiri :: XML :: Builder . new do | xml | xml . Configuration { xml . IpScopes { xml . IpScope { xml . IsInherited ( network_config [ :is_inherited ] || "false" ) xml . Gateway network_config [ :gateway ] xml . Netmask network_config [ :netmask ] xml . Dns1 network_config [ :dns1 ] if network_config [ :dns1 ] xml . Dns2 network_config [ :dns2 ] if network_config [ :dns2 ] xml . DnsSuffix network_config [ :dns_suffix ] if network_config [ :dns_suffix ] xml . IsEnabled ( network_config [ :is_enabled ] || true ) xml . IpRanges { xml . IpRange { xml . StartAddress network_config [ :start_address ] xml . EndAddress network_config [ :end_address ] } } } } xml . FenceMode 'isolated' xml . RetainNetInfoAcrossDeployments ( network_config [ :retain_info ] || false ) } end builder . doc end
Create a fake Configuration node for internal networking
Create a fake Configuration node for internal networking