softlayer / githubio_source

Templates files for generating softlayer.github.io
Other
1 stars 11 forks source link

Update ordering article. #322

Closed allmightyspiff closed 4 years ago

allmightyspiff commented 4 years ago
sacfxdx commented 4 years ago

a step by step process with explanations of what to look for and how to troubleshoot errors that are encountered. The SoftLayer API is very complicated and has many interdependencies. Having an explanation of the errors and what they mean would be extremely helpful. Errors on ordering mention missing categories but there is no structure documented (that I can find) to show what format is needed to pass the missing category. I see an example for passing a user hostname and domain. I do not see how to pass a primaryIpAddress (or other fields) when ordering.

allmightyspiff commented 4 years ago

@sacfxdx If your order is complaining about a missing category, that usually means you need to add a priceId in your order to match a priceid from that category.

Currently https://sldn.softlayer.com/article/understanding-ordering/ is the best I have on breaking down how ordering works.

Also, you can't set the primaryIpAddress, that is assigned by our provisioning system. You can set the primary vlan / subnet though.

https://sldn.softlayer.com/python/orderBareMetal/ Has an example of setting the vlan (by specifying hardware->primaryBackendNetworkComponent->vlan->id). The same can be done for subnets by specifying hardware->primaryBackendNetworkComponent->primarySubnet->id . I think if you want to specify a subnet, you need to specify the VLAN as well.

The same can be done for the primaryFrontendNetworkComponent of course.

sacfxdx commented 4 years ago

Thank you for the reply and info.

Do you have any documentation on the input structure so I know how to pass other override values?

Sent from my iPhone

On Mar 4, 2020, at 4:18 PM, Christopher Gallo notifications@github.com wrote:

 @sacfxdx If your order is complaining about a missing category, that usually means you need to add a priceId in your order to match a priceid from that category.

Currently https://sldn.softlayer.com/article/understanding-ordering/ is the best I have on breaking down how ordering works.

Also, you can't set the primaryIpAddress, that is assigned by our provisioning system. You can set the primary vlan / subnet though.

https://sldn.softlayer.com/python/orderBareMetal/ Has an example of setting the vlan (by specifying hardware->primaryBackendNetworkComponent->vlan->id). The same can be done for subnets by specifying hardware->primaryBackendNetworkComponent->primarySubnet->id . I think if you want to specify a subnet, you need to specify the VLAN as well.

The same can be done for the primaryFrontendNetworkComponent of course.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

allmightyspiff commented 4 years ago

The "base" data structure for the --extras is https://sldn.softlayer.com/reference/datatypes/SoftLayer_Container_Product_Order_Hardware_Server/

The hardware datastructure is a https://sldn.softlayer.com/reference/datatypes/SoftLayer_Hardware/

Generally the only things that are editable will be the things you can set in the UI when ordering a server.

sacfxdx commented 4 years ago

thank you. this will help.

On Mar 4, 2020, at 5:37 PM, Christopher Gallo notifications@github.com wrote:

The "base" data structure for the --extras is https://sldn.softlayer.com/reference/datatypes/SoftLayer_Container_Product_Order_Hardware_Server/ https://sldn.softlayer.com/reference/datatypes/SoftLayer_Container_Product_Order_Hardware_Server/ The hardware datastructure is a https://sldn.softlayer.com/reference/datatypes/SoftLayer_Hardware/ https://sldn.softlayer.com/reference/datatypes/SoftLayer_Hardware/ Generally the only things that are editable will be the things you can set in the UI when ordering a server.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/softlayer/githubio_source/issues/322?email_source=notifications&email_token=AEKBNAQJ5U5XH6X7NWTAPQDRF3J27A5CNFSM4LATOEXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN2X7XY#issuecomment-594903007, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKBNAQ4IAPQSHEULWN5BKDRF3J27ANCNFSM4LATOEXA.

sacfxdx commented 4 years ago

From your text:

Also, you can't set the primaryIpAddress, that is assigned by our provisioning system. You can set the primary vlan / subnet though.

How can I resolve this error if I cannot set the Primary IP Address?

Error: order exception: SoftLayer_Exception_Order_MissingCategory: Order is missing the following category: Primary IP Addresses

I am setting extras as { "hardware": [ { "hostname": "test-sac", "domain": "federated.fds", "primaryBackendNetworkComponent": { "networkVlan": { "id": 804 } }

sacfxdx commented 4 years ago

oops. I left out the '1_IP_ADDRESS' item. I am past the IP address issue and now I am back to this error

order exception: SoftLayer_Exception_Public: Windows Server 2016 Standard Edition (64 bit) (28 Cores), price ID# 179935, has a Cores capacity restriction that does not match the capacity of Dual Intel Xeon E5-2620 v4 (16 Cores, 2.10 GHz), price ID# 177639. Please submit prices that are compatible.

dual 16 core CPUs should provide 32 cores. Restriction says 28 cores required.

I looked up the specs for Intel Xeon E5-2620 v4. It's 8 cores per CPU so dual would be 16 cores only. Now that I know that I'll check other options. No need to reply to this post.

Sorry for the confusion.

sacfxdx commented 4 years ago

20200305-0054209508-en-US.pdf

I created a quote (attached) with ' Operating System: Windows Server 2016 Standard Edition (64 bit)' When I list the items from 'DUAL_E52600_V4_4_DRIVES' in the CLI, I do not see this standard OS listed. What am I doing wrong?

(IBMcloud) esu2v436@SVC: slcli order item-list DUAL_E52600_V4_4DRIVES | grep "^os " |grep -i server os OS_CITRIX_XENSERVER_6_5 Citrix XenServer 6.5 47131 os OS_VMWARE_SERVER_VIRTUALIZATION_6_5 VMware Server Virtualization 6.5 201161 os OS_WINDOWS_SERVER_2016_DATACENTER_EDITION_WITH_HYPERV_64_BIT Windows Server 2016 Datacenter Edition With Hyper-V (64 bit) 179951 os OS_VMWARE_SERVER_VIRTUALIZATION_6_5_UPDATE_1G VMware Server Virtualization 6.5 Update 1g 215243 os OS_WINDOWS_SERVER_2019_DATACENTER_EDITION_64BIT Windows Server 2019 Datacenter Edition (64 bit) 230663 os OS_VMWARE_SERVER_VIRTUALIZATION_6_7 VMware Server Virtualization 6.7 222313 os OS_CITRIX_XENSERVER_6_2_1 Citrix XenServer 6.2.1 36381 os OS_CITRIX_XENSERVER_7_0_0 Citrix XenServer 7.0.0 176625 os OS_VMWARE_SERVER_VIRTUALIZATION_6_5_UPDATE_2_U2 VMware Server Virtualization 6.5 Update 2 228935 os OS_VMWARE_SERVER_VIRTUALIZATION_6_5_UPDATE_3 VMware Server Virtualization 6.5 Update 3 241142 os OS_WINDOWS_SERVER_2016_DATACENTER_EDITION_64_BIT Windows Server 2016 Datacenter Edition (64 bit) 179979 os OS_CITRIX_XENSERVER_7_1_0 Citrix XenServer 7.1.0 198607 os OS_CITRIX_XENSERVER_7_2_0 Citrix XenServer 7.2.0 203861 os OS_CITRIX_XENSERVER_7_5_0 Citrix XenServer 7.5.0 215705 os OS_WINDOWS_SERVER_2019_DATACENTER_EDITION_WITH_HYPERV_64_BIT Windows Server 2019 Datacenter Edition With Hyper-V (64 bit) 230733 os OS_CITRIX_XENSERVER_7_6_0 Citrix XenServer 7.6.0 219229 os OS_WINDOWS_SERVER_2012_DATACENTER_EDITION_64_BIT

sacfxdx commented 4 years ago

ok. I found Windows Server 2016 Standard Edition (64 bit). so now my question is why does this work on a quote but not from the API?

error: order exception: SoftLayer_Exception_Public: Windows Server 2016 Standard Edition (64 bit) (28 Cores), price ID# 179935, has a Cores capacity restriction that does not match the capacity of Dual Intel Xeon E5-2620 v4 (16 Cores, 2.10 GHz), price ID# 177639. Please submit prices that are compatible.

FernandoOjeda commented 4 years ago

Hi @sacfxdx, if you saved a quote by ui, it will work because it is taking the right item price id.

There is an issue ordering a bare metal server through slcli. I already open a issue, see the following link: https://github.com/softlayer/softlayer-python/issues/1236

These are the right item prices that you can use:

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

Body: Json

{  
   "parameters":[  
      {  
               "complexType":"SoftLayer_Container_Product_Order_Hardware_Server",
               "hardware": [
                {
                    "hostname": "test",
                    "domain": "softlayer.local"
                }
                ],
               "location": "DALLAS10",
               "packageId":551,
               "prices":[  
                  {  
                     "id":418,
                     "item": {
                         "keyName": "NESSUS_VULNERABILITY_ASSESSMENT_REPORTING"
                      }
                  },
                  {  
                     "id":57,
                     "item": {
                         "keyName": "NOTIFICATION_EMAIL_AND_TICKET"
                          }
                  },
                  {  
                     "id":55,
                     "item": {
                         "keyName": "MONITORING_HOST_PING"
                      }
                  },
                  {  
                     "id":58,
                     "item": {
                        "keyName": "AUTOMATED_NOTIFICATION"
                     }
                  },
                  {  
                     "id":906,
                     "item":{
                        "keyName": "REBOOT_KVM_OVER_IP"
                     }
                  },
                  {  
                     "id":21513,
                     "item": {
                        "keyName": "100_MBPS_REDUNDANT_PUBLIC_PRIVATE_NETWORK_UPLINKS"

                     }
                  },
                  {  
                     "id":342,
                     "item": {
                         "keyName": "BANDWIDTH_20000_GB"}
                  },

                  {  
                     "id":21,
                     "item": {
                         "keyName": "1_IP_ADDRESS"

                     }
                  },
                  {  
                     "id":420,
                     "item": {
                         "keyName": "UNLIMITED_SSL_VPN_USERS_1_PPTP_VPN_USER_PER_ACCOUNT"
                     }
                  },
                  {  
                     "id":876,
                     "item": {
                          "keyName": "DISK_CONTROLLER_NONRAID"
                     }
                  },

                  {  
                     "id":49759,
                     "item": {
                        "keyName": "HARD_DRIVE_1_00_TB_SATA_2"}
                  },
                  {  
                     "id":177639,
                     "item": {
                        "keyName": "INTEL_INTEL_XEON_E52620_V4_2_10"}
                  },
                  {  
                     "id":209463,
                     "item": {
                        "keyName": "RAM_64_GB_DDR4_2133_ECC_NON_REG"}
                  },
                  {  
                     "id":179923,
                     "item": {
                        "keyName": "OS_WINDOWS_2016_FULL_STD_64_BIT"}
                  }

               ],
               "quantity":1
            } 
          ]
      }
sacfxdx commented 4 years ago

2620_order_script.txt

2620_quote.pdf

ERROR: order exception: SoftLayer_Exception_Public: Windows Server 2016 Standard Edition (64 bit) (28 Cores), price ID# 179935, has a Cores capacity restriction that does not match the capacity of Dual Intel Xeon E5-2620 v4 (16 Cores, 2.10 GHz), price ID# 177639. Please submit prices that are compatible.

I created a quote in the UI that contains Intel Xeon E5-2620 v4 (16 Cores, 2.10 GHz) CPUs and OS of Windows Server 2016 Standard Edition (64 bit). when I try to use the same items I get the error above. If I change the CPU to INTEL_INTEL_XEON_E52690_V4_2_60 the order verifies successfully. I am using items from the DUAL_E52600_V4_4_DRIVES package.

why does the UI let me use that OS with these CPUs but the API does not? I have attached the quote and my python script.

FernandoOjeda commented 4 years ago

OrderingManager, "generate_order()" is being fixed to be able to support capacity restriction for bare metal server. At the moment does not support that's why you got that error.

When you create a quote by UI, it takes the correct item prices ids that I said above. In this case the "Intel Xeon E5-2620 v4 (16 Cores, 2.10 GHz)" CPU that takes has "16 Cores". To match a correct OS for this CPU you have to search an OS item price that is in the same range of capacity restriction of "16 Cores".

See the following item prices that the OrderingManager is taking:

[
  {
        "currentPriceFlag": null,
        "hourlyRecurringFee": ".196",
        "id": 179935,
        "recurringFee": "126",               
        "capacityRestrictionMaximum": "28",
        "capacityRestrictionMinimum": "28",
        "capacityRestrictionType": "CORE",
        "item": {
            "capacity": "0",
            "description": "Windows Server 2016 Standard Edition (64 bit)",           
            "id": 8451,
            "itemTaxCategoryId": 166,
            "keyName": "OS_WINDOWS_2016_FULL_STD_64_BIT",           
        }
    },
    {
        "currentPriceFlag": null,
        "id": 177639,
        "itemId": 8123,
        "laborFee": "0",
        "locationGroupId": null,       
        "recurringFee": "200",        
        "item": {
            "capacity": "2.1",
            "description": "Dual Intel Xeon E5-2620 v4 (16 Cores, 2.10 GHz)",
            "hardwareGenericComponentId": 785,
            "id": 8123,
            "itemTaxCategoryId": 166,
            "keyName": "INTEL_INTEL_XEON_E52620_V4_2_10",            
        }
    },
]

The "Dual Intel Xeon E5-2620 v4 (16 Cores, 2.10 GHz)" has 16 Cores and the "Windows Server 2016 Standard Edition (64 bit)" "capacityRestrictionMaximum": "28", "capacityRestrictionMinimum": "28", it is not in the range of "16 Cores".

The UI is taking the "Windows Server 2016 Standard Edition (64 bit)" "capacityRestrictionMaximum": "16", "capacityRestrictionMinimum": "6" for that CPU of 16 Cores. It is in the range.

See below the item that the UI is taking:

[
  {
        "currentPriceFlag": null,
        "hourlyRecurringFee": ".112",
        "id": 179923,       
        "locationGroupId": null,        
        "recurringFee": "72",              
        "capacityRestrictionMaximum": "16",
        "capacityRestrictionMinimum": "6",
        "capacityRestrictionType": "CORE",
        "item": {
            "capacity": "0",
            "description": "Windows Server 2016 Standard Edition (64 bit)",
            "hardwareGenericComponentId": null,
            "id": 8451,
            "itemTaxCategoryId": 166,
            "keyName": "OS_WINDOWS_2016_FULL_STD_64_BIT",           
        }
    },
    {
        "currentPriceFlag": null,
        "id": 177639,
        "itemId": 8123,
        "laborFee": "0",
        "locationGroupId": null,        
        "recurringFee": "200",    
        "item": {
            "capacity": "2.1",
            "description": "Dual Intel Xeon E5-2620 v4 (16 Cores, 2.10 GHz)",
            "hardwareGenericComponentId": 785,
            "id": 8123,
            "itemTaxCategoryId": 166,
            "keyName": "INTEL_INTEL_XEON_E52620_V4_2_10",            
        }
    },
]

The "INTEL_INTEL_XEON_E52690_V4_2_60" CPU has ""Dual Intel Xeon E5-2690 v4 (28 Cores, 2.60 GHz)"" 28 Cores, it is in the "Windows Server 2016 Standard Edition (64 bit)" "capacityRestrictionMaximum": "28", "capacityRestrictionMinimum": "28" range, it is for that that it worked.

sacfxdx commented 4 years ago

is this a bug? why are there different min/max requirements for the same software?

allmightyspiff commented 4 years ago

Windows is billed on a per core basis, each of the prices will represent a different core level. Some other software has similar core-based requirements.

sacfxdx commented 4 years ago

Is this a bug with the API?

On Mar 11, 2020, at 1:41 PM, Christopher Gallo notifications@github.com wrote:

Windows is billed on a per core basis, each of the prices will represent a different core level. Some other software has similar core-based requirements.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/softlayer/githubio_source/issues/322#issuecomment-597772316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKBNAQXJB2I53JVCNGDH3LRG7EMPANCNFSM4LATOEXA.

allmightyspiff commented 4 years ago

No, it is not a bug in the API. It is however an area of the SLCLI that can be improved. https://github.com/softlayer/softlayer-python/pull/1237 I believe will address this. Look for that to be in the official SLCLI release Friday.

sacfxdx commented 4 years ago

Since I am using the API for this, will the SLCLI fix affect that?

allmightyspiff commented 4 years ago

If you are calling the API directly (either with slcli call-api or curl or something else) no, I guess this fix won't help. You'd have to find the priceId that matches the core count of your order.

sacfxdx commented 4 years ago

If the API does not select the correct priceID based on the core count but the UI does, is that intentional? Sounds like a bug to me. I’m using python to call the API.

On Mar 17, 2020, at 11:44 AM, Christopher Gallo notifications@github.com wrote:

If you are calling the API directly (either with slcli call-api or curl or something else) no, I guess this fix won't help. You'd have to find the priceId that matches the core count of your order.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/softlayer/githubio_source/issues/322#issuecomment-600142430, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKBNAX7KJCEHYQMLEJHPXDRH6LERANCNFSM4LATOEXA.

allmightyspiff commented 4 years ago

the portal uses the same data returned from the API to resolve priceIds. The portal team has just put in a lot more work hours in making ordering easy.

When ordering form the API, you will need to check if the price object has a https://sldn.softlayer.com/reference/datatypes/SoftLayer_Product_Item_Price/#capacityrestrictiontype, and if it does, you need to make sure that priceId you use falls within the capacityMax and capacityMin limits.

The item itself will have https://sldn.softlayer.com/reference/datatypes/SoftLayer_Product_Item/#totalphysicalcorecapacity or https://sldn.softlayer.com/reference/datatypes/SoftLayer_Product_Item/#totalprocessorcapacity set if the capacity restriction is CORE or PROCESSOR so you can check.