Skip to content

VirtualServerOrder_Package class doesn't define VLANs #111

@rubercuellar

Description

@rubercuellar

There is an issue at the moment to specify vlans:

 product_order['primaryNetworkComponent']        = { "networkVlan" => { "id" => @public_vlan_id.to_i } } if @public_vlan_id
 product_order['primaryBackendNetworkComponent'] = { "networkVlan" => {"id" => @private_vlan_id.to_i } } if @private_vlan_id

The vlans should be specified inside of "hardware" object. This could be a possible solution

  def virtual_server_order
      product_order = {
        'packageId'        => @package.id,
        'useHourlyPricing' => !!@hourly,
        'hardware'    => [{
                                 'domain'   => @domain,
                                 'hostname' => @hostname,
                                 'primaryNetworkComponent' => { "networkVlan" => { "id" => @public_vlan_id.to_i } } if @public_vlan_id,
                                 'primaryBackendNetworkComponent' => { "networkVlan" => {"id" => @private_vlan_id.to_i } } if @private_vlan_id
                               }]
      }

I replaced 'hardware' instead of 'virtualGuests', because it is not possible to set vlans using 'virtualGuests' object. (It seems an issue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions