1

Ordering a Vyatta router on #SoftLayer #BlueMix and the order JSON is the following

gatewayOrder = {
    'orderContainers': [{
        'quantity': 2,  # high availability is 2 quantity
        'hardware': [
            {
            'hostname': vyatta_fr_hostname,
            'domain': vyatta_domain,
            'networkVlans': [
                {'vlanNumber': vlanPub },
                {'vlanNumber': vlanPriv }
            ]},
            {
                'hostname': vyatta_bu_hostname,
                'domain': vyatta_domain,
                'networkVlans': [
                    {'vlanNumber': vlanPub },
                    {'vlanNumber': vlanPriv }
            ]}
        ],
        'location': locationId,
        'packageId': pkgIdGW,
        'prices': [
            {'id': vyatta_system_dual_intel_2620 },
            {'id': vyatta_os_vyatta_5600 },
            {'id': vyatta_64_gb_ram },
            {'id': vyatta_disk_controller },
            {'id': vyatta_disk_500_gb },
            {'id': vyatta_disk_4_tb },
            {'id': vyatta_net_20000 },
            {'id': vyatta_net_10_gbps },
            {'id': vyatta_kvm_reboot },
            {'id': vyatta_ssl_vpn },
            {'id': vyatta_1_ip },
            {'id': vyatta_redundant_power },
            {'id': vyatta_host_monitoring },
            {'id': vyatta_auto_reboot },
            {'id': vyatta_notification_email },
            {'id': vyatta_nessus },
        ],
    }]
}

Vlans are not being added to the order. Why?

Vega
  • 27,856
  • 27
  • 95
  • 103

2 Answers2

1

UPDATE

Try the following rest example:

method: POST
https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Product_Order/verifyOrder


JSON body:

{
"parameters": [
   {
    "orderContainers": [
     {
      "hardware": [
        {
          "hostname": "vyattaVlantest",
          "domain": "domain.com",
          "primaryBackendNetworkComponent":{
                "networkVlanId":1111111
                },
          "primaryNetworkComponent":{
                "networkVlanId":2222222
                }
        }
      ],
      "location":"DALLAS13" ,
      "packageId": 236,
      "quantity": 1,
      "prices": [
        {
          "id": 177611
        },
        {
          "id": 17182
        },
        {
          "id": 201189
        },
        {
          "id": 876
        },
        {
          "id": 14031
        },
        {
          "id": 342
        },
        {
          "id": 273
        },
        {
          "id": 792
        },
        {
          "id": 55
        },
        {
          "id": 58
        },
        {
          "id": 420
        },
        {
          "id": 418
        },
        {
          "id": 21
        },
        {
          "id": 57
        },
        {
          "id": 906
        }
      ]
    }
  ]
}
]
}

The returned value in the response should display something like what´s below:

                    "primaryBackendNetworkComponent": {
                        "networkVlanId": 1111111,
                        "networkVlan": {
                            "id": 1111111,
                            "primarySubnetId": 123123123,
                            "vlanNumber": 591
                        }
                    },
                    "primaryNetworkComponent": {
                        "networkVlanId": 2222222,
                        "networkVlan": {
                            "id": 2222222,
                            "primarySubnetId": 789789789,
                            "vlanNumber": 768
                        }
                    }
                }
            ],
Fernando Iquiza
  • 531
  • 3
  • 7
  • I dont even see a place in the order verification that indicates a VLAN can be given in the order. – Andrew Anderson Mar 15 '18 at 14:49
  • I updated the answer, change the proper values for yours, it should display the proper vlan information as above in the returned response – Fernando Iquiza Mar 19 '18 at 19:08
  • This did not work. Now the api is complaining that the VLAN is not standard – Andrew Anderson Mar 21 '18 at 15:22
  • I dont know how to add information to this question to show you the error. – Andrew Anderson Mar 21 '18 at 19:41
  • /SoftLayer/API.py", line 358, in call return self.client.call(self.name, name, *args, **kwargs) File "/Library/Python/2.7/site-packages/SoftLayer-5.4.2-py2.7.egg/SoftLayer/API.py", line 261, in call return self.transport(request) File "/Library/Python/2.7/site-packages/SoftLayer-5.4.2-py2.7.egg/SoftLayer/transports.py", line 215, in __call__ raise _ex(ex.faultCode, ex.faultString) SoftLayer.exceptions.SoftLayerAPIError: SoftLayerAPIError(SoftLayer_Exception_Public): The backend VLAN #2266303 is not a standard VLAN – Andrew Anderson Mar 21 '18 at 19:42
  • That error is due that you are trying to use a Transit type Vlan instead of an standard in the order, try the following to obtain the available public and private vlans for your order: method POST https://api.softlayer.com/rest/v3.1/SoftLayer_Product_Order/getVlans JSON body { "parameters":[ 957095, 236 ] } Change the locationId and the package for the ones you are using in the order container. – Fernando Iquiza Mar 21 '18 at 21:39
  • the two vlans i am connecting this to is the 764 for the public interface and 819 for the private interface. these are the gateway vlans. I am not looking to add associated vlans at the time of creation. I have created several routers with these VLANS using the UI. – Andrew Anderson Mar 22 '18 at 13:24
  • I ran the API command - it comes back with 949 and 996 for dal9 pod6. These are the correct ASSOCIATED vlans. But they are NOT the correct Gatway vlans that the router needs to be placed on. As I commented above, I need these routers on 764 and 819. Just as I would order through the UI. – Andrew Anderson Mar 22 '18 at 13:33
0

This did not work. Now the api is complaining that the VLAN is not standard

You specified the VLAN id correctly, but didn't pick a correct VLAN. You can only order Vyattas on Standard vlans, which is to say VLANs that are not already part of a gateway as either a gateway or associated vlans.

The control portal order page should reflect this as well.

Chris Gallo
  • 191
  • 1
  • 4
  • Vlan 764 and 819 are Dal9 pod6 and can service any number of routers. I have ordered 8 routers over the past 2 months and they have all been assigned to these two vlans. All at the same time. I am not referring to "associated vlans" - I am aware that associated vlans are 1:1 with a router pair and cannot be shared. I just tested the creation of a router pair with the portal and it also DOES NOT include the gateway vlans, a technician must fill those in. – Andrew Anderson Mar 27 '18 at 17:09
  • It would appear to me that the API does NOT support the assignment of "gateway vlans." This requires manual intervention. It does support the assignment of "associated vlans" and we are aware of how that works. I am able to add them after provision without a problem. – Andrew Anderson Mar 27 '18 at 17:10