TheWeatherCompany / softlayer-go

A SoftLayer client API written in Golang
Apache License 2.0
5 stars 3 forks source link

Add SoftLayer_Network_Application_Delivery_Controller support #21

Open igoonich opened 8 years ago

igoonich commented 8 years ago

Implement basic operations for resource SoftLayer_Network_Application_Delivery_Controller.

Changes expected to be done with respect to terraform issue: https://github.com/TheWeatherCompany/terraform/issues/15

Specifically the functionality for NetScaler VPX is needed. NetScaler VPX is a virtual router that is provisioned in much the same way as a Virtual Guest, once it is provisioned the SoftLayer API can control the device.

One question that remains open is if it can actually be provisioned via the API, let's work on that problem first, and then the rest will follow.

danielcbright commented 8 years ago

:+1:

markuzet commented 8 years ago

@danielcbright what fields are you expecting to be modifyable during the creation of VPX and available for further edit? Here's the template used for creation. Currently for creation the following JSON is used:

{
  "parameters": [
    {
      "packageId": 192,
      "complexType":"SoftLayer_Container_Product_Order_Network_Application_Delivery_Controller",
      "location": "DALLAS06",
      "prices": [
        {
          "id": 22315,              
          "complexType": "SoftLayer_Product_Item_Price"
        },
       {
          "id": 17238,               
          "complexType": "SoftLayer_Product_Item_Price"
        }

      ],
    "quantity": 1
    }
    ]
}

Location field could be taken directly from the .tf file.

packageId stands for VPX service and the two price ids - the configuration itself. How do you plan to configure the VPX in terraform configuration file?

markuzet commented 8 years ago

Hi, @danielcbright Here's a description of fields, that can be fethced for an existing Application Delivery Controller

Which of the fields are you excpeting to be in the output .tfstate file? Actually all of them can be matched despite loadBalancerCount and loadBalancers - server returns error if the corresbonding mask is present in the request - An error has occurred while processing your request. Please try again later.

We're using standard mapping conventions currently for matching sl fields (virtualAddressCount) and tf fields (virtual_address_count), is it ok?