diff --git a/.github/workflows/generator.yml b/.github/workflows/generator.yml index 9277007..e4a1a16 100644 --- a/.github/workflows/generator.yml +++ b/.github/workflows/generator.yml @@ -15,6 +15,7 @@ jobs: - name: Generate SoftLayer classes run: | make generate + make fmt - name: Commit files run: | git config --local user.email "action@github.com" diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index a54c543..144401b 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -10,7 +10,7 @@ jobs: test: strategy: matrix: - go-version: [1.13.x, 1.14.x, 1.17.x] + go-version: [1.19.x] platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} steps: @@ -31,7 +31,7 @@ jobs: if: success() uses: actions/setup-go@v1 with: - go-version: 1.17.x + go-version: 1.19.x - name: Checkout code uses: actions/checkout@v1 - name: Calc coverage @@ -57,10 +57,10 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set up Go 1.17 + - name: Set up Go 1.19 uses: actions/setup-go@v1 with: - go-version: 1.17 + go-version: 1.19 id: go - name: Check out code into the Go module directory diff --git a/datatypes/account.go b/datatypes/account.go index 4aa18c6..4504dfb 100644 --- a/datatypes/account.go +++ b/datatypes/account.go @@ -2566,11 +2566,6 @@ type Account_ProofOfConcept_Funding_Type struct { KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"` } -// -// -// -// -// type Account_Regional_Registry_Detail struct { Entity diff --git a/datatypes/billing.go b/datatypes/billing.go index a2f99bb..be1e5b7 100644 --- a/datatypes/billing.go +++ b/datatypes/billing.go @@ -1554,7 +1554,6 @@ type Billing_Item_Network_Storage_Hub_Bandwidth struct { // * sov_sec_ip_addresses_priv (sov_sec_ip_addresses private only) // * sec_ip_addresses (old style, secondary ip addresses) // -// // These item categories denote that the billing item has subnet information attached. type Billing_Item_Network_Subnet struct { Billing_Item @@ -1573,7 +1572,6 @@ type Billing_Item_Network_Subnet struct { // * global_ipv4 // * global_ipv6 // -// // These item categories denote that the billing item has subnet information attached. type Billing_Item_Network_Subnet_IpAddress_Global struct { Billing_Item_Network_Subnet @@ -1590,7 +1588,6 @@ type Billing_Item_Network_Tunnel struct { // The SoftLayer_Billing_Item_Network_Vlan data type contains general information relating to a single SoftLayer billing item whose item category code is one of the following: // * network_vlan // -// // These item categories denote that the billing item has network vlan information attached. type Billing_Item_Network_Vlan struct { Billing_Item diff --git a/datatypes/configuration.go b/datatypes/configuration.go index 7eec1e9..f0d5e68 100644 --- a/datatypes/configuration.go +++ b/datatypes/configuration.go @@ -347,8 +347,6 @@ type Configuration_Template_Section_Attribute struct { // Configuration definition gives you details of the value that you're setting. // // If value type is defined as "Resource Specific Values", you will have to make an additional API call to retrieve your system specific values. -// -// type Configuration_Template_Section_Definition struct { Entity @@ -445,8 +443,6 @@ type Configuration_Template_Section_Definition_Attribute_Type struct { } // Configuration definition group gives you details of the definition and allows extra functionality. -// -// type Configuration_Template_Section_Definition_Group struct { Entity diff --git a/datatypes/container.go b/datatypes/container.go index 76e01a9..89ef2e3 100644 --- a/datatypes/container.go +++ b/datatypes/container.go @@ -3198,8 +3198,6 @@ type Container_Network_Storage_DuplicateConversionStatusInformation struct { // SoftLayer's StorageLayer Evault services provides details regarding the the purchased vault. // // When a job is created using the Webcc Console, the job created is identified as a task on the vault. Using this service, information regarding the task can be retrieved. -// -// type Container_Network_Storage_Evault_Vault_Task struct { Entity @@ -4550,9 +4548,9 @@ type Container_Product_Order_Network_Storage_MassDataMigration_Request struct { State *string `json:"state,omitempty" xmlrpc:"state,omitempty"` } -// The SoftLayer_Container_Product_Order_Network_Storage_Modification datatype has everything required to place a modification to an existing StorageLayer account with SoftLayer. Modifications, at present time, include upgrade and downgrades only. The ''volumeId'' property must be set to the network storage volume id to be upgraded. Once populated send this container to the [[SoftLayer_Product_Order::placeOrder]] method. +// The SoftLayer_Container_Product_Order_Network_Storage_Modification datatype has everything required to place a modification to an existing StorageLayer account with SoftLayer. Modifications, at present time, include upgrade and downgrades only. The ”volumeId” property must be set to the network storage volume id to be upgraded. Once populated send this container to the [[SoftLayer_Product_Order::placeOrder]] method. // -// The ''packageId'' property passed in for CloudLayer storage accounts must be set to 0 (zero) and the ''quantity'' property must be set to 1. The location does not have to be set. Please use the [[SoftLayer_Product_Package]] service to retrieve a list of CloudLayer items. +// The ”packageId” property passed in for CloudLayer storage accounts must be set to 0 (zero) and the ”quantity” property must be set to 1. The location does not have to be set. Please use the [[SoftLayer_Product_Package]] service to retrieve a list of CloudLayer items. // // NOTE: When upgrading CloudLayer storage service from a metered plan (pay as you go) to a non-metered plan, make sure the chosen plan's storage allotment has enough space to cover the current usage. If the chosen plan's usage allotment is less than the CloudLayer storage's usage the order will be rejected. type Container_Product_Order_Network_Storage_Modification struct { diff --git a/datatypes/dns.go b/datatypes/dns.go index 98be7e7..f4b8aaa 100644 --- a/datatypes/dns.go +++ b/datatypes/dns.go @@ -106,15 +106,12 @@ type Dns_Domain_Registration struct { // SoftLayer_Dns_Domain_Registration_Registrant_Verification_Status models the state of the registrant. Here are the following status codes: // -// -// *'''Admin Reviewing''': The registrant data has been submitted and being reviewed by compliance team. -// *'''Pending''': The verification process has been inititated, and verification email will be sent. -// *'''Suspended''': The registrant has failed verification and the domain has been suspended. -// *'''Verified''': The registrant has been validated. -// *'''Verifying''': The verification process has been initiated and is waiting for registrant response. -// *'''Unverified''': The verification process has not been inititated. -// -// +// *”'Admin Reviewing”': The registrant data has been submitted and being reviewed by compliance team. +// *”'Pending”': The verification process has been inititated, and verification email will be sent. +// *”'Suspended”': The registrant has failed verification and the domain has been suspended. +// *”'Verified”': The registrant has been validated. +// *”'Verifying”': The verification process has been initiated and is waiting for registrant response. +// *”'Unverified”': The verification process has not been inititated. type Dns_Domain_Registration_Registrant_Verification_Status struct { Entity @@ -133,14 +130,11 @@ type Dns_Domain_Registration_Registrant_Verification_Status struct { // SoftLayer_Dns_Domain_Registration_Status models the state of domain name. Here are the following status codes: // -// -// *'''Active''': This domain name is active. -// *'''Pending Owner Approval''': Pending owner approval for completion of transfer. -// *'''Pending Admin Review''': Pending admin review for transfer. -// *'''Pending Registry''': Pending registry for transfer. -// *'''Expired''': Domain name has expired. -// -// +// *”'Active”': This domain name is active. +// *”'Pending Owner Approval”': Pending owner approval for completion of transfer. +// *”'Pending Admin Review”': Pending admin review for transfer. +// *”'Pending Registry”': Pending registry for transfer. +// *”'Expired”': Domain name has expired. type Dns_Domain_Registration_Status struct { Entity @@ -157,20 +151,19 @@ type Dns_Domain_Registration_Status struct { Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"` } -// The SoftLayer_Dns_Domain_ResourceRecord data type represents a single resource record entry in a SoftLayer hosted domain. Each resource record contains a ''host'' and ''data'' property, defining a resource's name and it's target data. Domains contain multiple types of resource records. The ''type'' property separates out resource records by type. ''Type'' can take one of the following values: -// * '''"a"''' for [[SoftLayer_Dns_Domain_ResourceRecord_AType|address]] records -// * '''"aaaa"''' for [[SoftLayer_Dns_Domain_ResourceRecord_AaaaType|address]] records -// * '''"cname"''' for [[SoftLayer_Dns_Domain_ResourceRecord_CnameType|canonical name]] records -// * '''"mx"''' for [[SoftLayer_Dns_Domain_ResourceRecord_MxType|mail exchanger]] records -// * '''"ns"''' for [[SoftLayer_Dns_Domain_ResourceRecord_NsType|name server]] records -// * '''"ptr"''' for [[SoftLayer_Dns_Domain_ResourceRecord_PtrType|pointer]] records in reverse domains -// * '''"soa"''' for a domain's [[SoftLayer_Dns_Domain_ResourceRecord_SoaType|start of authority]] record -// * '''"spf"''' for [[SoftLayer_Dns_Domain_ResourceRecord_SpfType|sender policy framework]] records -// * '''"srv"''' for [[SoftLayer_Dns_Domain_ResourceRecord_SrvType|service]] records -// * '''"txt"''' for [[SoftLayer_Dns_Domain_ResourceRecord_TxtType|text]] records -// +// The SoftLayer_Dns_Domain_ResourceRecord data type represents a single resource record entry in a SoftLayer hosted domain. Each resource record contains a ”host” and ”data” property, defining a resource's name and it's target data. Domains contain multiple types of resource records. The ”type” property separates out resource records by type. ”Type” can take one of the following values: +// * ”'"a"”' for [[SoftLayer_Dns_Domain_ResourceRecord_AType|address]] records +// * ”'"aaaa"”' for [[SoftLayer_Dns_Domain_ResourceRecord_AaaaType|address]] records +// * ”'"cname"”' for [[SoftLayer_Dns_Domain_ResourceRecord_CnameType|canonical name]] records +// * ”'"mx"”' for [[SoftLayer_Dns_Domain_ResourceRecord_MxType|mail exchanger]] records +// * ”'"ns"”' for [[SoftLayer_Dns_Domain_ResourceRecord_NsType|name server]] records +// * ”'"ptr"”' for [[SoftLayer_Dns_Domain_ResourceRecord_PtrType|pointer]] records in reverse domains +// * ”'"soa"”' for a domain's [[SoftLayer_Dns_Domain_ResourceRecord_SoaType|start of authority]] record +// * ”'"spf"”' for [[SoftLayer_Dns_Domain_ResourceRecord_SpfType|sender policy framework]] records +// * ”'"srv"”' for [[SoftLayer_Dns_Domain_ResourceRecord_SrvType|service]] records +// * ”'"txt"”' for [[SoftLayer_Dns_Domain_ResourceRecord_TxtType|text]] records // -// As ''SoftLayer_Dns_Domain_ResourceRecord'' objects are created and loaded, the API verifies the ''type'' property and casts the object as the appropriate type. +// As ”SoftLayer_Dns_Domain_ResourceRecord” objects are created and loaded, the API verifies the ”type” property and casts the object as the appropriate type. type Dns_Domain_ResourceRecord struct { Entity @@ -232,24 +225,24 @@ type Dns_Domain_ResourceRecord struct { Weight *int `json:"weight,omitempty" xmlrpc:"weight,omitempty"` } -// SoftLayer_Dns_Domain_ResourceRecord_AType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "a" and defines a DNS A record on a SoftLayer hosted domain. An A record directs a host name to an IP address. For instance if the A record for "host.example.org" points to the IP address 10.0.0.1 then the ''host'' property for the A record equals "host" and the ''data'' property equals "10.0.0.1". +// SoftLayer_Dns_Domain_ResourceRecord_AType is a SoftLayer_Dns_Domain_ResourceRecord object whose ”type” property is set to "a" and defines a DNS A record on a SoftLayer hosted domain. An A record directs a host name to an IP address. For instance if the A record for "host.example.org" points to the IP address 10.0.0.1 then the ”host” property for the A record equals "host" and the ”data” property equals "10.0.0.1". type Dns_Domain_ResourceRecord_AType struct { Dns_Domain_ResourceRecord } -// SoftLayer_Dns_Domain_ResourceRecord_AaaaType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "aaaa" and defines a DNS AAAA record on a SoftLayer hosted domain. An AAAA record directs a host name to an IPv6 address. For instance if the AAAA record for "host.example.org" points to the IPv6 address "fe80:0:0:0:0:0:a00:0" then the ''host'' property for the AAAA record equals "host" and the ''data'' property equals "fe80:0:0:0:0:0:a00:0". +// SoftLayer_Dns_Domain_ResourceRecord_AaaaType is a SoftLayer_Dns_Domain_ResourceRecord object whose ”type” property is set to "aaaa" and defines a DNS AAAA record on a SoftLayer hosted domain. An AAAA record directs a host name to an IPv6 address. For instance if the AAAA record for "host.example.org" points to the IPv6 address "fe80:0:0:0:0:0:a00:0" then the ”host” property for the AAAA record equals "host" and the ”data” property equals "fe80:0:0:0:0:0:a00:0". type Dns_Domain_ResourceRecord_AaaaType struct { Dns_Domain_ResourceRecord } -// SoftLayer_Dns_Domain_ResourceRecord_CnameType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "cname" and defines a DNS CNAME record on a SoftLayer hosted domain. A CNAME record directs a host name to another host. For instance, if the CNAME record for "alias.example.org" points to the host "host.example.org" then the ''host'' property equals "alias" and the ''data'' property equals "host.example.org.". +// SoftLayer_Dns_Domain_ResourceRecord_CnameType is a SoftLayer_Dns_Domain_ResourceRecord object whose ”type” property is set to "cname" and defines a DNS CNAME record on a SoftLayer hosted domain. A CNAME record directs a host name to another host. For instance, if the CNAME record for "alias.example.org" points to the host "host.example.org" then the ”host” property equals "alias" and the ”data” property equals "host.example.org.". // // DNS entries defined by CNAME should not be used as the data field for an MX record. type Dns_Domain_ResourceRecord_CnameType struct { Dns_Domain_ResourceRecord } -// SoftLayer_Dns_Domain_ResourceRecord_MxType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "mx" and used to describe MX resource records. MX records control which hosts are responsible as mail exchangers for a domain. For instance, in the domain example.org, an MX record whose host is "@" and data is "mail" says that the host "mail.example.org" is responsible for handling mail for example.org. That means mail sent to users @example.org are delivered to mail.example.org. +// SoftLayer_Dns_Domain_ResourceRecord_MxType is a SoftLayer_Dns_Domain_ResourceRecord object whose ”type” property is set to "mx" and used to describe MX resource records. MX records control which hosts are responsible as mail exchangers for a domain. For instance, in the domain example.org, an MX record whose host is "@" and data is "mail" says that the host "mail.example.org" is responsible for handling mail for example.org. That means mail sent to users @example.org are delivered to mail.example.org. // // Domains can have more than one MX record if it uses more than one server to send mail through. Multiple MX records are denoted by their priority, defined by the mxPriority property. // @@ -258,22 +251,22 @@ type Dns_Domain_ResourceRecord_MxType struct { Dns_Domain_ResourceRecord } -// SoftLayer_Dns_Domain_ResourceRecord_NsType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "ns" and defines a DNS NS record on a SoftLayer hosted domain. An NS record defines the authoritative name server for a domain. All SoftLayer hosted domains contain NS records for "ns1.softlayer.com" and "ns2.softlayer.com" . For instance, if example.org is hosted on ns1.softlayer.com, then example.org contains an NS record whose ''host'' property equals "@" and whose ''data'' property equals "ns1.example.org". +// SoftLayer_Dns_Domain_ResourceRecord_NsType is a SoftLayer_Dns_Domain_ResourceRecord object whose ”type” property is set to "ns" and defines a DNS NS record on a SoftLayer hosted domain. An NS record defines the authoritative name server for a domain. All SoftLayer hosted domains contain NS records for "ns1.softlayer.com" and "ns2.softlayer.com" . For instance, if example.org is hosted on ns1.softlayer.com, then example.org contains an NS record whose ”host” property equals "@" and whose ”data” property equals "ns1.example.org". // // NS resource records pointing to ns1.softlayer.com or ns2.softlayer.com many not be removed from a SoftLayer hosted domain. type Dns_Domain_ResourceRecord_NsType struct { Dns_Domain_ResourceRecord } -// SoftLayer_Dns_Domain_ResourceRecord_PtrType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "ptr" and defines a reverse DNS PTR record on the SoftLayer name servers. +// SoftLayer_Dns_Domain_ResourceRecord_PtrType is a SoftLayer_Dns_Domain_ResourceRecord object whose ”type” property is set to "ptr" and defines a reverse DNS PTR record on the SoftLayer name servers. // // The format for a reverse DNS PTR record varies based on whether it is for an IPv4 or IPv6 address. // -// For an IPv4 address the ''host'' property for every PTR record is the last octet of the IP address that the PTR record belongs to, while the ''data'' property is the canonical name of the host that the reverse lookup resolves to. Every PTR record belongs to a domain on the SoftLayer name servers named by the first three octets of an IP address in reverse order followed by ".in-addr.arpa". +// For an IPv4 address the ”host” property for every PTR record is the last octet of the IP address that the PTR record belongs to, while the ”data” property is the canonical name of the host that the reverse lookup resolves to. Every PTR record belongs to a domain on the SoftLayer name servers named by the first three octets of an IP address in reverse order followed by ".in-addr.arpa". // // For instance, if the reverse DNS record for 10.0.0.1 is "host.example.org" then it's corresponding SoftLayer_Dns_Domain_ResourceRecord_PtrType host is "1", while it's data property equals "host.example.org". The full name of the reverse record for host.example.org including the domain name is "1.0.0.10.in-addr.arpa". // -// For an IPv6 address the ''host'' property for every PTR record is the last four octets of the IP address that the PTR record belongs to. The last four octets need to be in reversed order and each digit separated by a period. The ''data'' property is the canonical name of the host that the reverse lookup resolves to. Every PTR record belongs to a domain on the SoftLayer name servers named by the first four octets of an IP address in reverse order, split up by digit with a period, and followed by ".ip6.arpa". +// For an IPv6 address the ”host” property for every PTR record is the last four octets of the IP address that the PTR record belongs to. The last four octets need to be in reversed order and each digit separated by a period. The ”data” property is the canonical name of the host that the reverse lookup resolves to. Every PTR record belongs to a domain on the SoftLayer name servers named by the first four octets of an IP address in reverse order, split up by digit with a period, and followed by ".ip6.arpa". // // For instance, if the reverse DNS record for fe80:0000:0000:0000:0000:0000:0a00:0001 is "host.example.org" then it's corresponding SoftLayer_Dns_Domain_ResourceRecord_PtrType host is "1.0.0.0.0.0.a.0.0.0.0.0.0.0.0.0", while it's data property equals "host.example.org". The full name of the reverse record for host.example.org including the domain name is "1.0.0.0.0.0.a.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa". // @@ -292,14 +285,14 @@ type Dns_Domain_ResourceRecord_SoaType struct { Dns_Domain_ResourceRecord } -// SoftLayer_Dns_Domain_ResourceRecord_SpfType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "spf" and defines a DNS SPF record on a SoftLayer hosted domain. An SPF record provides sender policy framework data for a host. For instance, if defining the SPF record "v=spf1 mx:mail.example.org ~all" for "host.example.org". then the ''host'' property equals "host" and the ''data'' property equals "v=spf1 mx:mail.example.org ~all". +// SoftLayer_Dns_Domain_ResourceRecord_SpfType is a SoftLayer_Dns_Domain_ResourceRecord object whose ”type” property is set to "spf" and defines a DNS SPF record on a SoftLayer hosted domain. An SPF record provides sender policy framework data for a host. For instance, if defining the SPF record "v=spf1 mx:mail.example.org ~all" for "host.example.org". then the ”host” property equals "host" and the ”data” property equals "v=spf1 mx:mail.example.org ~all". // // SPF records are commonly used in email verification methods such as Sender Policy Framework. type Dns_Domain_ResourceRecord_SpfType struct { Dns_Domain_ResourceRecord_TxtType } -// SoftLayer_Dns_Domain_ResourceRecord_SrvType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "srv" and defines a DNS SRV record on a SoftLayer hosted domain. +// SoftLayer_Dns_Domain_ResourceRecord_SrvType is a SoftLayer_Dns_Domain_ResourceRecord object whose ”type” property is set to "srv" and defines a DNS SRV record on a SoftLayer hosted domain. type Dns_Domain_ResourceRecord_SrvType struct { Dns_Domain_ResourceRecord @@ -319,7 +312,7 @@ type Dns_Domain_ResourceRecord_SrvType struct { Weight *int `json:"weight,omitempty" xmlrpc:"weight,omitempty"` } -// SoftLayer_Dns_Domain_ResourceRecord_TxtType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "txt" and defines a DNS TXT record on a SoftLayer hosted domain. A TXT record provides a text description for a host. For instance, if defining the TXT record "My test host" for "host.example.org". then the ''host'' property equals "host" and the ''data'' property equals "My test host". +// SoftLayer_Dns_Domain_ResourceRecord_TxtType is a SoftLayer_Dns_Domain_ResourceRecord object whose ”type” property is set to "txt" and defines a DNS TXT record on a SoftLayer hosted domain. A TXT record provides a text description for a host. For instance, if defining the TXT record "My test host" for "host.example.org". then the ”host” property equals "host" and the ”data” property equals "My test host". // // TXT records are commonly used in email verification methods such as Sender Policy Framework. type Dns_Domain_ResourceRecord_TxtType struct { diff --git a/datatypes/hardware.go b/datatypes/hardware.go index ee717f0..22f7241 100644 --- a/datatypes/hardware.go +++ b/datatypes/hardware.go @@ -2111,13 +2111,11 @@ type Hardware_State struct { // SoftLayer_Hardware_Status models the inventory state of any piece of hardware in SoftLayer's inventory. Most of these statuses are used by SoftLayer while a server is not provisioned or undergoing provisioning. SoftLayer uses the following status codes: // -// -// *'''ACTIVE''': This server is active and in use. -// *'''DEPLOY''': Used during server provisioning. -// *'''DEPLOY2''': Used during server provisioning. -// *'''MACWAIT''': Used during server provisioning. -// *'''RECLAIM''': This server has been reclaimed by SoftLayer and is awaiting de-provisioning. -// +// *”'ACTIVE”': This server is active and in use. +// *”'DEPLOY”': Used during server provisioning. +// *”'DEPLOY2”': Used during server provisioning. +// *”'MACWAIT”': Used during server provisioning. +// *”'RECLAIM”': This server has been reclaimed by SoftLayer and is awaiting de-provisioning. // // Servers in production and in use should stay in the ACTIVE state. If a server's status ever reads anything else then please contact SoftLayer support. type Hardware_Status struct { diff --git a/datatypes/location.go b/datatypes/location.go index 6d1c8cc..2c182e7 100644 --- a/datatypes/location.go +++ b/datatypes/location.go @@ -429,11 +429,9 @@ type Location_Slot struct { // SoftLayer_Location_Status models the state of any location. SoftLayer uses the following status codes: // -// -// *'''ACTIVE''': The location is currently active and available for public usage. -// *'''PLANNED''': Used when a location is planned but not yet active. -// *'''RETIRED''': Used when a location has been retired and no longer active. -// +// *”'ACTIVE”': The location is currently active and available for public usage. +// *”'PLANNED”': Used when a location is planned but not yet active. +// *”'RETIRED”': Used when a location has been retired and no longer active. // // Locations in use should stay in the ACTIVE state. If a locations status ever reads anything else and contains active hardware then please contact SoftLayer support. type Location_Status struct { diff --git a/datatypes/network.go b/datatypes/network.go index 49a4f78..dbe7db1 100644 --- a/datatypes/network.go +++ b/datatypes/network.go @@ -25,7 +25,7 @@ type Network struct { Entity } -// The SoftLayer_Network_Application_Delivery_Controller data type models a single instance of an application delivery controller. Local properties are read only, except for a ''notes'' property, which can be used to describe your application delivery controller service. The type's relational properties provide more information to the service's function and login information to the controller's backend management if advanced view is enabled. +// The SoftLayer_Network_Application_Delivery_Controller data type models a single instance of an application delivery controller. Local properties are read only, except for a ”notes” property, which can be used to describe your application delivery controller service. The type's relational properties provide more information to the service's function and login information to the controller's backend management if advanced view is enabled. type Network_Application_Delivery_Controller struct { Entity @@ -1365,8 +1365,6 @@ type Network_Component_RemoteManagement struct { // The SoftLayer_Network_Component_Uplink_Hardware data type abstracts information related to network connections between SoftLayer hardware and SoftLayer network components. // // It is populated via triggers on the network_connection table (SoftLayer_Network_Connection), so you shouldn't have to delete or insert records into this table, ever. -// -// type Network_Component_Uplink_Hardware struct { Entity @@ -2128,10 +2126,6 @@ type Network_LBaaS_HealthMonitor struct { } // The SoftLayer_Network_LBaaS_L7HealthMonitor type presents a structure containing attributes of a health monitor object associated with a L7 pool instance. Note that the relationship between backend (L7 pool) and health monitor is 1-to-1, pools object associated with a health monitor must have the same pair of protocol and port. Example: frontend FA: http, 80 - backend BA: http, 3456 - healthmonitor HM_http3456 frontend FB: https, 443 - backend BB: http, 3456 - healthmonitor HM_http3456 -// -// -// -// type Network_LBaaS_L7HealthMonitor struct { Entity @@ -2679,8 +2673,6 @@ type Network_LBaaS_PoolMembersHealth struct { } // The SoftLayer_Network_LBaaS_SSLCipher type presents a structure that contains attributes of load balancer cipher suites. -// -// type Network_LBaaS_SSLCipher struct { Entity @@ -3259,7 +3251,6 @@ type Network_Monitor_Version1_Query_Host struct { // # monitorLevel determines the highest level of SoftLayer_Network_Monitor_Version1_Query_Type object that can be placed in a monitoring instance on this server // # responseLevel determines the highest level of SoftLayer_Network_Monitor_Version1_Query_ResponseType object that can be placed in a monitoring instance on this server // -// // Also note that the query type and response types are available through getAllQueryTypes and getAllResponseTypes, respectively. type Network_Monitor_Version1_Query_Host_Stratum struct { Entity @@ -3620,7 +3611,6 @@ type Network_Security_Scanner_Request struct { // *Scan Cancelled // *Generating Report. // -// // The status of a vulnerability scan will change over the course of a scan's execution. type Network_Security_Scanner_Request_Status struct { Entity @@ -5923,11 +5913,9 @@ type Network_Subnet_Rwhois_Data struct { State *string `json:"state,omitempty" xmlrpc:"state,omitempty"` } -// // **DEPRECATED** // The SoftLayer_Network_Subnet_Swip_Transaction data type contains basic information tracked at SoftLayer to allow automation of Swip creation, update, and removal requests. A specific transaction is attached to an accountId and a subnetId. This also contains a "Status Name" which tells the customer what the transaction is doing: // -// // * REQUEST QUEUED: Request is queued up to be sent to ARIN // * REQUEST SENT: The email request has been sent to ARIN // * REQUEST CONFIRMED: ARIN has confirmed that the request is good, and should be available in 24 hours diff --git a/datatypes/product.go b/datatypes/product.go index 0e10344..3e70e48 100644 --- a/datatypes/product.go +++ b/datatypes/product.go @@ -1436,8 +1436,6 @@ type Product_Package_Locations struct { // This datatype describes the item categories that are required for each package to be ordered. For instance, for package 2, there will be many required categories. When submitting an order for a server, there must be at most 1 price for each category whose "isRequired" is set. Examples of required categories: - server - ram - bandwidth - disk0 // // There are others, but these are the main ones. For each required category, a SoftLayer_Product_Item_Price must be chosen that is valid for the package. -// -// type Product_Package_Order_Configuration struct { Entity @@ -1827,7 +1825,7 @@ type Product_Package_Server_Option struct { Value *string `json:"value,omitempty" xmlrpc:"value,omitempty"` } -// The [[SoftLayer_Product_Package_Type]] object indicates the type for a service offering (package). The type can be used to filter packages. For example, if you are looking for the package representing virtual servers, you can filter on the type's key name of '''VIRTUAL_SERVER_INSTANCE'''. For bare metal servers by core or CPU, filter on '''BARE_METAL_CORE''' or '''BARE_METAL_CPU''', respectively. +// The [[SoftLayer_Product_Package_Type]] object indicates the type for a service offering (package). The type can be used to filter packages. For example, if you are looking for the package representing virtual servers, you can filter on the type's key name of ”'VIRTUAL_SERVER_INSTANCE”'. For bare metal servers by core or CPU, filter on ”'BARE_METAL_CORE”' or ”'BARE_METAL_CPU”', respectively. type Product_Package_Type struct { Entity diff --git a/datatypes/resource.go b/datatypes/resource.go index f2a293a..76bf572 100644 --- a/datatypes/resource.go +++ b/datatypes/resource.go @@ -131,8 +131,6 @@ type Resource_Group_Attribute_Type struct { } // The SoftLayer_Resource_Group_Descendant_Reference data type simplifies the link between one SoftLayer_Resource_Group_Member object and all of its parents. -// -// type Resource_Group_Descendant_Reference struct { Entity diff --git a/datatypes/sales.go b/datatypes/sales.go index bf667aa..e7bb3ad 100644 --- a/datatypes/sales.go +++ b/datatypes/sales.go @@ -20,7 +20,7 @@ package datatypes -// The presale event data types indicate the information regarding an individual presale event. The '''locationId''' will indicate the datacenter associated with the presale event. The '''itemId''' will indicate the product item associated with a particular presale event - however these are more rare. The '''startDate''' and '''endDate''' will provide information regarding when the presale event is available for use. At the end of the presale event, the server or services purchased will be available once approved and provisioned. +// The presale event data types indicate the information regarding an individual presale event. The ”'locationId”' will indicate the datacenter associated with the presale event. The ”'itemId”' will indicate the product item associated with a particular presale event - however these are more rare. The ”'startDate”' and ”'endDate”' will provide information regarding when the presale event is available for use. At the end of the presale event, the server or services purchased will be available once approved and provisioned. type Sales_Presale_Event struct { Entity diff --git a/datatypes/ticket.go b/datatypes/ticket.go index 5e16fc7..809f173 100644 --- a/datatypes/ticket.go +++ b/datatypes/ticket.go @@ -587,10 +587,9 @@ type Ticket_State_Type struct { } // The SoftLayer_Ticket_Status data type models the state of a ticket as it is worked by SoftLayer and its customers. Tickets exist in one of three states: -// *'''OPEN''': Open tickets are considered unresolved issues by SoftLayer and can be assigned to a SoftLayer employee for work. Tickets created by portal or API users are created in the Open state. -// *'''ASSIGNED''': Assigned tickets are identical to open tickets, but are assigned to an individual SoftLayer employee. An assigned ticket is actively being worked by SoftLayer. -// *'''CLOSED''': Tickets are closed when the issue at hand is considered resolved. A SoftLayer employee can change a ticket's status from Closed to Open or Assigned if the need arises. -// +// *”'OPEN”': Open tickets are considered unresolved issues by SoftLayer and can be assigned to a SoftLayer employee for work. Tickets created by portal or API users are created in the Open state. +// *”'ASSIGNED”': Assigned tickets are identical to open tickets, but are assigned to an individual SoftLayer employee. An assigned ticket is actively being worked by SoftLayer. +// *”'CLOSED”': Tickets are closed when the issue at hand is considered resolved. A SoftLayer employee can change a ticket's status from Closed to Open or Assigned if the need arises. // // A ticket usually goes from the Open to Assigned to Closed states during its life cycle. If a ticket is forwarded from one department to another it may change from the Assigned state back to Open until it is assigned to a member of the new department. type Ticket_Status struct { diff --git a/datatypes/user.go b/datatypes/user.go index feab297..2729e2b 100644 --- a/datatypes/user.go +++ b/datatypes/user.go @@ -595,7 +595,6 @@ type User_Customer_External_Binding_Phone struct { // ** Active // ** Inactive // -// // SoftLayer users with an active external binding will be prohibited from using the API for security reasons. type User_Customer_External_Binding_Totp struct { User_Customer_External_Binding @@ -622,7 +621,6 @@ type User_Customer_External_Binding_Vendor struct { // * The credential's expiration date // * The last time the credential was updated // -// // SoftLayer users with an active external binding will be prohibited from using the API for security reasons. type User_Customer_External_Binding_Verisign struct { User_Customer_External_Binding @@ -1099,8 +1097,6 @@ type User_Customer_Security_Answer struct { // Each SoftLayer User Customer instance is assigned a status code that determines how it's treated in the customer portal. This status is reflected in the SoftLayer_User_Customer_Status data type. Status differs from user permissions in that user status applies globally to the portal while user permissions are applied to specific portal functions. // // Note that a status of "PENDING" also has been added. This status is specific to users that are configured to use IBMid authentication. This would include some (not all) users on accounts that are linked to Platform Services (PaaS, formerly Bluemix) accounts, but is not limited to users in such accounts. Using IBMid authentication is optional for active users even if it is not required by the account type. PENDING status indicates that a relationship between an IBMid and a user is being set up but is not complete. To be complete, PENDING users need to perform an action ("accepting the invitation") before becoming an active user within IBM Cloud and/or IMS. PENDING is a system state, and can not be administered by users (including the account master user). SoftLayer Commercial is the only environment where IBMid and/or account linking are used. -// -// type User_Customer_Status struct { Entity diff --git a/datatypes/virtual.go b/datatypes/virtual.go index 8f2f4ac..eb4d8df 100644 --- a/datatypes/virtual.go +++ b/datatypes/virtual.go @@ -1082,8 +1082,6 @@ type Virtual_Guest_Block_Device_Template_Group_Accounts struct { // The virtual block device template group status data type represents the current status of the image template. Depending upon the status, the image template can be used for provisioning or reloading. // // For an operating system reload, the image template will need to have a status of 'Active' or 'Deprecated'. For a provision, the image template will need to have a status of 'Active' -// -// type Virtual_Guest_Block_Device_Template_Group_Status struct { Entity diff --git a/go.mod b/go.mod index 83123ec..da229f7 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,15 @@ module github.com/softlayer/softlayer-go -go 1.14 +go 1.19 require ( github.com/jarcoal/httpmock v1.0.5 github.com/softlayer/xmlrpc v0.0.0-20200409220501-5f089df7cb7e golang.org/x/tools v0.0.0-20200410194907-79a7a3126eef ) + +require ( + golang.org/x/mod v0.2.0 // indirect + golang.org/x/text v0.3.0 // indirect + golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect +) diff --git a/services/account.go b/services/account.go index 6d68a2b..af9cf4d 100644 --- a/services/account.go +++ b/services/account.go @@ -667,7 +667,7 @@ func (r Account) GetDisablePaymentProcessingFlag() (resp bool, err error) { return } -// Retrieve disk usage data on a [[SoftLayer_Virtual_Guest|Cloud Computing Instance]] image for the time range you provide from the Metric Tracking Object System and Legacy Data Warehouse. Each data entry objects contain ''dateTime'' and ''counter'' properties. ''dateTime'' property indicates the time that the disk usage data was measured and ''counter'' property holds the disk usage in bytes. +// Retrieve disk usage data on a [[SoftLayer_Virtual_Guest|Cloud Computing Instance]] image for the time range you provide from the Metric Tracking Object System and Legacy Data Warehouse. Each data entry objects contain ”dateTime” and ”counter” properties. ”dateTime” property indicates the time that the disk usage data was measured and ”counter” property holds the disk usage in bytes. func (r Account) GetDiskUsageMetricDataByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ startDateTime, @@ -677,7 +677,7 @@ func (r Account) GetDiskUsageMetricDataByDate(startDateTime *datatypes.Time, end return } -// Retrieve disk usage data on a [[SoftLayer_Virtual_Guest|Cloud Computing Instance]] image for the time range you provide from the Legacy Data Warehouse. Each data entry objects contain ''dateTime'' and ''counter'' properties. ''dateTime'' property indicates the time that the disk usage data was measured and ''counter'' property holds the disk usage in bytes. +// Retrieve disk usage data on a [[SoftLayer_Virtual_Guest|Cloud Computing Instance]] image for the time range you provide from the Legacy Data Warehouse. Each data entry objects contain ”dateTime” and ”counter” properties. ”dateTime” property indicates the time that the disk usage data was measured and ”counter” property holds the disk usage in bytes. func (r Account) GetDiskUsageMetricDataFromLegacyByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ startDateTime, @@ -687,7 +687,7 @@ func (r Account) GetDiskUsageMetricDataFromLegacyByDate(startDateTime *datatypes return } -// Retrieve disk usage data on a [[SoftLayer_Virtual_Guest|Cloud Computing Instance]] image for the time range you provide from the Metric Tracking Object System. Each data entry object contains ''dateTime'' and ''counter'' properties. ''dateTime'' property indicates the time that the disk usage data was measured and ''counter'' property holds the disk usage in bytes. +// Retrieve disk usage data on a [[SoftLayer_Virtual_Guest|Cloud Computing Instance]] image for the time range you provide from the Metric Tracking Object System. Each data entry object contains ”dateTime” and ”counter” properties. ”dateTime” property indicates the time that the disk usage data was measured and ”counter” property holds the disk usage in bytes. func (r Account) GetDiskUsageMetricDataFromMetricTrackingObjectSystemByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ startDateTime, @@ -2314,7 +2314,7 @@ func (r Account_Address) Offset(offset int) Account_Address { return r } -// Create a new address record. The ''typeId'', ''accountId'', ''description'', ''address1'', ''city'', ''state'', ''country'', and ''postalCode'' properties in the templateObject parameter are required properties and may not be null or empty. Users will be restricted to creating addresses for their account. +// Create a new address record. The ”typeId”, ”accountId”, ”description”, ”address1”, ”city”, ”state”, ”country”, and ”postalCode” properties in the templateObject parameter are required properties and may not be null or empty. Users will be restricted to creating addresses for their account. func (r Account_Address) CreateObject(templateObject *datatypes.Account_Address) (resp datatypes.Account_Address, err error) { params := []interface{}{ templateObject, @@ -3410,7 +3410,7 @@ func (r Account_Link_OpenStack) DeleteOSProject(projectId *string) (resp bool, e return } -// deleteObject permanently removes an account link and all of it's associated keystone data (including users for the associated project). '''This cannot be undone.''' Be wary of running this method. If you remove an account link in error you will need to re-create it by creating a new SoftLayer_Account_Link_OpenStack object. +// deleteObject permanently removes an account link and all of it's associated keystone data (including users for the associated project). ”'This cannot be undone.”' Be wary of running this method. If you remove an account link in error you will need to re-create it by creating a new SoftLayer_Account_Link_OpenStack object. func (r Account_Link_OpenStack) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Account_Link_OpenStack", "deleteObject", nil, &r.Options, &resp) return @@ -4638,11 +4638,6 @@ func (r Account_ProofOfConcept_Funding_Type) GetObject() (resp datatypes.Account return } -// -// -// -// -// type Account_Regional_Registry_Detail struct { Session *session.Session Options sl.Options @@ -4752,7 +4747,7 @@ func (r Account_Regional_Registry_Detail) UpdateReferencedRegistrations() (resp // Validates this person detail against all supported external registrars (APNIC/ARIN/RIPE). The validation uses the most restrictive rules ensuring that any person detail passing this validation would be acceptable to any supported registrar. // -// The person detail properties are validated against - Non-emptiness - Minimum length - Maximum length - Maximum words - Supported characters - Format of data +// # The person detail properties are validated against - Non-emptiness - Minimum length - Maximum length - Maximum words - Supported characters - Format of data // // If the person detail validation succeeds, then an empty list is returned indicating no errors were found and that this person detail would work against all three registrars during a subnet registration. // @@ -5514,7 +5509,7 @@ func (r Account_Shipment_Tracking_Data) Offset(offset int) Account_Shipment_Trac return r } -// Create a new shipment tracking data. The ''shipmentId'', ''sequence'', and ''trackingData'' properties in the templateObject parameter are required parameters to create a tracking data record. +// Create a new shipment tracking data. The ”shipmentId”, ”sequence”, and ”trackingData” properties in the templateObject parameter are required parameters to create a tracking data record. func (r Account_Shipment_Tracking_Data) CreateObject(templateObject *datatypes.Account_Shipment_Tracking_Data) (resp datatypes.Account_Shipment_Tracking_Data, err error) { params := []interface{}{ templateObject, @@ -5523,7 +5518,7 @@ func (r Account_Shipment_Tracking_Data) CreateObject(templateObject *datatypes.A return } -// Create a new shipment tracking data. The ''shipmentId'', ''sequence'', and ''trackingData'' properties of each templateObject in the templateObjects array are required parameters to create a tracking data record. +// Create a new shipment tracking data. The ”shipmentId”, ”sequence”, and ”trackingData” properties of each templateObject in the templateObjects array are required parameters to create a tracking data record. func (r Account_Shipment_Tracking_Data) CreateObjects(templateObjects []datatypes.Account_Shipment_Tracking_Data) (resp []datatypes.Account_Shipment_Tracking_Data, err error) { params := []interface{}{ templateObjects, diff --git a/services/brand.go b/services/brand.go index 6742751..1c36dbf 100644 --- a/services/brand.go +++ b/services/brand.go @@ -81,101 +81,111 @@ func (r Brand) CreateCustomerAccount(account *datatypes.Account, bypassDuplicate return } -// // createObject() allows the creation of a new brand. This will also create an `account` // to serve as the owner of the brand. // -// // In order to create a brand, a template object must be sent in with several required values. // -// // ### Input [[SoftLayer_Brand]] // -// -// // - `name` -// + Name of brand -// + Required -// + Type: string +// - Name of brand +// - Required +// - Type: string +// // - `keyName` -// + Reference key name -// + Required -// + Type: string +// - Reference key name +// - Required +// - Type: string +// // - `longName` -// + More descriptive name of brand -// + Required -// + Type: string +// - More descriptive name of brand +// - Required +// - Type: string +// // - `account.firstName` -// + First Name of account contact -// + Required -// + Type: string +// - First Name of account contact +// - Required +// - Type: string +// // - `account.lastName` -// + Last Name of account contact -// + Required -// + Type: string +// - Last Name of account contact +// - Required +// - Type: string +// // - `account.address1` -// + Street Address of company -// + Required -// + Type: string +// - Street Address of company +// - Required +// - Type: string +// // - `account.address2` -// + Street Address of company -// + Optional -// + Type: string +// - Street Address of company +// - Optional +// - Type: string +// // - `account.city` -// + City of company -// + Required -// + Type: string +// - City of company +// - Required +// - Type: string +// // - `account.state` -// + State of company (if applicable) -// + Conditionally Required -// + Type: string +// - State of company (if applicable) +// - Conditionally Required +// - Type: string +// // - `account.postalCode` -// + Postal Code of company -// + Required -// + Type: string +// - Postal Code of company +// - Required +// - Type: string +// // - `account.country` -// + Country of company -// + Required -// + Type: string +// - Country of company +// - Required +// - Type: string +// // - `account.officePhone` -// + Office Phone number of Company -// + Required -// + Type: string +// - Office Phone number of Company +// - Required +// - Type: string +// // - `account.alternatePhone` -// + Alternate Phone number of Company -// + Optional -// + Type: string +// - Alternate Phone number of Company +// - Optional +// - Type: string +// // - `account.companyName` -// + Name of company -// + Required -// + Type: string -// - `account.email` -// + Email address of account contact -// + Required -// + Type: string +// - Name of company +// - Required +// - Type: string // +// - `account.email` +// - Email address of account contact +// - Required +// - Type: string // // REST Example: // ``` -// curl -X POST -d '{ -// "parameters":[{ -// "name": "Brand Corp", -// "keyName": "BRAND_CORP", -// "longName": "Brand Corporation", -// "account": { -// "firstName": "Gloria", -// "lastName": "Brand", -// "address1": "123 Drive", -// "city": "Boston", -// "state": "MA", -// "postalCode": "02107", -// "country": "US", -// "companyName": "Brand Corp", -// "officePhone": "857-111-1111", -// "email": "noreply@example.com" -// } -// }] -// }' https://api.softlayer.com/rest/v3.1/SoftLayer_Brand/createObject.json +// +// curl -X POST -d '{ +// "parameters":[{ +// "name": "Brand Corp", +// "keyName": "BRAND_CORP", +// "longName": "Brand Corporation", +// "account": { +// "firstName": "Gloria", +// "lastName": "Brand", +// "address1": "123 Drive", +// "city": "Boston", +// "state": "MA", +// "postalCode": "02107", +// "country": "US", +// "companyName": "Brand Corp", +// "officePhone": "857-111-1111", +// "email": "noreply@example.com" +// } +// }] +// }' https://api.softlayer.com/rest/v3.1/SoftLayer_Brand/createObject.json +// // ``` func (r Brand) CreateObject(templateObject *datatypes.Brand) (resp datatypes.Brand, err error) { params := []interface{}{ @@ -409,8 +419,6 @@ func (r Brand) ReactivateAccount(accountId *int) (err error) { } // When this service is called given an IBM Cloud infrastructure account ID owned by the calling brand, the process is started to refresh the billing item snapshots belonging to that account. This refresh is async and can take an undetermined amount of time. Even if this endpoint returns an OK, it doesn't guarantee that refresh did not fail or encounter issues. -// -// func (r Brand) RefreshBillingItemSnapshot(accountId *int) (resp bool, err error) { params := []interface{}{ accountId, diff --git a/services/configuration.go b/services/configuration.go index 7f18fd0..57d1eaf 100644 --- a/services/configuration.go +++ b/services/configuration.go @@ -331,8 +331,6 @@ func (r Configuration_Template_Section) HasSubSections() (resp bool, err error) // Configuration definition gives you details of the value that you're setting. // // If value type is defined as "Resource Specific Values", you will have to make an additional API call to retrieve your system specific values. -// -// type Configuration_Template_Section_Definition struct { Session *session.Session Options sl.Options @@ -415,8 +413,6 @@ func (r Configuration_Template_Section_Definition) GetValueType() (resp datatype } // Configuration definition group gives you details of the definition and allows extra functionality. -// -// type Configuration_Template_Section_Definition_Group struct { Session *session.Session Options sl.Options @@ -458,7 +454,7 @@ func (r Configuration_Template_Section_Definition_Group) Offset(offset int) Conf // Get all configuration definition group objects. // -// ''getAllGroups'' returns an array of SoftLayer_Configuration_Template_Section_Definition_Group objects upon success. +// ”getAllGroups” returns an array of SoftLayer_Configuration_Template_Section_Definition_Group objects upon success. func (r Configuration_Template_Section_Definition_Group) GetAllGroups() (resp []datatypes.Configuration_Template_Section_Definition_Group, err error) { err = r.Session.DoRequest("SoftLayer_Configuration_Template_Section_Definition_Group", "getAllGroups", nil, &r.Options, &resp) return diff --git a/services/dns.go b/services/dns.go index d2555c4..83de2f7 100644 --- a/services/dns.go +++ b/services/dns.go @@ -128,20 +128,19 @@ func (r Dns_Domain) CreateNsRecord(host *string, data *string, ttl *int) (resp d // Create a new domain on the SoftLayer name servers. The SoftLayer_Dns_Domain object passed to this function must have at least one A or AAAA resource record. // // createObject creates a default SOA record with the data: -// * '''host''': "@" -// * '''data''': "ns1.softlayer.com." -// * '''responsible person''': "root.[your domain name]." -// * '''expire''': 604800 seconds -// * '''refresh''': 3600 seconds -// * '''retry''': 300 seconds -// * '''minimum''': 3600 seconds -// +// * ”'host”': "@" +// * ”'data”': "ns1.softlayer.com." +// * ”'responsible person”': "root.[your domain name]." +// * ”'expire”': 604800 seconds +// * ”'refresh”': 3600 seconds +// * ”'retry”': 300 seconds +// * ”'minimum”': 3600 seconds // // If your new domain uses the .de top-level domain then SOA refresh is set to 10000 seconds, retry is set to 1800 seconds, and minimum to 10000 seconds. // -// If your domain doesn't contain NS resource records for ns1.softlayer.com or ns2.softlayer.com then ''createObject'' will create them for you. +// If your domain doesn't contain NS resource records for ns1.softlayer.com or ns2.softlayer.com then ”createObject” will create them for you. // -// ''createObject'' returns a Boolean ''true'' on successful object creation or ''false'' if your domain was unable to be created.. +// ”createObject” returns a Boolean ”true” on successful object creation or ”false” if your domain was unable to be created.. func (r Dns_Domain) CreateObject(templateObject *datatypes.Dns_Domain) (resp datatypes.Dns_Domain, err error) { params := []interface{}{ templateObject, @@ -150,7 +149,7 @@ func (r Dns_Domain) CreateObject(templateObject *datatypes.Dns_Domain) (resp dat return } -// Create multiple domains on the SoftLayer name servers. Each domain record passed to ''createObjects'' follows the logic in the SoftLayer_Dns_Domain ''createObject'' method. +// Create multiple domains on the SoftLayer name servers. Each domain record passed to ”createObjects” follows the logic in the SoftLayer_Dns_Domain ”createObject” method. func (r Dns_Domain) CreateObjects(templateObjects []datatypes.Dns_Domain) (resp []datatypes.Dns_Domain, err error) { params := []interface{}{ templateObjects, @@ -192,7 +191,7 @@ func (r Dns_Domain) CreateTxtRecord(host *string, data *string, ttl *int) (resp return } -// deleteObject permanently removes a domain and all of it's associated resource records from the softlayer name servers. '''This cannot be undone.''' Be wary of running this method. If you remove a domain in error you will need to re-create it by creating a new SoftLayer_Dns_Domain object. +// deleteObject permanently removes a domain and all of it's associated resource records from the softlayer name servers. ”'This cannot be undone.”' Be wary of running this method. If you remove a domain in error you will need to re-create it by creating a new SoftLayer_Dns_Domain object. func (r Dns_Domain) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Dns_Domain", "deleteObject", nil, &r.Options, &resp) return @@ -476,15 +475,12 @@ func (r Dns_Domain_Registration) UnlockDomain() (resp bool, err error) { // SoftLayer_Dns_Domain_Registration_Registrant_Verification_Status models the state of the registrant. Here are the following status codes: // -// -// *'''Admin Reviewing''': The registrant data has been submitted and being reviewed by compliance team. -// *'''Pending''': The verification process has been inititated, and verification email will be sent. -// *'''Suspended''': The registrant has failed verification and the domain has been suspended. -// *'''Verified''': The registrant has been validated. -// *'''Verifying''': The verification process has been initiated and is waiting for registrant response. -// *'''Unverified''': The verification process has not been inititated. -// -// +// *”'Admin Reviewing”': The registrant data has been submitted and being reviewed by compliance team. +// *”'Pending”': The verification process has been inititated, and verification email will be sent. +// *”'Suspended”': The registrant has failed verification and the domain has been suspended. +// *”'Verified”': The registrant has been validated. +// *”'Verifying”': The verification process has been initiated and is waiting for registrant response. +// *”'Unverified”': The verification process has not been inititated. type Dns_Domain_Registration_Registrant_Verification_Status struct { Session *session.Session Options sl.Options @@ -538,14 +534,11 @@ func (r Dns_Domain_Registration_Registrant_Verification_Status) GetObject() (res // SoftLayer_Dns_Domain_Registration_Status models the state of domain name. Here are the following status codes: // -// -// *'''Active''': This domain name is active. -// *'''Pending Owner Approval''': Pending owner approval for completion of transfer. -// *'''Pending Admin Review''': Pending admin review for transfer. -// *'''Pending Registry''': Pending registry for transfer. -// *'''Expired''': Domain name has expired. -// -// +// *”'Active”': This domain name is active. +// *”'Pending Owner Approval”': Pending owner approval for completion of transfer. +// *”'Pending Admin Review”': Pending admin review for transfer. +// *”'Pending Registry”': Pending registry for transfer. +// *”'Expired”': Domain name has expired. type Dns_Domain_Registration_Status struct { Session *session.Session Options sl.Options @@ -597,20 +590,19 @@ func (r Dns_Domain_Registration_Status) GetObject() (resp datatypes.Dns_Domain_R return } -// The SoftLayer_Dns_Domain_ResourceRecord data type represents a single resource record entry in a SoftLayer hosted domain. Each resource record contains a ''host'' and ''data'' property, defining a resource's name and it's target data. Domains contain multiple types of resource records. The ''type'' property separates out resource records by type. ''Type'' can take one of the following values: -// * '''"a"''' for [[SoftLayer_Dns_Domain_ResourceRecord_AType|address]] records -// * '''"aaaa"''' for [[SoftLayer_Dns_Domain_ResourceRecord_AaaaType|address]] records -// * '''"cname"''' for [[SoftLayer_Dns_Domain_ResourceRecord_CnameType|canonical name]] records -// * '''"mx"''' for [[SoftLayer_Dns_Domain_ResourceRecord_MxType|mail exchanger]] records -// * '''"ns"''' for [[SoftLayer_Dns_Domain_ResourceRecord_NsType|name server]] records -// * '''"ptr"''' for [[SoftLayer_Dns_Domain_ResourceRecord_PtrType|pointer]] records in reverse domains -// * '''"soa"''' for a domain's [[SoftLayer_Dns_Domain_ResourceRecord_SoaType|start of authority]] record -// * '''"spf"''' for [[SoftLayer_Dns_Domain_ResourceRecord_SpfType|sender policy framework]] records -// * '''"srv"''' for [[SoftLayer_Dns_Domain_ResourceRecord_SrvType|service]] records -// * '''"txt"''' for [[SoftLayer_Dns_Domain_ResourceRecord_TxtType|text]] records -// +// The SoftLayer_Dns_Domain_ResourceRecord data type represents a single resource record entry in a SoftLayer hosted domain. Each resource record contains a ”host” and ”data” property, defining a resource's name and it's target data. Domains contain multiple types of resource records. The ”type” property separates out resource records by type. ”Type” can take one of the following values: +// * ”'"a"”' for [[SoftLayer_Dns_Domain_ResourceRecord_AType|address]] records +// * ”'"aaaa"”' for [[SoftLayer_Dns_Domain_ResourceRecord_AaaaType|address]] records +// * ”'"cname"”' for [[SoftLayer_Dns_Domain_ResourceRecord_CnameType|canonical name]] records +// * ”'"mx"”' for [[SoftLayer_Dns_Domain_ResourceRecord_MxType|mail exchanger]] records +// * ”'"ns"”' for [[SoftLayer_Dns_Domain_ResourceRecord_NsType|name server]] records +// * ”'"ptr"”' for [[SoftLayer_Dns_Domain_ResourceRecord_PtrType|pointer]] records in reverse domains +// * ”'"soa"”' for a domain's [[SoftLayer_Dns_Domain_ResourceRecord_SoaType|start of authority]] record +// * ”'"spf"”' for [[SoftLayer_Dns_Domain_ResourceRecord_SpfType|sender policy framework]] records +// * ”'"srv"”' for [[SoftLayer_Dns_Domain_ResourceRecord_SrvType|service]] records +// * ”'"txt"”' for [[SoftLayer_Dns_Domain_ResourceRecord_TxtType|text]] records // -// As ''SoftLayer_Dns_Domain_ResourceRecord'' objects are created and loaded, the API verifies the ''type'' property and casts the object as the appropriate type. +// As ”SoftLayer_Dns_Domain_ResourceRecord” objects are created and loaded, the API verifies the ”type” property and casts the object as the appropriate type. type Dns_Domain_ResourceRecord struct { Session *session.Session Options sl.Options @@ -650,9 +642,9 @@ func (r Dns_Domain_ResourceRecord) Offset(offset int) Dns_Domain_ResourceRecord return r } -// createObject creates a new domain resource record. The ''host'' property of the templateObject parameter is scrubbed to remove all non-alpha numeric characters except for "@", "_", ".", "*", and "-". The ''data'' property of the templateObject parameter is scrubbed to remove all non-alphanumeric characters for "." and "-". Creating a resource record updates the serial number of the domain the resource record is associated with. +// createObject creates a new domain resource record. The ”host” property of the templateObject parameter is scrubbed to remove all non-alpha numeric characters except for "@", "_", ".", "*", and "-". The ”data” property of the templateObject parameter is scrubbed to remove all non-alphanumeric characters for "." and "-". Creating a resource record updates the serial number of the domain the resource record is associated with. // -// ''createObject'' returns Boolean ''true'' on successful create or ''false'' if it was unable to create a resource record. +// ”createObject” returns Boolean ”true” on successful create or ”false” if it was unable to create a resource record. func (r Dns_Domain_ResourceRecord) CreateObject(templateObject *datatypes.Dns_Domain_ResourceRecord) (resp datatypes.Dns_Domain_ResourceRecord, err error) { params := []interface{}{ templateObject, @@ -661,9 +653,9 @@ func (r Dns_Domain_ResourceRecord) CreateObject(templateObject *datatypes.Dns_Do return } -// Create multiple resource records on a domain. This follows the same logic as ''createObject'. The serial number of the domain associated with this resource record is updated upon creation. +// Create multiple resource records on a domain. This follows the same logic as ”createObject'. The serial number of the domain associated with this resource record is updated upon creation. // -// ''createObjects'' returns Boolean ''true'' on successful creation or ''false'' if it was unable to create a resource record. +// ”createObjects” returns Boolean ”true” on successful creation or ”false” if it was unable to create a resource record. func (r Dns_Domain_ResourceRecord) CreateObjects(templateObjects []datatypes.Dns_Domain_ResourceRecord) (resp []datatypes.Dns_Domain_ResourceRecord, err error) { params := []interface{}{ templateObjects, @@ -672,17 +664,17 @@ func (r Dns_Domain_ResourceRecord) CreateObjects(templateObjects []datatypes.Dns return } -// Delete a domain's resource record. '''This cannot be undone.''' Be wary of running this method. If you remove a resource record in error you will need to re-create it by creating a new SoftLayer_Dns_Domain_ResourceRecord object. The serial number of the domain associated with this resource record is updated upon deletion. You may not delete SOA, NS, or PTR resource records. +// Delete a domain's resource record. ”'This cannot be undone.”' Be wary of running this method. If you remove a resource record in error you will need to re-create it by creating a new SoftLayer_Dns_Domain_ResourceRecord object. The serial number of the domain associated with this resource record is updated upon deletion. You may not delete SOA, NS, or PTR resource records. // -// ''deleteObject'' returns Boolean ''true'' on successful deletion or ''false'' if it was unable to remove a resource record. +// ”deleteObject” returns Boolean ”true” on successful deletion or ”false” if it was unable to remove a resource record. func (r Dns_Domain_ResourceRecord) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Dns_Domain_ResourceRecord", "deleteObject", nil, &r.Options, &resp) return } -// Remove multiple resource records from a domain. This follows the same logic as ''deleteObject'' and '''cannot be undone'''. The serial number of the domain associated with this resource record is updated upon deletion. You may not delete SOA records, PTR records, or NS resource records that point to ns1.softlayer.com or ns2.softlayer.com. +// Remove multiple resource records from a domain. This follows the same logic as ”deleteObject” and ”'cannot be undone”'. The serial number of the domain associated with this resource record is updated upon deletion. You may not delete SOA records, PTR records, or NS resource records that point to ns1.softlayer.com or ns2.softlayer.com. // -// ''deleteObjects'' returns Boolean ''true'' on successful deletion or ''false'' if it was unable to remove a resource record. +// ”deleteObjects” returns Boolean ”true” on successful deletion or ”false” if it was unable to remove a resource record. func (r Dns_Domain_ResourceRecord) DeleteObjects(templateObjects []datatypes.Dns_Domain_ResourceRecord) (resp bool, err error) { params := []interface{}{ templateObjects, @@ -691,9 +683,9 @@ func (r Dns_Domain_ResourceRecord) DeleteObjects(templateObjects []datatypes.Dns return } -// editObject edits an existing domain resource record. The ''host'' property of the templateObject parameter is scrubbed to remove all non-alpha numeric characters except for "@", "_", ".", "*", and "-". The ''data'' property of the templateObject parameter is scrubbed to remove all non-alphanumeric characters for "." and "-". Editing a resource record updates the serial number of the domain the resource record is associated with. +// editObject edits an existing domain resource record. The ”host” property of the templateObject parameter is scrubbed to remove all non-alpha numeric characters except for "@", "_", ".", "*", and "-". The ”data” property of the templateObject parameter is scrubbed to remove all non-alphanumeric characters for "." and "-". Editing a resource record updates the serial number of the domain the resource record is associated with. // -// ''editObject'' returns Boolean ''true'' on a successful edit or ''false'' if it was unable to edit the resource record. +// ”editObject” returns Boolean ”true” on a successful edit or ”false” if it was unable to edit the resource record. func (r Dns_Domain_ResourceRecord) EditObject(templateObject *datatypes.Dns_Domain_ResourceRecord) (resp bool, err error) { params := []interface{}{ templateObject, @@ -702,9 +694,9 @@ func (r Dns_Domain_ResourceRecord) EditObject(templateObject *datatypes.Dns_Doma return } -// Edit multiple resource records on a domain. This follows the same logic as ''createObject'. The serial number of the domain associated with this resource record is updated upon creation. +// Edit multiple resource records on a domain. This follows the same logic as ”createObject'. The serial number of the domain associated with this resource record is updated upon creation. // -// ''createObjects'' returns Boolean ''true'' on successful creation or ''false'' if it was unable to create a resource record. +// ”createObjects” returns Boolean ”true” on successful creation or ”false” if it was unable to create a resource record. func (r Dns_Domain_ResourceRecord) EditObjects(templateObjects []datatypes.Dns_Domain_ResourceRecord) (resp bool, err error) { params := []interface{}{ templateObjects, @@ -725,7 +717,7 @@ func (r Dns_Domain_ResourceRecord) GetObject() (resp datatypes.Dns_Domain_Resour return } -// SoftLayer_Dns_Domain_ResourceRecord_MxType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "mx" and used to describe MX resource records. MX records control which hosts are responsible as mail exchangers for a domain. For instance, in the domain example.org, an MX record whose host is "@" and data is "mail" says that the host "mail.example.org" is responsible for handling mail for example.org. That means mail sent to users @example.org are delivered to mail.example.org. +// SoftLayer_Dns_Domain_ResourceRecord_MxType is a SoftLayer_Dns_Domain_ResourceRecord object whose ”type” property is set to "mx" and used to describe MX resource records. MX records control which hosts are responsible as mail exchangers for a domain. For instance, in the domain example.org, an MX record whose host is "@" and data is "mail" says that the host "mail.example.org" is responsible for handling mail for example.org. That means mail sent to users @example.org are delivered to mail.example.org. // // Domains can have more than one MX record if it uses more than one server to send mail through. Multiple MX records are denoted by their priority, defined by the mxPriority property. // @@ -769,7 +761,7 @@ func (r Dns_Domain_ResourceRecord_MxType) Offset(offset int) Dns_Domain_Resource return r } -// createObject creates a new MX record. The ''host'' property of the templateObject parameter is scrubbed to remove all non-alpha numeric characters except for "@", "_", ".", "*", and "-". The ''data'' property of the templateObject parameter is scrubbed to remove all non-alphanumeric characters for "." and "-". Creating an MX record updates the serial number of the domain the resource record is associated with. +// createObject creates a new MX record. The ”host” property of the templateObject parameter is scrubbed to remove all non-alpha numeric characters except for "@", "_", ".", "*", and "-". The ”data” property of the templateObject parameter is scrubbed to remove all non-alphanumeric characters for "." and "-". Creating an MX record updates the serial number of the domain the resource record is associated with. func (r Dns_Domain_ResourceRecord_MxType) CreateObject(templateObject *datatypes.Dns_Domain_ResourceRecord_MxType) (resp datatypes.Dns_Domain_ResourceRecord_MxType, err error) { params := []interface{}{ templateObject, @@ -778,9 +770,9 @@ func (r Dns_Domain_ResourceRecord_MxType) CreateObject(templateObject *datatypes return } -// Create multiple MX records on a domain. This follows the same logic as ''createObject'. The serial number of the domain associated with this MX record is updated upon creation. +// Create multiple MX records on a domain. This follows the same logic as ”createObject'. The serial number of the domain associated with this MX record is updated upon creation. // -// ''createObjects'' returns Boolean ''true'' on successful creation or ''false'' if it was unable to create a resource record. +// ”createObjects” returns Boolean ”true” on successful creation or ”false” if it was unable to create a resource record. func (r Dns_Domain_ResourceRecord_MxType) CreateObjects(templateObjects []datatypes.Dns_Domain_ResourceRecord) (resp []datatypes.Dns_Domain_ResourceRecord, err error) { params := []interface{}{ templateObjects, @@ -789,17 +781,17 @@ func (r Dns_Domain_ResourceRecord_MxType) CreateObjects(templateObjects []dataty return } -// Delete a domain's MX record. '''This cannot be undone.''' Be wary of running this method. If you remove a resource record in error you will need to re-create it by creating a new SoftLayer_Dns_Domain_ResourceRecord_MxType object. The serial number of the domain associated with this MX record is updated upon deletion. +// Delete a domain's MX record. ”'This cannot be undone.”' Be wary of running this method. If you remove a resource record in error you will need to re-create it by creating a new SoftLayer_Dns_Domain_ResourceRecord_MxType object. The serial number of the domain associated with this MX record is updated upon deletion. // -// ''deleteObject'' returns Boolean ''true'' on successful deletion or ''false'' if it was unable to remove a resource record. +// ”deleteObject” returns Boolean ”true” on successful deletion or ”false” if it was unable to remove a resource record. func (r Dns_Domain_ResourceRecord_MxType) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Dns_Domain_ResourceRecord_MxType", "deleteObject", nil, &r.Options, &resp) return } -// Remove multiple MX records from a domain. This follows the same logic as ''deleteObject'' and '''cannot be undone'''. The serial number of the domain associated with this MX record is updated upon deletion. +// Remove multiple MX records from a domain. This follows the same logic as ”deleteObject” and ”'cannot be undone”'. The serial number of the domain associated with this MX record is updated upon deletion. // -// ''deleteObjects'' returns Boolean ''true'' on successful deletion or ''false'' if it was unable to remove a resource record. +// ”deleteObjects” returns Boolean ”true” on successful deletion or ”false” if it was unable to remove a resource record. func (r Dns_Domain_ResourceRecord_MxType) DeleteObjects(templateObjects []datatypes.Dns_Domain_ResourceRecord_MxType) (resp bool, err error) { params := []interface{}{ templateObjects, @@ -808,9 +800,9 @@ func (r Dns_Domain_ResourceRecord_MxType) DeleteObjects(templateObjects []dataty return } -// editObject edits an existing MX resource record. The ''host'' property of the templateObject parameter is scrubbed to remove all non-alpha numeric characters except for "@", "_", ".", "*", and "-". The ''data'' property of the templateObject parameter is scrubbed to remove all non-alphanumeric characters for "." and "-". Editing an MX record updates the serial number of the domain the record is associated with. +// editObject edits an existing MX resource record. The ”host” property of the templateObject parameter is scrubbed to remove all non-alpha numeric characters except for "@", "_", ".", "*", and "-". The ”data” property of the templateObject parameter is scrubbed to remove all non-alphanumeric characters for "." and "-". Editing an MX record updates the serial number of the domain the record is associated with. // -// ''editObject'' returns Boolean ''true'' on a successful edit or ''false'' if it was unable to edit the resource record. +// ”editObject” returns Boolean ”true” on a successful edit or ”false” if it was unable to edit the resource record. func (r Dns_Domain_ResourceRecord_MxType) EditObject(templateObject *datatypes.Dns_Domain_ResourceRecord_MxType) (resp bool, err error) { params := []interface{}{ templateObject, @@ -819,9 +811,9 @@ func (r Dns_Domain_ResourceRecord_MxType) EditObject(templateObject *datatypes.D return } -// Edit multiple MX records on a domain. This follows the same logic as ''createObject'. The serial number of the domain associated with this MX record is updated upon creation. +// Edit multiple MX records on a domain. This follows the same logic as ”createObject'. The serial number of the domain associated with this MX record is updated upon creation. // -// ''createObjects'' returns Boolean ''true'' on successful creation or ''false'' if it was unable to create a resource record. +// ”createObjects” returns Boolean ”true” on successful creation or ”false” if it was unable to create a resource record. func (r Dns_Domain_ResourceRecord_MxType) EditObjects(templateObjects []datatypes.Dns_Domain_ResourceRecord_MxType) (resp bool, err error) { params := []interface{}{ templateObjects, @@ -842,7 +834,7 @@ func (r Dns_Domain_ResourceRecord_MxType) GetObject() (resp datatypes.Dns_Domain return } -// SoftLayer_Dns_Domain_ResourceRecord_SrvType is a SoftLayer_Dns_Domain_ResourceRecord object whose ''type'' property is set to "srv" and defines a DNS SRV record on a SoftLayer hosted domain. +// SoftLayer_Dns_Domain_ResourceRecord_SrvType is a SoftLayer_Dns_Domain_ResourceRecord object whose ”type” property is set to "srv" and defines a DNS SRV record on a SoftLayer hosted domain. type Dns_Domain_ResourceRecord_SrvType struct { Session *session.Session Options sl.Options @@ -882,7 +874,7 @@ func (r Dns_Domain_ResourceRecord_SrvType) Offset(offset int) Dns_Domain_Resourc return r } -// createObject creates a new SRV record. The ''host'' property of the templateObject parameter is scrubbed to remove all non-alpha numeric characters except for "@", "_", ".", "*", and "-". The ''data'' property of the templateObject parameter is scrubbed to remove all non-alphanumeric characters for "." and "-". Creating an SRV record updates the serial number of the domain the resource record is associated with. +// createObject creates a new SRV record. The ”host” property of the templateObject parameter is scrubbed to remove all non-alpha numeric characters except for "@", "_", ".", "*", and "-". The ”data” property of the templateObject parameter is scrubbed to remove all non-alphanumeric characters for "." and "-". Creating an SRV record updates the serial number of the domain the resource record is associated with. func (r Dns_Domain_ResourceRecord_SrvType) CreateObject(templateObject *datatypes.Dns_Domain_ResourceRecord_SrvType) (resp datatypes.Dns_Domain_ResourceRecord_SrvType, err error) { params := []interface{}{ templateObject, @@ -891,9 +883,9 @@ func (r Dns_Domain_ResourceRecord_SrvType) CreateObject(templateObject *datatype return } -// Create multiple SRV records on a domain. This follows the same logic as ''createObject'. The serial number of the domain associated with this SRV record is updated upon creation. +// Create multiple SRV records on a domain. This follows the same logic as ”createObject'. The serial number of the domain associated with this SRV record is updated upon creation. // -// ''createObjects'' returns Boolean ''true'' on successful creation or ''false'' if it was unable to create a resource record. +// ”createObjects” returns Boolean ”true” on successful creation or ”false” if it was unable to create a resource record. func (r Dns_Domain_ResourceRecord_SrvType) CreateObjects(templateObjects []datatypes.Dns_Domain_ResourceRecord) (resp []datatypes.Dns_Domain_ResourceRecord, err error) { params := []interface{}{ templateObjects, @@ -902,17 +894,17 @@ func (r Dns_Domain_ResourceRecord_SrvType) CreateObjects(templateObjects []datat return } -// Delete a domain's SRV record. '''This cannot be undone.''' Be wary of running this method. If you remove a resource record in error you will need to re-create it by creating a new SoftLayer_Dns_Domain_ResourceRecord_SrvType object. The serial number of the domain associated with this SRV record is updated upon deletion. +// Delete a domain's SRV record. ”'This cannot be undone.”' Be wary of running this method. If you remove a resource record in error you will need to re-create it by creating a new SoftLayer_Dns_Domain_ResourceRecord_SrvType object. The serial number of the domain associated with this SRV record is updated upon deletion. // -// ''deleteObject'' returns Boolean ''true'' on successful deletion or ''false'' if it was unable to remove a resource record. +// ”deleteObject” returns Boolean ”true” on successful deletion or ”false” if it was unable to remove a resource record. func (r Dns_Domain_ResourceRecord_SrvType) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Dns_Domain_ResourceRecord_SrvType", "deleteObject", nil, &r.Options, &resp) return } -// Remove multiple SRV records from a domain. This follows the same logic as ''deleteObject'' and '''cannot be undone'''. The serial number of the domain associated with this SRV record is updated upon deletion. +// Remove multiple SRV records from a domain. This follows the same logic as ”deleteObject” and ”'cannot be undone”'. The serial number of the domain associated with this SRV record is updated upon deletion. // -// ''deleteObjects'' returns Boolean ''true'' on successful deletion or ''false'' if it was unable to remove a resource record. +// ”deleteObjects” returns Boolean ”true” on successful deletion or ”false” if it was unable to remove a resource record. func (r Dns_Domain_ResourceRecord_SrvType) DeleteObjects(templateObjects []datatypes.Dns_Domain_ResourceRecord_SrvType) (resp bool, err error) { params := []interface{}{ templateObjects, @@ -921,9 +913,9 @@ func (r Dns_Domain_ResourceRecord_SrvType) DeleteObjects(templateObjects []datat return } -// editObject edits an existing SRV resource record. The ''host'' property of the templateObject parameter is scrubbed to remove all non-alpha numeric characters except for "@", "_", ".", "*", and "-". The ''data'' property of the templateObject parameter is scrubbed to remove all non-alphanumeric characters for "." and "-". Editing an SRV record updates the serial number of the domain the record is associated with. +// editObject edits an existing SRV resource record. The ”host” property of the templateObject parameter is scrubbed to remove all non-alpha numeric characters except for "@", "_", ".", "*", and "-". The ”data” property of the templateObject parameter is scrubbed to remove all non-alphanumeric characters for "." and "-". Editing an SRV record updates the serial number of the domain the record is associated with. // -// ''editObject'' returns Boolean ''true'' on a successful edit or ''false'' if it was unable to edit the resource record. +// ”editObject” returns Boolean ”true” on a successful edit or ”false” if it was unable to edit the resource record. func (r Dns_Domain_ResourceRecord_SrvType) EditObject(templateObject *datatypes.Dns_Domain_ResourceRecord_SrvType) (resp bool, err error) { params := []interface{}{ templateObject, @@ -932,9 +924,9 @@ func (r Dns_Domain_ResourceRecord_SrvType) EditObject(templateObject *datatypes. return } -// Edit multiple SRV records on a domain. This follows the same logic as ''createObject'. The serial number of the domain associated with this SRV record is updated upon creation. +// Edit multiple SRV records on a domain. This follows the same logic as ”createObject'. The serial number of the domain associated with this SRV record is updated upon creation. // -// ''createObjects'' returns Boolean ''true'' on successful creation or ''false'' if it was unable to create a resource record. +// ”createObjects” returns Boolean ”true” on successful creation or ”false” if it was unable to create a resource record. func (r Dns_Domain_ResourceRecord_SrvType) EditObjects(templateObjects []datatypes.Dns_Domain_ResourceRecord_SrvType) (resp bool, err error) { params := []interface{}{ templateObjects, @@ -1002,20 +994,18 @@ func (r Dns_Secondary) Offset(offset int) Dns_Secondary { // * All NS records are removed and replaced with SoftLayer's NS records. // * The secondary DNS record is removed. // -// // After the DNS records are converted, the following restrictions will apply to the new domain record: // * You will need to manage the zone record using the [[SoftLayer_Dns_Domain]] service. // * You may not edit the SOA or NS records. // * You may only edit the following resource records: A, AAAA, CNAME, MX, TX, SRV. // -// // This change can not be undone, and the record can not be converted back into a secondary DNS record once the conversion is complete. func (r Dns_Secondary) ConvertToPrimary() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Dns_Secondary", "convertToPrimary", nil, &r.Options, &resp) return } -// Create a secondary DNS record. The ''zoneName'', ''masterIpAddress'', and ''transferFrequency'' properties in the templateObject parameter are required parameters to create a secondary DNS record. +// Create a secondary DNS record. The ”zoneName”, ”masterIpAddress”, and ”transferFrequency” properties in the templateObject parameter are required parameters to create a secondary DNS record. func (r Dns_Secondary) CreateObject(templateObject *datatypes.Dns_Secondary) (resp datatypes.Dns_Secondary, err error) { params := []interface{}{ templateObject, @@ -1024,7 +1014,7 @@ func (r Dns_Secondary) CreateObject(templateObject *datatypes.Dns_Secondary) (re return } -// Create multiple secondary DNS records. Each record passed to ''createObjects'' follows the logic in the SoftLayer_Dns_Secondary [[SoftLayer_Dns_Secondary::createObject|createObject]] method. +// Create multiple secondary DNS records. Each record passed to ”createObjects” follows the logic in the SoftLayer_Dns_Secondary [[SoftLayer_Dns_Secondary::createObject|createObject]] method. func (r Dns_Secondary) CreateObjects(templateObjects []datatypes.Dns_Secondary) (resp []datatypes.Dns_Secondary, err error) { params := []interface{}{ templateObjects, @@ -1039,7 +1029,7 @@ func (r Dns_Secondary) DeleteObject() (resp bool, err error) { return } -// Edit the properties of a secondary DNS record by passing in a modified instance of a SoftLayer_Dns_Secondary object. You may only edit the ''masterIpAddress'' and ''transferFrequency'' properties of your secondary DNS record. ''ZoneName'' may not be altered after a secondary DNS record has been created. Please remove and re-create the record if you need to make changes to your zone name. +// Edit the properties of a secondary DNS record by passing in a modified instance of a SoftLayer_Dns_Secondary object. You may only edit the ”masterIpAddress” and ”transferFrequency” properties of your secondary DNS record. ”ZoneName” may not be altered after a secondary DNS record has been created. Please remove and re-create the record if you need to make changes to your zone name. func (r Dns_Secondary) EditObject(templateObject *datatypes.Dns_Secondary) (resp bool, err error) { params := []interface{}{ templateObject, diff --git a/services/hardware.go b/services/hardware.go index ae1ebe0..564c0a2 100644 --- a/services/hardware.go +++ b/services/hardware.go @@ -96,271 +96,277 @@ func (r Hardware) CaptureImage(captureTemplate *datatypes.Container_Disk_Image_C return } -// // // createObject() enables the creation of servers on an account. This // method is a simplified alternative to interacting with the ordering system directly. // -// // In order to create a server, a template object must be sent in with a few required // values. // -// // When this method returns an order will have been placed for a server of the specified configuration. // -// // To determine when the server is available you can poll the server via [[SoftLayer_Hardware/getObject|getObject]], // checking the provisionDate property. // When provisionDate is not null, the server will be ready. Be sure to use the globalIdentifier // as your initialization parameter. // -// // Warning: Servers created via this method will incur charges on your account. For testing input parameters see [[SoftLayer_Hardware/generateOrderTemplate|generateOrderTemplate]]. // -// // Input - [[SoftLayer_Hardware (type)|SoftLayer_Hardware]] // // +//
  • hostname +//
    Hostname for the server.
    +//
    +//
  • +//
  • domain +//
    Domain for the server.
    +//
    +//
  • +//
  • processorCoreAmount +//
    The number of logical CPU cores to allocate.
    +//
    +//
  • +//
  • memoryCapacity +//
    The amount of memory to allocate in gigabytes.
    +//
    +//
  • +//
  • hourlyBillingFlag +//
    Specifies the billing type for the server.
    +//
    +//
  • +//
  • operatingSystemReferenceCode +//
    An identifier for the operating system to provision the server with.
    +//
    +//
  • +//
  • datacenter.name +//
    Specifies which datacenter the server is to be provisioned in.
    +// { +// "datacenter": { +// "name": "dal05" +// } +// } +// +//
    +//
  • +//
  • networkComponents.maxSpeed +//
    Specifies the connection speed for the server's network components.
    +// { +// "networkComponents": [ +// { +// "maxSpeed": 1000 +// } +// ] +// } +// +//
    +//
  • +//
  • networkComponents.redundancyEnabledFlag +//
    Specifies whether or not the server's network components should be in redundancy groups.
    +// { +// "networkComponents": [ +// { +// "redundancyEnabledFlag": false +// } +// ] +// } +// +//
    +//
  • +//
  • privateNetworkOnlyFlag +//
    Specifies whether or not the server only has access to the private network
    +//
    +//
  • +//
  • primaryNetworkComponent.networkVlan.id +//
    Specifies the network vlan which is to be used for the frontend interface of the server.
    +// { +// "primaryNetworkComponent": { +// "networkVlan": { +// "id": 1 +// } +// } +// } +// +//
    +//
  • +//
  • primaryBackendNetworkComponent.networkVlan.id +//
    Specifies the network vlan which is to be used for the backend interface of the server.
    +// { +// "primaryBackendNetworkComponent": { +// "networkVlan": { +// "id": 2 +// } +// } +// } +// +//
    +//
  • +//
  • fixedConfigurationPreset.keyName +//
    +// { +// "fixedConfigurationPreset": { +// "keyName": "SOME_KEY_NAME" +// } +// } +// +//
    +//
  • +//
  • userData.value +//
    Arbitrary data to be made available to the server.
    +// { +// "userData": [ +// { +// "value": "someValue" +// } +// ] +// } +// +//
    +//
  • +//
  • hardDrives +//
    Hard drive settings for the server
    +// { +// "hardDrives": [ +// { +// "capacity": 500 +// } +// ] +// } +// +//
    +//
  • +//
  • sshKeys +//
    SSH keys to install on the server upon provisioning.
    +// { +// "sshKeys": [ +// { +// "id": 123 +// } +// ] +// } +// +//
    +//
  • +//
  • postInstallScriptUri +//
    Specifies the uri location of the script to be downloaded and run after installation is complete.
    +//
    +//
  • +// +// // //

    REST Example

    -// curl -X POST -d '{ -// "parameters":[ -// { -// "hostname": "host1", -// "domain": "example.com", -// "processorCoreAmount": 2, -// "memoryCapacity": 2, -// "hourlyBillingFlag": true, -// "operatingSystemReferenceCode": "UBUNTU_LATEST" -// } -// ] -// }' https://api.softlayer.com/rest/v3/SoftLayer_Hardware.json +// +// curl -X POST -d '{ +// "parameters":[ +// { +// "hostname": "host1", +// "domain": "example.com", +// "processorCoreAmount": 2, +// "memoryCapacity": 2, +// "hourlyBillingFlag": true, +// "operatingSystemReferenceCode": "UBUNTU_LATEST" +// } +// ] +// }' https://api.softlayer.com/rest/v3/SoftLayer_Hardware.json +// // // HTTP/1.1 201 Created // Location: https://api.softlayer.com/rest/v3/SoftLayer_Hardware/f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5/getObject // +// { +// "accountId": 232298, +// "bareMetalInstanceFlag": null, +// "domain": "example.com", +// "hardwareStatusId": null, +// "hostname": "host1", +// "id": null, +// "serviceProviderId": null, +// "serviceProviderResourceId": null, +// "globalIdentifier": "f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5", +// "hourlyBillingFlag": true, +// "memoryCapacity": 2, +// "operatingSystemReferenceCode": "UBUNTU_LATEST", +// "processorCoreAmount": 2 +// } // -// { -// "accountId": 232298, -// "bareMetalInstanceFlag": null, -// "domain": "example.com", -// "hardwareStatusId": null, -// "hostname": "host1", -// "id": null, -// "serviceProviderId": null, -// "serviceProviderResourceId": null, -// "globalIdentifier": "f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5", -// "hourlyBillingFlag": true, -// "memoryCapacity": 2, -// "operatingSystemReferenceCode": "UBUNTU_LATEST", -// "processorCoreAmount": 2 -// } // func (r Hardware) CreateObject(templateObject *datatypes.Hardware) (resp datatypes.Hardware, err error) { params := []interface{}{ @@ -370,7 +376,6 @@ func (r Hardware) CreateObject(templateObject *datatypes.Hardware) (resp datatyp return } -// // This method will cancel a server effective immediately. For servers billed hourly, the charges will stop immediately after the method returns. func (r Hardware) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "deleteObject", nil, &r.Options, &resp) @@ -414,7 +419,7 @@ func (r Hardware) ExecuteRemoteScript(uri *string) (err error) { return } -// The '''findByIpAddress''' method finds hardware using its primary public or private IP address. IP addresses that have a secondary subnet tied to the hardware will not return the hardware. If no hardware is found, no errors are generated and no data is returned. +// The ”'findByIpAddress”' method finds hardware using its primary public or private IP address. IP addresses that have a secondary subnet tied to the hardware will not return the hardware. If no hardware is found, no errors are generated and no data is returned. func (r Hardware) FindByIpAddress(ipAddress *string) (resp datatypes.Hardware, err error) { params := []interface{}{ ipAddress, @@ -423,13 +428,10 @@ func (r Hardware) FindByIpAddress(ipAddress *string) (resp datatypes.Hardware, e return } -// // Obtain an [[SoftLayer_Container_Product_Order_Hardware_Server (type)|order container]] that can be sent to [[SoftLayer_Product_Order/verifyOrder|verifyOrder]] or [[SoftLayer_Product_Order/placeOrder|placeOrder]]. // -// // This is primarily useful when there is a necessity to confirm the price which will be charged for an order. // -// // See [[SoftLayer_Hardware/createObject|createObject]] for specifics on the requirements of the template object parameter. func (r Hardware) GenerateOrderTemplate(templateObject *datatypes.Hardware) (resp datatypes.Container_Product_Order, err error) { params := []interface{}{ @@ -523,7 +525,7 @@ func (r Hardware) GetAverageDailyPublicBandwidthUsage() (resp datatypes.Float64, return } -// The '''getBackendIncomingBandwidth''' method retrieves the amount of incoming private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. +// The ”'getBackendIncomingBandwidth”' method retrieves the amount of incoming private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware) GetBackendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -539,7 +541,7 @@ func (r Hardware) GetBackendNetworkComponents() (resp []datatypes.Network_Compon return } -// The '''getBackendOutgoingBandwidth''' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. +// The ”'getBackendOutgoingBandwidth”' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware) GetBackendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -621,10 +623,8 @@ func (r Hardware) GetContinuousDataProtectionSoftwareComponent() (resp datatypes return } -// // There are many options that may be provided while ordering a server, this method can be used to determine what these options are. // -// // Detailed information on the return value can be found on the data type page for [[SoftLayer_Container_Hardware_Configuration (type)]]. func (r Hardware) GetCreateObjectOptions() (resp datatypes.Container_Hardware_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getCreateObjectOptions", nil, &r.Options, &resp) @@ -649,7 +649,7 @@ func (r Hardware) GetCurrentBillingTotal() (resp datatypes.Float64, err error) { return } -// The '''getDailyAverage''' method calculates the average daily network traffic used by the selected server. Using the required parameter ''dateTime'' to enter a start and end date, the user retrieves this average, measure in gigabytes (GB) for the specified date range. When entering parameters, only the month, day and year are required - time entries are omitted as this method defaults the time to midnight in order to account for the entire day. +// The ”'getDailyAverage”' method calculates the average daily network traffic used by the selected server. Using the required parameter ”dateTime” to enter a start and end date, the user retrieves this average, measure in gigabytes (GB) for the specified date range. When entering parameters, only the month, day and year are required - time entries are omitted as this method defaults the time to midnight in order to account for the entire day. func (r Hardware) GetDailyAverage(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -755,7 +755,7 @@ func (r Hardware) GetFixedConfigurationPreset() (resp datatypes.Product_Package_ return } -// The '''getFrontendIncomingBandwidth''' method retrieves the amount of incoming public network traffic used by a server between the given start and end date parameters. When entering the ''dateTime'' parameter, only the month, day and year of the start and end dates are required - the time (hour, minute and second) are set to midnight by default and cannot be changed. The amount of bandwidth retrieved is measured in gigabytes (GB). +// The ”'getFrontendIncomingBandwidth”' method retrieves the amount of incoming public network traffic used by a server between the given start and end date parameters. When entering the ”dateTime” parameter, only the month, day and year of the start and end dates are required - the time (hour, minute and second) are set to midnight by default and cannot be changed. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware) GetFrontendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -771,7 +771,7 @@ func (r Hardware) GetFrontendNetworkComponents() (resp []datatypes.Network_Compo return } -// The '''getFrontendOutgoingBandwidth''' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ''dateTime'' parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). +// The ”'getFrontendOutgoingBandwidth”' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ”dateTime” parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware) GetFrontendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -847,7 +847,7 @@ func (r Hardware) GetHostIpsSoftwareComponent() (resp datatypes.Software_Compone return } -// The '''getHourlyBandwidth''' method retrieves all bandwidth updates hourly for the specified hardware. Because the potential number of data points can become excessive, the method limits the user to obtain data in 24-hour intervals. The required ''dateTime'' parameter is used as the starting point for the query and will be calculated for the 24-hour period starting with the specified date and time. For example, entering a parameter of +// The ”'getHourlyBandwidth”' method retrieves all bandwidth updates hourly for the specified hardware. Because the potential number of data points can become excessive, the method limits the user to obtain data in 24-hour intervals. The required ”dateTime” parameter is used as the starting point for the query and will be calculated for the 24-hour period starting with the specified date and time. For example, entering a parameter of // // '02/01/2008 0:00' // @@ -1273,25 +1273,25 @@ func (r Hardware) GetSecurityScanRequests() (resp []datatypes.Network_Security_S return } -// The '''getSensorData''' method retrieves a server's hardware state via its internal sensors. Remote sensor data is transmitted to the SoftLayer API by way of the server's remote management card. Sensor data measures various information, including system temperatures, voltages and other local server settings. Sensor data is cached for 30 second; calls made to this method for the same server within 30 seconds of each other will result in the same data being returned. To ensure that the data retrieved retrieves snapshot of varied data, make calls greater than 30 seconds apart. +// The ”'getSensorData”' method retrieves a server's hardware state via its internal sensors. Remote sensor data is transmitted to the SoftLayer API by way of the server's remote management card. Sensor data measures various information, including system temperatures, voltages and other local server settings. Sensor data is cached for 30 second; calls made to this method for the same server within 30 seconds of each other will result in the same data being returned. To ensure that the data retrieved retrieves snapshot of varied data, make calls greater than 30 seconds apart. func (r Hardware) GetSensorData() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getSensorData", nil, &r.Options, &resp) return } -// The '''getSensorDataWithGraphs''' method retrieves the raw data returned from the server's remote management card. Along with raw data, graphs for the CPU and system temperatures and fan speeds are also returned. For more details on what information is returned, refer to the ''getSensorData'' method. +// The ”'getSensorDataWithGraphs”' method retrieves the raw data returned from the server's remote management card. Along with raw data, graphs for the CPU and system temperatures and fan speeds are also returned. For more details on what information is returned, refer to the ”getSensorData” method. func (r Hardware) GetSensorDataWithGraphs() (resp datatypes.Container_RemoteManagement_SensorReadingsWithGraphs, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getSensorDataWithGraphs", nil, &r.Options, &resp) return } -// The '''getServerFanSpeedGraphs''' method retrieves the server's fan speeds and displays the speeds using tachometer graphs. data used to construct these graphs is retrieved from the server's remote management card. Each graph returned will have an associated title. +// The ”'getServerFanSpeedGraphs”' method retrieves the server's fan speeds and displays the speeds using tachometer graphs. data used to construct these graphs is retrieved from the server's remote management card. Each graph returned will have an associated title. func (r Hardware) GetServerFanSpeedGraphs() (resp []datatypes.Container_RemoteManagement_Graphs_SensorSpeed, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getServerFanSpeedGraphs", nil, &r.Options, &resp) return } -// The '''getPowerState''' method retrieves the power state for the selected server. The server's power status is retrieved from its remote management card. This method returns "on", for a server that has been powered on, or "off" for servers powered off. +// The ”'getPowerState”' method retrieves the power state for the selected server. The server's power status is retrieved from its remote management card. This method returns "on", for a server that has been powered on, or "off" for servers powered off. func (r Hardware) GetServerPowerState() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getServerPowerState", nil, &r.Options, &resp) return @@ -1303,7 +1303,7 @@ func (r Hardware) GetServerRoom() (resp datatypes.Location, err error) { return } -// The '''getServerTemperatureGraphs''' retrieves the server's temperatures and displays the various temperatures using thermometer graphs. Temperatures retrieved are CPU temperature(s) and system temperatures. Data used to construct the graphs is retrieved from the server's remote management card. All graphs returned will have an associated title. +// The ”'getServerTemperatureGraphs”' retrieves the server's temperatures and displays the various temperatures using thermometer graphs. Temperatures retrieved are CPU temperature(s) and system temperatures. Data used to construct the graphs is retrieved from the server's remote management card. All graphs returned will have an associated title. func (r Hardware) GetServerTemperatureGraphs() (resp []datatypes.Container_RemoteManagement_Graphs_SensorTemperature, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getServerTemperatureGraphs", nil, &r.Options, &resp) return @@ -1357,7 +1357,6 @@ func (r Hardware) GetTopLevelLocation() (resp datatypes.Location, err error) { return } -// // This method will query transaction history for a piece of hardware. func (r Hardware) GetTransactionHistory() (resp []datatypes.Provisioning_Version1_Transaction_History, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "getTransactionHistory", nil, &r.Options, &resp) @@ -1442,13 +1441,13 @@ func (r Hardware) GetVirtualizationPlatform() (resp datatypes.Software_Component return } -// The '''importVirtualHost''' method attempts to import the host record for the virtualization platform running on a server. +// The ”'importVirtualHost”' method attempts to import the host record for the virtualization platform running on a server. func (r Hardware) ImportVirtualHost() (resp datatypes.Virtual_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "importVirtualHost", nil, &r.Options, &resp) return } -// The '''isPingable''' method issues a ping command to the selected server and returns the result of the ping command. This boolean return value displays ''true'' upon successful ping or ''false'' for a failed ping. +// The ”'isPingable”' method issues a ping command to the selected server and returns the result of the ping command. This boolean return value displays ”true” upon successful ping or ”false” for a failed ping. func (r Hardware) IsPingable() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "isPingable", nil, &r.Options, &resp) return @@ -1460,11 +1459,9 @@ func (r Hardware) Ping() (resp string, err error) { return } -// The '''powerCycle''' method completes a power off and power on of the server successively in one command. The power cycle command is equivalent to unplugging the server from the power strip and then plugging the server back in. '''This method should only be used when all other options have been exhausted'''. Additional remote management commands may not be executed if this command was successfully issued within the last 20 minutes to avoid server failure. Remote management commands include: +// The ”'powerCycle”' method completes a power off and power on of the server successively in one command. The power cycle command is equivalent to unplugging the server from the power strip and then plugging the server back in. ”'This method should only be used when all other options have been exhausted”'. Additional remote management commands may not be executed if this command was successfully issued within the last 20 minutes to avoid server failure. Remote management commands include: // // rebootSoft rebootHard powerOn powerOff powerCycle -// -// func (r Hardware) PowerCycle() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "powerCycle", nil, &r.Options, &resp) return @@ -1476,43 +1473,35 @@ func (r Hardware) PowerOff() (resp bool, err error) { return } -// The '''powerOn''' method powers on a server via its remote management card. This boolean return value returns ''true'' upon successful execution and ''false'' if unsuccessful. Other remote management commands may not be issued in this command was successfully completed within the last 20 minutes to avoid server failure. Remote management commands include: +// The ”'powerOn”' method powers on a server via its remote management card. This boolean return value returns ”true” upon successful execution and ”false” if unsuccessful. Other remote management commands may not be issued in this command was successfully completed within the last 20 minutes to avoid server failure. Remote management commands include: // // rebootSoft rebootHard powerOn powerOff powerCycle -// -// func (r Hardware) PowerOn() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "powerOn", nil, &r.Options, &resp) return } -// The '''rebootDefault''' method attempts to reboot the server by issuing a soft reboot, or reset, command to the server's remote management card. if the reset attempt is unsuccessful, a power cycle command will be issued via the power strip. The power cycle command is equivalent to unplugging the server from the power strip and then plugging the server back in. If the reset was successful within the last 20 minutes, another remote management command cannot be completed to avoid server failure. Remote management commands include: +// The ”'rebootDefault”' method attempts to reboot the server by issuing a soft reboot, or reset, command to the server's remote management card. if the reset attempt is unsuccessful, a power cycle command will be issued via the power strip. The power cycle command is equivalent to unplugging the server from the power strip and then plugging the server back in. If the reset was successful within the last 20 minutes, another remote management command cannot be completed to avoid server failure. Remote management commands include: // // rebootSoft rebootHard powerOn powerOff powerCycle -// -// func (r Hardware) RebootDefault() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "rebootDefault", nil, &r.Options, &resp) return } -// The '''rebootHard''' method reboots the server by issuing a cycle command to the server's remote management card. A hard reboot is equivalent to pressing the ''Reset'' button on a server - it is issued immediately and will not allow processes to shut down prior to the reboot. Completing a hard reboot may initiate system disk checks upon server reboot, causing the boot up to take longer than normally expected. +// The ”'rebootHard”' method reboots the server by issuing a cycle command to the server's remote management card. A hard reboot is equivalent to pressing the ”Reset” button on a server - it is issued immediately and will not allow processes to shut down prior to the reboot. Completing a hard reboot may initiate system disk checks upon server reboot, causing the boot up to take longer than normally expected. // // Remote management commands are unable to be executed if a reboot has been issued successfully within the last 20 minutes to avoid server failure. Remote management commands include: // // rebootSoft rebootHard powerOn powerOff powerCycle -// -// func (r Hardware) RebootHard() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "rebootHard", nil, &r.Options, &resp) return } -// The '''rebootSoft''' method reboots the server by issuing a reset command to the server's remote management card via soft reboot. When executing a soft reboot, servers allow all processes to shut down completely before rebooting. Remote management commands are unable to be issued within 20 minutes of issuing a successful soft reboot in order to avoid server failure. Remote management commands include: +// The ”'rebootSoft”' method reboots the server by issuing a reset command to the server's remote management card via soft reboot. When executing a soft reboot, servers allow all processes to shut down completely before rebooting. Remote management commands are unable to be issued within 20 minutes of issuing a successful soft reboot in order to avoid server failure. Remote management commands include: // // rebootSoft rebootHard powerOn powerOff powerCycle -// -// func (r Hardware) RebootSoft() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware", "rebootSoft", nil, &r.Options, &resp) return @@ -1937,7 +1926,7 @@ func (r Hardware_Component_Partition_OperatingSystem) GetAllObjects() (resp []da return } -// The '''getByDescription''' method retrieves all possible partition templates based on the description (required parameter) entered when calling the method. The description is typically the operating system's name. Current recognized values include 'linux', 'windows', 'freebsd', and 'Debian'. +// The ”'getByDescription”' method retrieves all possible partition templates based on the description (required parameter) entered when calling the method. The description is typically the operating system's name. Current recognized values include 'linux', 'windows', 'freebsd', and 'Debian'. func (r Hardware_Component_Partition_OperatingSystem) GetByDescription(description *string) (resp datatypes.Hardware_Component_Partition_OperatingSystem, err error) { params := []interface{}{ description, @@ -2101,271 +2090,277 @@ func (r Hardware_Router) CaptureImage(captureTemplate *datatypes.Container_Disk_ return } -// // // createObject() enables the creation of servers on an account. This // method is a simplified alternative to interacting with the ordering system directly. // -// // In order to create a server, a template object must be sent in with a few required // values. // -// // When this method returns an order will have been placed for a server of the specified configuration. // -// // To determine when the server is available you can poll the server via [[SoftLayer_Hardware/getObject|getObject]], // checking the provisionDate property. // When provisionDate is not null, the server will be ready. Be sure to use the globalIdentifier // as your initialization parameter. // -// // Warning: Servers created via this method will incur charges on your account. For testing input parameters see [[SoftLayer_Hardware/generateOrderTemplate|generateOrderTemplate]]. // -// // Input - [[SoftLayer_Hardware (type)|SoftLayer_Hardware]] // // +//
  • hostname +//
    Hostname for the server.
    +//
    +//
  • +//
  • domain +//
    Domain for the server.
    +//
    +//
  • +//
  • processorCoreAmount +//
    The number of logical CPU cores to allocate.
    +//
    +//
  • +//
  • memoryCapacity +//
    The amount of memory to allocate in gigabytes.
    +//
    +//
  • +//
  • hourlyBillingFlag +//
    Specifies the billing type for the server.
    +//
    +//
  • +//
  • operatingSystemReferenceCode +//
    An identifier for the operating system to provision the server with.
    +//
    +//
  • +//
  • datacenter.name +//
    Specifies which datacenter the server is to be provisioned in.
    +// { +// "datacenter": { +// "name": "dal05" +// } +// } +// +//
    +//
  • +//
  • networkComponents.maxSpeed +//
    Specifies the connection speed for the server's network components.
    +// { +// "networkComponents": [ +// { +// "maxSpeed": 1000 +// } +// ] +// } +// +//
    +//
  • +//
  • networkComponents.redundancyEnabledFlag +//
    Specifies whether or not the server's network components should be in redundancy groups.
    +// { +// "networkComponents": [ +// { +// "redundancyEnabledFlag": false +// } +// ] +// } +// +//
    +//
  • +//
  • privateNetworkOnlyFlag +//
    Specifies whether or not the server only has access to the private network
    +//
    +//
  • +//
  • primaryNetworkComponent.networkVlan.id +//
    Specifies the network vlan which is to be used for the frontend interface of the server.
    +// { +// "primaryNetworkComponent": { +// "networkVlan": { +// "id": 1 +// } +// } +// } +// +//
    +//
  • +//
  • primaryBackendNetworkComponent.networkVlan.id +//
    Specifies the network vlan which is to be used for the backend interface of the server.
    +// { +// "primaryBackendNetworkComponent": { +// "networkVlan": { +// "id": 2 +// } +// } +// } +// +//
    +//
  • +//
  • fixedConfigurationPreset.keyName +//
    +// { +// "fixedConfigurationPreset": { +// "keyName": "SOME_KEY_NAME" +// } +// } +// +//
    +//
  • +//
  • userData.value +//
    Arbitrary data to be made available to the server.
    +// { +// "userData": [ +// { +// "value": "someValue" +// } +// ] +// } +// +//
    +//
  • +//
  • hardDrives +//
    Hard drive settings for the server
    +// { +// "hardDrives": [ +// { +// "capacity": 500 +// } +// ] +// } +// +//
    +//
  • +//
  • sshKeys +//
    SSH keys to install on the server upon provisioning.
    +// { +// "sshKeys": [ +// { +// "id": 123 +// } +// ] +// } +// +//
    +//
  • +//
  • postInstallScriptUri +//
    Specifies the uri location of the script to be downloaded and run after installation is complete.
    +//
    +//
  • +// +// // //

    REST Example

    -// curl -X POST -d '{ -// "parameters":[ -// { -// "hostname": "host1", -// "domain": "example.com", -// "processorCoreAmount": 2, -// "memoryCapacity": 2, -// "hourlyBillingFlag": true, -// "operatingSystemReferenceCode": "UBUNTU_LATEST" -// } -// ] -// }' https://api.softlayer.com/rest/v3/SoftLayer_Hardware.json +// +// curl -X POST -d '{ +// "parameters":[ +// { +// "hostname": "host1", +// "domain": "example.com", +// "processorCoreAmount": 2, +// "memoryCapacity": 2, +// "hourlyBillingFlag": true, +// "operatingSystemReferenceCode": "UBUNTU_LATEST" +// } +// ] +// }' https://api.softlayer.com/rest/v3/SoftLayer_Hardware.json +// // // HTTP/1.1 201 Created // Location: https://api.softlayer.com/rest/v3/SoftLayer_Hardware/f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5/getObject // +// { +// "accountId": 232298, +// "bareMetalInstanceFlag": null, +// "domain": "example.com", +// "hardwareStatusId": null, +// "hostname": "host1", +// "id": null, +// "serviceProviderId": null, +// "serviceProviderResourceId": null, +// "globalIdentifier": "f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5", +// "hourlyBillingFlag": true, +// "memoryCapacity": 2, +// "operatingSystemReferenceCode": "UBUNTU_LATEST", +// "processorCoreAmount": 2 +// } // -// { -// "accountId": 232298, -// "bareMetalInstanceFlag": null, -// "domain": "example.com", -// "hardwareStatusId": null, -// "hostname": "host1", -// "id": null, -// "serviceProviderId": null, -// "serviceProviderResourceId": null, -// "globalIdentifier": "f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5", -// "hourlyBillingFlag": true, -// "memoryCapacity": 2, -// "operatingSystemReferenceCode": "UBUNTU_LATEST", -// "processorCoreAmount": 2 -// } // func (r Hardware_Router) CreateObject(templateObject *datatypes.Hardware) (resp datatypes.Hardware, err error) { params := []interface{}{ @@ -2375,7 +2370,6 @@ func (r Hardware_Router) CreateObject(templateObject *datatypes.Hardware) (resp return } -// // This method will cancel a server effective immediately. For servers billed hourly, the charges will stop immediately after the method returns. func (r Hardware_Router) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "deleteObject", nil, &r.Options, &resp) @@ -2419,7 +2413,7 @@ func (r Hardware_Router) ExecuteRemoteScript(uri *string) (err error) { return } -// The '''findByIpAddress''' method finds hardware using its primary public or private IP address. IP addresses that have a secondary subnet tied to the hardware will not return the hardware. If no hardware is found, no errors are generated and no data is returned. +// The ”'findByIpAddress”' method finds hardware using its primary public or private IP address. IP addresses that have a secondary subnet tied to the hardware will not return the hardware. If no hardware is found, no errors are generated and no data is returned. func (r Hardware_Router) FindByIpAddress(ipAddress *string) (resp datatypes.Hardware, err error) { params := []interface{}{ ipAddress, @@ -2428,13 +2422,10 @@ func (r Hardware_Router) FindByIpAddress(ipAddress *string) (resp datatypes.Hard return } -// // Obtain an [[SoftLayer_Container_Product_Order_Hardware_Server (type)|order container]] that can be sent to [[SoftLayer_Product_Order/verifyOrder|verifyOrder]] or [[SoftLayer_Product_Order/placeOrder|placeOrder]]. // -// // This is primarily useful when there is a necessity to confirm the price which will be charged for an order. // -// // See [[SoftLayer_Hardware/createObject|createObject]] for specifics on the requirements of the template object parameter. func (r Hardware_Router) GenerateOrderTemplate(templateObject *datatypes.Hardware) (resp datatypes.Container_Product_Order, err error) { params := []interface{}{ @@ -2528,7 +2519,7 @@ func (r Hardware_Router) GetAverageDailyPublicBandwidthUsage() (resp datatypes.F return } -// The '''getBackendIncomingBandwidth''' method retrieves the amount of incoming private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. +// The ”'getBackendIncomingBandwidth”' method retrieves the amount of incoming private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_Router) GetBackendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -2544,7 +2535,7 @@ func (r Hardware_Router) GetBackendNetworkComponents() (resp []datatypes.Network return } -// The '''getBackendOutgoingBandwidth''' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. +// The ”'getBackendOutgoingBandwidth”' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_Router) GetBackendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -2632,10 +2623,8 @@ func (r Hardware_Router) GetContinuousDataProtectionSoftwareComponent() (resp da return } -// // There are many options that may be provided while ordering a server, this method can be used to determine what these options are. // -// // Detailed information on the return value can be found on the data type page for [[SoftLayer_Container_Hardware_Configuration (type)]]. func (r Hardware_Router) GetCreateObjectOptions() (resp datatypes.Container_Hardware_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getCreateObjectOptions", nil, &r.Options, &resp) @@ -2660,7 +2649,7 @@ func (r Hardware_Router) GetCurrentBillingTotal() (resp datatypes.Float64, err e return } -// The '''getDailyAverage''' method calculates the average daily network traffic used by the selected server. Using the required parameter ''dateTime'' to enter a start and end date, the user retrieves this average, measure in gigabytes (GB) for the specified date range. When entering parameters, only the month, day and year are required - time entries are omitted as this method defaults the time to midnight in order to account for the entire day. +// The ”'getDailyAverage”' method calculates the average daily network traffic used by the selected server. Using the required parameter ”dateTime” to enter a start and end date, the user retrieves this average, measure in gigabytes (GB) for the specified date range. When entering parameters, only the month, day and year are required - time entries are omitted as this method defaults the time to midnight in order to account for the entire day. func (r Hardware_Router) GetDailyAverage(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -2766,7 +2755,7 @@ func (r Hardware_Router) GetFixedConfigurationPreset() (resp datatypes.Product_P return } -// The '''getFrontendIncomingBandwidth''' method retrieves the amount of incoming public network traffic used by a server between the given start and end date parameters. When entering the ''dateTime'' parameter, only the month, day and year of the start and end dates are required - the time (hour, minute and second) are set to midnight by default and cannot be changed. The amount of bandwidth retrieved is measured in gigabytes (GB). +// The ”'getFrontendIncomingBandwidth”' method retrieves the amount of incoming public network traffic used by a server between the given start and end date parameters. When entering the ”dateTime” parameter, only the month, day and year of the start and end dates are required - the time (hour, minute and second) are set to midnight by default and cannot be changed. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_Router) GetFrontendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -2782,7 +2771,7 @@ func (r Hardware_Router) GetFrontendNetworkComponents() (resp []datatypes.Networ return } -// The '''getFrontendOutgoingBandwidth''' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ''dateTime'' parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). +// The ”'getFrontendOutgoingBandwidth”' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ”dateTime” parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_Router) GetFrontendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -2858,7 +2847,7 @@ func (r Hardware_Router) GetHostIpsSoftwareComponent() (resp datatypes.Software_ return } -// The '''getHourlyBandwidth''' method retrieves all bandwidth updates hourly for the specified hardware. Because the potential number of data points can become excessive, the method limits the user to obtain data in 24-hour intervals. The required ''dateTime'' parameter is used as the starting point for the query and will be calculated for the 24-hour period starting with the specified date and time. For example, entering a parameter of +// The ”'getHourlyBandwidth”' method retrieves all bandwidth updates hourly for the specified hardware. Because the potential number of data points can become excessive, the method limits the user to obtain data in 24-hour intervals. The required ”dateTime” parameter is used as the starting point for the query and will be calculated for the 24-hour period starting with the specified date and time. For example, entering a parameter of // // '02/01/2008 0:00' // @@ -3296,25 +3285,25 @@ func (r Hardware_Router) GetSecurityScanRequests() (resp []datatypes.Network_Sec return } -// The '''getSensorData''' method retrieves a server's hardware state via its internal sensors. Remote sensor data is transmitted to the SoftLayer API by way of the server's remote management card. Sensor data measures various information, including system temperatures, voltages and other local server settings. Sensor data is cached for 30 second; calls made to this method for the same server within 30 seconds of each other will result in the same data being returned. To ensure that the data retrieved retrieves snapshot of varied data, make calls greater than 30 seconds apart. +// The ”'getSensorData”' method retrieves a server's hardware state via its internal sensors. Remote sensor data is transmitted to the SoftLayer API by way of the server's remote management card. Sensor data measures various information, including system temperatures, voltages and other local server settings. Sensor data is cached for 30 second; calls made to this method for the same server within 30 seconds of each other will result in the same data being returned. To ensure that the data retrieved retrieves snapshot of varied data, make calls greater than 30 seconds apart. func (r Hardware_Router) GetSensorData() (resp []datatypes.Container_RemoteManagement_SensorReading, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSensorData", nil, &r.Options, &resp) return } -// The '''getSensorDataWithGraphs''' method retrieves the raw data returned from the server's remote management card. Along with raw data, graphs for the CPU and system temperatures and fan speeds are also returned. For more details on what information is returned, refer to the ''getSensorData'' method. +// The ”'getSensorDataWithGraphs”' method retrieves the raw data returned from the server's remote management card. Along with raw data, graphs for the CPU and system temperatures and fan speeds are also returned. For more details on what information is returned, refer to the ”getSensorData” method. func (r Hardware_Router) GetSensorDataWithGraphs() (resp datatypes.Container_RemoteManagement_SensorReadingsWithGraphs, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getSensorDataWithGraphs", nil, &r.Options, &resp) return } -// The '''getServerFanSpeedGraphs''' method retrieves the server's fan speeds and displays the speeds using tachometer graphs. data used to construct these graphs is retrieved from the server's remote management card. Each graph returned will have an associated title. +// The ”'getServerFanSpeedGraphs”' method retrieves the server's fan speeds and displays the speeds using tachometer graphs. data used to construct these graphs is retrieved from the server's remote management card. Each graph returned will have an associated title. func (r Hardware_Router) GetServerFanSpeedGraphs() (resp []datatypes.Container_RemoteManagement_Graphs_SensorSpeed, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getServerFanSpeedGraphs", nil, &r.Options, &resp) return } -// The '''getPowerState''' method retrieves the power state for the selected server. The server's power status is retrieved from its remote management card. This method returns "on", for a server that has been powered on, or "off" for servers powered off. +// The ”'getPowerState”' method retrieves the power state for the selected server. The server's power status is retrieved from its remote management card. This method returns "on", for a server that has been powered on, or "off" for servers powered off. func (r Hardware_Router) GetServerPowerState() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getServerPowerState", nil, &r.Options, &resp) return @@ -3326,7 +3315,7 @@ func (r Hardware_Router) GetServerRoom() (resp datatypes.Location, err error) { return } -// The '''getServerTemperatureGraphs''' retrieves the server's temperatures and displays the various temperatures using thermometer graphs. Temperatures retrieved are CPU temperature(s) and system temperatures. Data used to construct the graphs is retrieved from the server's remote management card. All graphs returned will have an associated title. +// The ”'getServerTemperatureGraphs”' retrieves the server's temperatures and displays the various temperatures using thermometer graphs. Temperatures retrieved are CPU temperature(s) and system temperatures. Data used to construct the graphs is retrieved from the server's remote management card. All graphs returned will have an associated title. func (r Hardware_Router) GetServerTemperatureGraphs() (resp []datatypes.Container_RemoteManagement_Graphs_SensorTemperature, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getServerTemperatureGraphs", nil, &r.Options, &resp) return @@ -3380,7 +3369,6 @@ func (r Hardware_Router) GetTopLevelLocation() (resp datatypes.Location, err err return } -// // This method will query transaction history for a piece of hardware. func (r Hardware_Router) GetTransactionHistory() (resp []datatypes.Provisioning_Version1_Transaction_History, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getTransactionHistory", nil, &r.Options, &resp) @@ -3465,13 +3453,13 @@ func (r Hardware_Router) GetVirtualizationPlatform() (resp datatypes.Software_Co return } -// The '''importVirtualHost''' method attempts to import the host record for the virtualization platform running on a server. +// The ”'importVirtualHost”' method attempts to import the host record for the virtualization platform running on a server. func (r Hardware_Router) ImportVirtualHost() (resp datatypes.Virtual_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "importVirtualHost", nil, &r.Options, &resp) return } -// The '''isPingable''' method issues a ping command to the selected server and returns the result of the ping command. This boolean return value displays ''true'' upon successful ping or ''false'' for a failed ping. +// The ”'isPingable”' method issues a ping command to the selected server and returns the result of the ping command. This boolean return value displays ”true” upon successful ping or ”false” for a failed ping. func (r Hardware_Router) IsPingable() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "isPingable", nil, &r.Options, &resp) return @@ -3483,11 +3471,9 @@ func (r Hardware_Router) Ping() (resp string, err error) { return } -// The '''powerCycle''' method completes a power off and power on of the server successively in one command. The power cycle command is equivalent to unplugging the server from the power strip and then plugging the server back in. '''This method should only be used when all other options have been exhausted'''. Additional remote management commands may not be executed if this command was successfully issued within the last 20 minutes to avoid server failure. Remote management commands include: +// The ”'powerCycle”' method completes a power off and power on of the server successively in one command. The power cycle command is equivalent to unplugging the server from the power strip and then plugging the server back in. ”'This method should only be used when all other options have been exhausted”'. Additional remote management commands may not be executed if this command was successfully issued within the last 20 minutes to avoid server failure. Remote management commands include: // // rebootSoft rebootHard powerOn powerOff powerCycle -// -// func (r Hardware_Router) PowerCycle() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "powerCycle", nil, &r.Options, &resp) return @@ -3499,43 +3485,35 @@ func (r Hardware_Router) PowerOff() (resp bool, err error) { return } -// The '''powerOn''' method powers on a server via its remote management card. This boolean return value returns ''true'' upon successful execution and ''false'' if unsuccessful. Other remote management commands may not be issued in this command was successfully completed within the last 20 minutes to avoid server failure. Remote management commands include: +// The ”'powerOn”' method powers on a server via its remote management card. This boolean return value returns ”true” upon successful execution and ”false” if unsuccessful. Other remote management commands may not be issued in this command was successfully completed within the last 20 minutes to avoid server failure. Remote management commands include: // // rebootSoft rebootHard powerOn powerOff powerCycle -// -// func (r Hardware_Router) PowerOn() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "powerOn", nil, &r.Options, &resp) return } -// The '''rebootDefault''' method attempts to reboot the server by issuing a soft reboot, or reset, command to the server's remote management card. if the reset attempt is unsuccessful, a power cycle command will be issued via the power strip. The power cycle command is equivalent to unplugging the server from the power strip and then plugging the server back in. If the reset was successful within the last 20 minutes, another remote management command cannot be completed to avoid server failure. Remote management commands include: +// The ”'rebootDefault”' method attempts to reboot the server by issuing a soft reboot, or reset, command to the server's remote management card. if the reset attempt is unsuccessful, a power cycle command will be issued via the power strip. The power cycle command is equivalent to unplugging the server from the power strip and then plugging the server back in. If the reset was successful within the last 20 minutes, another remote management command cannot be completed to avoid server failure. Remote management commands include: // // rebootSoft rebootHard powerOn powerOff powerCycle -// -// func (r Hardware_Router) RebootDefault() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "rebootDefault", nil, &r.Options, &resp) return } -// The '''rebootHard''' method reboots the server by issuing a cycle command to the server's remote management card. A hard reboot is equivalent to pressing the ''Reset'' button on a server - it is issued immediately and will not allow processes to shut down prior to the reboot. Completing a hard reboot may initiate system disk checks upon server reboot, causing the boot up to take longer than normally expected. +// The ”'rebootHard”' method reboots the server by issuing a cycle command to the server's remote management card. A hard reboot is equivalent to pressing the ”Reset” button on a server - it is issued immediately and will not allow processes to shut down prior to the reboot. Completing a hard reboot may initiate system disk checks upon server reboot, causing the boot up to take longer than normally expected. // // Remote management commands are unable to be executed if a reboot has been issued successfully within the last 20 minutes to avoid server failure. Remote management commands include: // // rebootSoft rebootHard powerOn powerOff powerCycle -// -// func (r Hardware_Router) RebootHard() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "rebootHard", nil, &r.Options, &resp) return } -// The '''rebootSoft''' method reboots the server by issuing a reset command to the server's remote management card via soft reboot. When executing a soft reboot, servers allow all processes to shut down completely before rebooting. Remote management commands are unable to be issued within 20 minutes of issuing a successful soft reboot in order to avoid server failure. Remote management commands include: +// The ”'rebootSoft”' method reboots the server by issuing a reset command to the server's remote management card via soft reboot. When executing a soft reboot, servers allow all processes to shut down completely before rebooting. Remote management commands are unable to be issued within 20 minutes of issuing a successful soft reboot in order to avoid server failure. Remote management commands include: // // rebootSoft rebootHard powerOn powerOff powerCycle -// -// func (r Hardware_Router) RebootSoft() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Router", "rebootSoft", nil, &r.Options, &resp) return @@ -3726,271 +3704,277 @@ func (r Hardware_SecurityModule) CreateHyperThreadingUpdateTransaction(disableHy return } -// // // createObject() enables the creation of servers on an account. This // method is a simplified alternative to interacting with the ordering system directly. // -// // In order to create a server, a template object must be sent in with a few required // values. // -// // When this method returns an order will have been placed for a server of the specified configuration. // -// // To determine when the server is available you can poll the server via [[SoftLayer_Hardware/getObject|getObject]], // checking the provisionDate property. // When provisionDate is not null, the server will be ready. Be sure to use the globalIdentifier // as your initialization parameter. // -// // Warning: Servers created via this method will incur charges on your account. For testing input parameters see [[SoftLayer_Hardware/generateOrderTemplate|generateOrderTemplate]]. // -// // Input - [[SoftLayer_Hardware (type)|SoftLayer_Hardware]] // // +//
  • hostname +//
    Hostname for the server.
      +//
    • Required
    • +//
    • Type - string
    • +//
    +//
    +//
  • +//
  • domain +//
    Domain for the server.
      +//
    • Required
    • +//
    • Type - string
    • +//
    +//
    +//
  • +//
  • processorCoreAmount +//
    The number of logical CPU cores to allocate.
      +//
    • Required
    • +//
    • Type - int
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +//
    +//
  • +//
  • memoryCapacity +//
    The amount of memory to allocate in gigabytes.
      +//
    • Required
    • +//
    • Type - int
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +//
    +//
  • +//
  • hourlyBillingFlag +//
    Specifies the billing type for the server.
      +//
    • Required
    • +//
    • Type - boolean
    • +//
    • When true the server will be billed on hourly usage, otherwise it will be billed on a monthly basis.
    • +//
    +//
    +//
  • +//
  • operatingSystemReferenceCode +//
    An identifier for the operating system to provision the server with.
      +//
    • Required
    • +//
    • Type - string
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +//
    +//
  • +//
  • datacenter.name +//
    Specifies which datacenter the server is to be provisioned in.
      +//
    • Required
    • +//
    • Type - string
    • +//
    • The datacenter property is a [[SoftLayer_Location (type)|location]] structure with the name field set.
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +// { +// "datacenter": { +// "name": "dal05" +// } +// } +// +//
    +//
  • +//
  • networkComponents.maxSpeed +//
    Specifies the connection speed for the server's network components.
      +//
    • Optional
    • +//
    • Type - int
    • +//
    • Default - The highest available zero cost port speed will be used.
    • +//
    • Description - The networkComponents property is an array with a single [[SoftLayer_Network_Component (type)|network component]] structure. The maxSpeed property must be set to specify the network uplink speed, in megabits per second, of the server.
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +// { +// "networkComponents": [ +// { +// "maxSpeed": 1000 +// } +// ] +// } +// +//
    +//
  • +//
  • networkComponents.redundancyEnabledFlag +//
    Specifies whether or not the server's network components should be in redundancy groups.
      +//
    • Optional
    • +//
    • Type - bool
    • +//
    • Default - false
    • +//
    • Description - The networkComponents property is an array with a single [[SoftLayer_Network_Component (type)|network component]] structure. When the redundancyEnabledFlag property is true the server's network components will be in redundancy groups.
    • +//
    +// { +// "networkComponents": [ +// { +// "redundancyEnabledFlag": false +// } +// ] +// } +// +//
    +//
  • +//
  • privateNetworkOnlyFlag +//
    Specifies whether or not the server only has access to the private network
      +//
    • Optional
    • +//
    • Type - boolean
    • +//
    • Default - false
    • +//
    • When true this flag specifies that a server is to only have access to the private network.
    • +//
    +//
    +//
  • +//
  • primaryNetworkComponent.networkVlan.id +//
    Specifies the network vlan which is to be used for the frontend interface of the server.
      +//
    • Optional
    • +//
    • Type - int
    • +//
    • Description - The primaryNetworkComponent property is a [[SoftLayer_Network_Component (type)|network component]] structure with the networkVlan property populated with a [[SoftLayer_Network_Vlan (type)|vlan]] structure. The id property must be set to specify the frontend network vlan of the server.
    • +//
    +// { +// "primaryNetworkComponent": { +// "networkVlan": { +// "id": 1 +// } +// } +// } +// +//
    +//
  • +//
  • primaryBackendNetworkComponent.networkVlan.id +//
    Specifies the network vlan which is to be used for the backend interface of the server.
      +//
    • Optional
    • +//
    • Type - int
    • +//
    • Description - The primaryBackendNetworkComponent property is a [[SoftLayer_Network_Component (type)|network component]] structure with the networkVlan property populated with a [[SoftLayer_Network_Vlan (type)|vlan]] structure. The id property must be set to specify the backend network vlan of the server.
    • +//
    +// { +// "primaryBackendNetworkComponent": { +// "networkVlan": { +// "id": 2 +// } +// } +// } +// +//
    +//
  • +//
  • fixedConfigurationPreset.keyName +//
      +//
    • Optional
    • +//
    • Type - string
    • +//
    • Description - The fixedConfigurationPreset property is a [[SoftLayer_Product_Package_Preset (type)|fixed configuration preset]] structure. The keyName property must be set to specify preset to use.
    • +//
    • If a fixed configuration preset is used processorCoreAmount, memoryCapacity and hardDrives properties must not be set.
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +// { +// "fixedConfigurationPreset": { +// "keyName": "SOME_KEY_NAME" +// } +// } +// +//
    +//
  • +//
  • userData.value +//
    Arbitrary data to be made available to the server.
      +//
    • Optional
    • +//
    • Type - string
    • +//
    • Description - The userData property is an array with a single [[SoftLayer_Hardware_Attribute (type)|attribute]] structure with the value property set to an arbitrary value.
    • +//
    • This value can be retrieved via the [[SoftLayer_Resource_Metadata/getUserMetadata|getUserMetadata]] method from a request originating from the server. This is primarily useful for providing data to software that may be on the server and configured to execute upon first boot.
    • +//
    +// { +// "userData": [ +// { +// "value": "someValue" +// } +// ] +// } +// +//
    +//
  • +//
  • hardDrives +//
    Hard drive settings for the server
      +//
    • Optional
    • +//
    • Type - SoftLayer_Hardware_Component
    • +//
    • Default - The largest available capacity for a zero cost primary disk will be used.
    • +//
    • Description - The hardDrives property is an array of [[SoftLayer_Hardware_Component (type)|hardware component]] structures. +//
    • Each hard drive must specify the capacity property.
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +// { +// "hardDrives": [ +// { +// "capacity": 500 +// } +// ] +// } +// +//
    +//
  • +//
  • sshKeys +//
    SSH keys to install on the server upon provisioning.
      +//
    • Optional
    • +//
    • Type - array of [[SoftLayer_Security_Ssh_Key (type)|SoftLayer_Security_Ssh_Key]]
    • +//
    • Description - The sshKeys property is an array of [[SoftLayer_Security_Ssh_Key (type)|SSH Key]] structures with the id property set to the value of an existing SSH key.
    • +//
    • To create a new SSH key, call [[SoftLayer_Security_Ssh_Key/createObject|createObject]] on the [[SoftLayer_Security_Ssh_Key]] service.
    • +//
    • To obtain a list of existing SSH keys, call [[SoftLayer_Account/getSshKeys|getSshKeys]] on the [[SoftLayer_Account]] service. +//
    +// { +// "sshKeys": [ +// { +// "id": 123 +// } +// ] +// } +// +//
    +//
  • +//
  • postInstallScriptUri +//
    Specifies the uri location of the script to be downloaded and run after installation is complete.
      +//
    • Optional
    • +//
    • Type - string
    • +//
    +//
    +//
  • +// +// // //

    REST Example

    -// curl -X POST -d '{ -// "parameters":[ -// { -// "hostname": "host1", -// "domain": "example.com", -// "processorCoreAmount": 2, -// "memoryCapacity": 2, -// "hourlyBillingFlag": true, -// "operatingSystemReferenceCode": "UBUNTU_LATEST" -// } -// ] -// }' https://api.softlayer.com/rest/v3/SoftLayer_Hardware.json +// +// curl -X POST -d '{ +// "parameters":[ +// { +// "hostname": "host1", +// "domain": "example.com", +// "processorCoreAmount": 2, +// "memoryCapacity": 2, +// "hourlyBillingFlag": true, +// "operatingSystemReferenceCode": "UBUNTU_LATEST" +// } +// ] +// }' https://api.softlayer.com/rest/v3/SoftLayer_Hardware.json +// // // HTTP/1.1 201 Created // Location: https://api.softlayer.com/rest/v3/SoftLayer_Hardware/f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5/getObject // +// { +// "accountId": 232298, +// "bareMetalInstanceFlag": null, +// "domain": "example.com", +// "hardwareStatusId": null, +// "hostname": "host1", +// "id": null, +// "serviceProviderId": null, +// "serviceProviderResourceId": null, +// "globalIdentifier": "f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5", +// "hourlyBillingFlag": true, +// "memoryCapacity": 2, +// "operatingSystemReferenceCode": "UBUNTU_LATEST", +// "processorCoreAmount": 2 +// } // -// { -// "accountId": 232298, -// "bareMetalInstanceFlag": null, -// "domain": "example.com", -// "hardwareStatusId": null, -// "hostname": "host1", -// "id": null, -// "serviceProviderId": null, -// "serviceProviderResourceId": null, -// "globalIdentifier": "f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5", -// "hourlyBillingFlag": true, -// "memoryCapacity": 2, -// "operatingSystemReferenceCode": "UBUNTU_LATEST", -// "processorCoreAmount": 2 -// } // func (r Hardware_SecurityModule) CreateObject(templateObject *datatypes.Hardware_SecurityModule) (resp datatypes.Hardware_SecurityModule, err error) { params := []interface{}{ @@ -4010,7 +3994,6 @@ func (r Hardware_SecurityModule) CreatePostSoftwareInstallTransaction(installCod return } -// // This method will cancel a server effective immediately. For servers billed hourly, the charges will stop immediately after the method returns. func (r Hardware_SecurityModule) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "deleteObject", nil, &r.Options, &resp) @@ -4063,7 +4046,7 @@ func (r Hardware_SecurityModule) ExecuteRemoteScript(uri *string) (err error) { return } -// The '''findByIpAddress''' method finds hardware using its primary public or private IP address. IP addresses that have a secondary subnet tied to the hardware will not return the hardware. If no hardware is found, no errors are generated and no data is returned. +// The ”'findByIpAddress”' method finds hardware using its primary public or private IP address. IP addresses that have a secondary subnet tied to the hardware will not return the hardware. If no hardware is found, no errors are generated and no data is returned. func (r Hardware_SecurityModule) FindByIpAddress(ipAddress *string) (resp datatypes.Hardware, err error) { params := []interface{}{ ipAddress, @@ -4072,13 +4055,10 @@ func (r Hardware_SecurityModule) FindByIpAddress(ipAddress *string) (resp dataty return } -// // Obtain an [[SoftLayer_Container_Product_Order_Hardware_Server (type)|order container]] that can be sent to [[SoftLayer_Product_Order/verifyOrder|verifyOrder]] or [[SoftLayer_Product_Order/placeOrder|placeOrder]]. // -// // This is primarily useful when there is a necessity to confirm the price which will be charged for an order. // -// // See [[SoftLayer_Hardware/createObject|createObject]] for specifics on the requirements of the template object parameter. func (r Hardware_SecurityModule) GenerateOrderTemplate(templateObject *datatypes.Hardware) (resp datatypes.Container_Product_Order, err error) { params := []interface{}{ @@ -4237,7 +4217,7 @@ func (r Hardware_SecurityModule) GetBackendBandwidthUse(startDate *datatypes.Tim return } -// The '''getBackendIncomingBandwidth''' method retrieves the amount of incoming private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. +// The ”'getBackendIncomingBandwidth”' method retrieves the amount of incoming private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_SecurityModule) GetBackendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -4253,7 +4233,7 @@ func (r Hardware_SecurityModule) GetBackendNetworkComponents() (resp []datatypes return } -// The '''getBackendOutgoingBandwidth''' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. +// The ”'getBackendOutgoingBandwidth”' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_SecurityModule) GetBackendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -4412,10 +4392,8 @@ func (r Hardware_SecurityModule) GetCost() (resp datatypes.Float64, err error) { return } -// // There are many options that may be provided while ordering a server, this method can be used to determine what these options are. // -// // Detailed information on the return value can be found on the data type page for [[SoftLayer_Container_Hardware_Configuration (type)]]. func (r Hardware_SecurityModule) GetCreateObjectOptions() (resp datatypes.Container_Hardware_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getCreateObjectOptions", nil, &r.Options, &resp) @@ -4473,7 +4451,7 @@ func (r Hardware_SecurityModule) GetCustomerOwnedFlag() (resp bool, err error) { return } -// The '''getDailyAverage''' method calculates the average daily network traffic used by the selected server. Using the required parameter ''dateTime'' to enter a start and end date, the user retrieves this average, measure in gigabytes (GB) for the specified date range. When entering parameters, only the month, day and year are required - time entries are omitted as this method defaults the time to midnight in order to account for the entire day. +// The ”'getDailyAverage”' method calculates the average daily network traffic used by the selected server. Using the required parameter ”dateTime” to enter a start and end date, the user retrieves this average, measure in gigabytes (GB) for the specified date range. When entering parameters, only the month, day and year are required - time entries are omitted as this method defaults the time to midnight in order to account for the entire day. func (r Hardware_SecurityModule) GetDailyAverage(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -4608,7 +4586,7 @@ func (r Hardware_SecurityModule) GetFrontendBandwidthUse(startDate *datatypes.Ti return } -// The '''getFrontendIncomingBandwidth''' method retrieves the amount of incoming public network traffic used by a server between the given start and end date parameters. When entering the ''dateTime'' parameter, only the month, day and year of the start and end dates are required - the time (hour, minute and second) are set to midnight by default and cannot be changed. The amount of bandwidth retrieved is measured in gigabytes (GB). +// The ”'getFrontendIncomingBandwidth”' method retrieves the amount of incoming public network traffic used by a server between the given start and end date parameters. When entering the ”dateTime” parameter, only the month, day and year of the start and end dates are required - the time (hour, minute and second) are set to midnight by default and cannot be changed. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_SecurityModule) GetFrontendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -4624,7 +4602,7 @@ func (r Hardware_SecurityModule) GetFrontendNetworkComponents() (resp []datatype return } -// The '''getFrontendOutgoingBandwidth''' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ''dateTime'' parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). +// The ”'getFrontendOutgoingBandwidth”' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ”dateTime” parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_SecurityModule) GetFrontendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -4715,7 +4693,7 @@ func (r Hardware_SecurityModule) GetHostIpsSoftwareComponent() (resp datatypes.S return } -// The '''getHourlyBandwidth''' method retrieves all bandwidth updates hourly for the specified hardware. Because the potential number of data points can become excessive, the method limits the user to obtain data in 24-hour intervals. The required ''dateTime'' parameter is used as the starting point for the query and will be calculated for the 24-hour period starting with the specified date and time. For example, entering a parameter of +// The ”'getHourlyBandwidth”' method retrieves all bandwidth updates hourly for the specified hardware. Because the potential number of data points can become excessive, the method limits the user to obtain data in 24-hour intervals. The required ”dateTime” parameter is used as the starting point for the query and will be calculated for the 24-hour period starting with the specified date and time. For example, entering a parameter of // // '02/01/2008 0:00' // @@ -5188,7 +5166,6 @@ func (r Hardware_SecurityModule) GetPrivateVlan() (resp datatypes.Network_Vlan, return } -// // *** DEPRECATED *** // Retrieve a backend network VLAN by searching for an IP address // Deprecated: This function has been marked as deprecated. @@ -5503,7 +5480,6 @@ func (r Hardware_SecurityModule) GetTopLevelLocation() (resp datatypes.Location, return } -// // This method will query transaction history for a piece of hardware. func (r Hardware_SecurityModule) GetTransactionHistory() (resp []datatypes.Provisioning_Version1_Transaction_History, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getTransactionHistory", nil, &r.Options, &resp) @@ -5633,7 +5609,7 @@ func (r Hardware_SecurityModule) GetWindowsUpdateStatus() (resp datatypes.Contai return } -// The '''importVirtualHost''' method attempts to import the host record for the virtualization platform running on a server. +// The ”'importVirtualHost”' method attempts to import the host record for the virtualization platform running on a server. func (r Hardware_SecurityModule) ImportVirtualHost() (resp datatypes.Virtual_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "importVirtualHost", nil, &r.Options, &resp) return @@ -5663,7 +5639,7 @@ func (r Hardware_SecurityModule) IsPingable() (resp bool, err error) { return } -// Determine if the server runs any version of the Microsoft Windows operating systems. Return ''true'' if it does and ''false if otherwise. +// Determine if the server runs any version of the Microsoft Windows operating systems. Return ”true” if it does and ”false if otherwise. func (r Hardware_SecurityModule) IsWindowsServer() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "isWindowsServer", nil, &r.Options, &resp) return @@ -6135,271 +6111,277 @@ func (r Hardware_SecurityModule750) CreateHyperThreadingUpdateTransaction(disabl return } -// // // createObject() enables the creation of servers on an account. This // method is a simplified alternative to interacting with the ordering system directly. // -// // In order to create a server, a template object must be sent in with a few required // values. // -// // When this method returns an order will have been placed for a server of the specified configuration. // -// // To determine when the server is available you can poll the server via [[SoftLayer_Hardware/getObject|getObject]], // checking the provisionDate property. // When provisionDate is not null, the server will be ready. Be sure to use the globalIdentifier // as your initialization parameter. // -// // Warning: Servers created via this method will incur charges on your account. For testing input parameters see [[SoftLayer_Hardware/generateOrderTemplate|generateOrderTemplate]]. // -// // Input - [[SoftLayer_Hardware (type)|SoftLayer_Hardware]] //
      -//
    • hostname -//
      Hostname for the server.
        -//
      • Required
      • -//
      • Type - string
      • -//
      -//
      -//
    • -//
    • domain -//
      Domain for the server.
        -//
      • Required
      • -//
      • Type - string
      • -//
      -//
      -//
    • -//
    • processorCoreAmount -//
      The number of logical CPU cores to allocate.
        -//
      • Required
      • -//
      • Type - int
      • -//
      • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
      • -//
      -//
      -//
    • -//
    • memoryCapacity -//
      The amount of memory to allocate in gigabytes.
        -//
      • Required
      • -//
      • Type - int
      • -//
      • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
      • -//
      -//
      -//
    • -//
    • hourlyBillingFlag -//
      Specifies the billing type for the server.
        -//
      • Required
      • -//
      • Type - boolean
      • -//
      • When true the server will be billed on hourly usage, otherwise it will be billed on a monthly basis.
      • -//
      -//
      -//
    • -//
    • operatingSystemReferenceCode -//
      An identifier for the operating system to provision the server with.
        -//
      • Required
      • -//
      • Type - string
      • -//
      • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
      • -//
      -//
      -//
    • -//
    • datacenter.name -//
      Specifies which datacenter the server is to be provisioned in.
        -//
      • Required
      • -//
      • Type - string
      • -//
      • The datacenter property is a [[SoftLayer_Location (type)|location]] structure with the name field set.
      • -//
      • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
      • -//
      -// { -// "datacenter": { -// "name": "dal05" -// } -// } -//
      -//
    • -//
    • networkComponents.maxSpeed -//
      Specifies the connection speed for the server's network components.
        -//
      • Optional
      • -//
      • Type - int
      • -//
      • Default - The highest available zero cost port speed will be used.
      • -//
      • Description - The networkComponents property is an array with a single [[SoftLayer_Network_Component (type)|network component]] structure. The maxSpeed property must be set to specify the network uplink speed, in megabits per second, of the server.
      • -//
      • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
      • -//
      -// { -// "networkComponents": [ -// { -// "maxSpeed": 1000 -// } -// ] -// } -//
      -//
    • -//
    • networkComponents.redundancyEnabledFlag -//
      Specifies whether or not the server's network components should be in redundancy groups.
        -//
      • Optional
      • -//
      • Type - bool
      • -//
      • Default - false
      • -//
      • Description - The networkComponents property is an array with a single [[SoftLayer_Network_Component (type)|network component]] structure. When the redundancyEnabledFlag property is true the server's network components will be in redundancy groups.
      • -//
      -// { -// "networkComponents": [ -// { -// "redundancyEnabledFlag": false -// } -// ] -// } -//
      -//
    • -//
    • privateNetworkOnlyFlag -//
      Specifies whether or not the server only has access to the private network
        -//
      • Optional
      • -//
      • Type - boolean
      • -//
      • Default - false
      • -//
      • When true this flag specifies that a server is to only have access to the private network.
      • -//
      -//
      -//
    • -//
    • primaryNetworkComponent.networkVlan.id -//
      Specifies the network vlan which is to be used for the frontend interface of the server.
        -//
      • Optional
      • -//
      • Type - int
      • -//
      • Description - The primaryNetworkComponent property is a [[SoftLayer_Network_Component (type)|network component]] structure with the networkVlan property populated with a [[SoftLayer_Network_Vlan (type)|vlan]] structure. The id property must be set to specify the frontend network vlan of the server.
      • -//
      -// { -// "primaryNetworkComponent": { -// "networkVlan": { -// "id": 1 -// } -// } -// } -//
      -//
    • -//
    • primaryBackendNetworkComponent.networkVlan.id -//
      Specifies the network vlan which is to be used for the backend interface of the server.
        -//
      • Optional
      • -//
      • Type - int
      • -//
      • Description - The primaryBackendNetworkComponent property is a [[SoftLayer_Network_Component (type)|network component]] structure with the networkVlan property populated with a [[SoftLayer_Network_Vlan (type)|vlan]] structure. The id property must be set to specify the backend network vlan of the server.
      • -//
      -// { -// "primaryBackendNetworkComponent": { -// "networkVlan": { -// "id": 2 -// } -// } -// } -//
      -//
    • -//
    • fixedConfigurationPreset.keyName -//
        -//
      • Optional
      • -//
      • Type - string
      • -//
      • Description - The fixedConfigurationPreset property is a [[SoftLayer_Product_Package_Preset (type)|fixed configuration preset]] structure. The keyName property must be set to specify preset to use.
      • -//
      • If a fixed configuration preset is used processorCoreAmount, memoryCapacity and hardDrives properties must not be set.
      • -//
      • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
      • -//
      -// { -// "fixedConfigurationPreset": { -// "keyName": "SOME_KEY_NAME" -// } -// } -//
      -//
    • -//
    • userData.value -//
      Arbitrary data to be made available to the server.
        -//
      • Optional
      • -//
      • Type - string
      • -//
      • Description - The userData property is an array with a single [[SoftLayer_Hardware_Attribute (type)|attribute]] structure with the value property set to an arbitrary value.
      • -//
      • This value can be retrieved via the [[SoftLayer_Resource_Metadata/getUserMetadata|getUserMetadata]] method from a request originating from the server. This is primarily useful for providing data to software that may be on the server and configured to execute upon first boot.
      • -//
      -// { -// "userData": [ -// { -// "value": "someValue" -// } -// ] -// } -//
      -//
    • -//
    • hardDrives -//
      Hard drive settings for the server
        -//
      • Optional
      • -//
      • Type - SoftLayer_Hardware_Component
      • -//
      • Default - The largest available capacity for a zero cost primary disk will be used.
      • -//
      • Description - The hardDrives property is an array of [[SoftLayer_Hardware_Component (type)|hardware component]] structures. -//
      • Each hard drive must specify the capacity property.
      • -//
      • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
      • -//
      -// { -// "hardDrives": [ -// { -// "capacity": 500 -// } -// ] -// } -//
      -//
    • -//
    • sshKeys -//
      SSH keys to install on the server upon provisioning.
        -//
      • Optional
      • -//
      • Type - array of [[SoftLayer_Security_Ssh_Key (type)|SoftLayer_Security_Ssh_Key]]
      • -//
      • Description - The sshKeys property is an array of [[SoftLayer_Security_Ssh_Key (type)|SSH Key]] structures with the id property set to the value of an existing SSH key.
      • -//
      • To create a new SSH key, call [[SoftLayer_Security_Ssh_Key/createObject|createObject]] on the [[SoftLayer_Security_Ssh_Key]] service.
      • -//
      • To obtain a list of existing SSH keys, call [[SoftLayer_Account/getSshKeys|getSshKeys]] on the [[SoftLayer_Account]] service. -//
      -// { -// "sshKeys": [ -// { -// "id": 123 -// } -// ] -// } -//
      -//
    • -//
    • postInstallScriptUri -//
      Specifies the uri location of the script to be downloaded and run after installation is complete.
        -//
      • Optional
      • -//
      • Type - string
      • -//
      -//
      -//
    • -//
    // +//
  • hostname +//
    Hostname for the server.
      +//
    • Required
    • +//
    • Type - string
    • +//
    +//
    +//
  • +//
  • domain +//
    Domain for the server.
      +//
    • Required
    • +//
    • Type - string
    • +//
    +//
    +//
  • +//
  • processorCoreAmount +//
    The number of logical CPU cores to allocate.
      +//
    • Required
    • +//
    • Type - int
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +//
    +//
  • +//
  • memoryCapacity +//
    The amount of memory to allocate in gigabytes.
      +//
    • Required
    • +//
    • Type - int
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +//
    +//
  • +//
  • hourlyBillingFlag +//
    Specifies the billing type for the server.
      +//
    • Required
    • +//
    • Type - boolean
    • +//
    • When true the server will be billed on hourly usage, otherwise it will be billed on a monthly basis.
    • +//
    +//
    +//
  • +//
  • operatingSystemReferenceCode +//
    An identifier for the operating system to provision the server with.
      +//
    • Required
    • +//
    • Type - string
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +//
    +//
  • +//
  • datacenter.name +//
    Specifies which datacenter the server is to be provisioned in.
      +//
    • Required
    • +//
    • Type - string
    • +//
    • The datacenter property is a [[SoftLayer_Location (type)|location]] structure with the name field set.
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +// { +// "datacenter": { +// "name": "dal05" +// } +// } +// +//
    +//
  • +//
  • networkComponents.maxSpeed +//
    Specifies the connection speed for the server's network components.
      +//
    • Optional
    • +//
    • Type - int
    • +//
    • Default - The highest available zero cost port speed will be used.
    • +//
    • Description - The networkComponents property is an array with a single [[SoftLayer_Network_Component (type)|network component]] structure. The maxSpeed property must be set to specify the network uplink speed, in megabits per second, of the server.
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +// { +// "networkComponents": [ +// { +// "maxSpeed": 1000 +// } +// ] +// } +// +//
    +//
  • +//
  • networkComponents.redundancyEnabledFlag +//
    Specifies whether or not the server's network components should be in redundancy groups.
      +//
    • Optional
    • +//
    • Type - bool
    • +//
    • Default - false
    • +//
    • Description - The networkComponents property is an array with a single [[SoftLayer_Network_Component (type)|network component]] structure. When the redundancyEnabledFlag property is true the server's network components will be in redundancy groups.
    • +//
    +// { +// "networkComponents": [ +// { +// "redundancyEnabledFlag": false +// } +// ] +// } +// +//
    +//
  • +//
  • privateNetworkOnlyFlag +//
    Specifies whether or not the server only has access to the private network
      +//
    • Optional
    • +//
    • Type - boolean
    • +//
    • Default - false
    • +//
    • When true this flag specifies that a server is to only have access to the private network.
    • +//
    +//
    +//
  • +//
  • primaryNetworkComponent.networkVlan.id +//
    Specifies the network vlan which is to be used for the frontend interface of the server.
      +//
    • Optional
    • +//
    • Type - int
    • +//
    • Description - The primaryNetworkComponent property is a [[SoftLayer_Network_Component (type)|network component]] structure with the networkVlan property populated with a [[SoftLayer_Network_Vlan (type)|vlan]] structure. The id property must be set to specify the frontend network vlan of the server.
    • +//
    +// { +// "primaryNetworkComponent": { +// "networkVlan": { +// "id": 1 +// } +// } +// } +// +//
    +//
  • +//
  • primaryBackendNetworkComponent.networkVlan.id +//
    Specifies the network vlan which is to be used for the backend interface of the server.
      +//
    • Optional
    • +//
    • Type - int
    • +//
    • Description - The primaryBackendNetworkComponent property is a [[SoftLayer_Network_Component (type)|network component]] structure with the networkVlan property populated with a [[SoftLayer_Network_Vlan (type)|vlan]] structure. The id property must be set to specify the backend network vlan of the server.
    • +//
    +// { +// "primaryBackendNetworkComponent": { +// "networkVlan": { +// "id": 2 +// } +// } +// } +// +//
    +//
  • +//
  • fixedConfigurationPreset.keyName +//
      +//
    • Optional
    • +//
    • Type - string
    • +//
    • Description - The fixedConfigurationPreset property is a [[SoftLayer_Product_Package_Preset (type)|fixed configuration preset]] structure. The keyName property must be set to specify preset to use.
    • +//
    • If a fixed configuration preset is used processorCoreAmount, memoryCapacity and hardDrives properties must not be set.
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +// { +// "fixedConfigurationPreset": { +// "keyName": "SOME_KEY_NAME" +// } +// } +// +//
    +//
  • +//
  • userData.value +//
    Arbitrary data to be made available to the server.
      +//
    • Optional
    • +//
    • Type - string
    • +//
    • Description - The userData property is an array with a single [[SoftLayer_Hardware_Attribute (type)|attribute]] structure with the value property set to an arbitrary value.
    • +//
    • This value can be retrieved via the [[SoftLayer_Resource_Metadata/getUserMetadata|getUserMetadata]] method from a request originating from the server. This is primarily useful for providing data to software that may be on the server and configured to execute upon first boot.
    • +//
    +// { +// "userData": [ +// { +// "value": "someValue" +// } +// ] +// } +// +//
    +//
  • +//
  • hardDrives +//
    Hard drive settings for the server
      +//
    • Optional
    • +//
    • Type - SoftLayer_Hardware_Component
    • +//
    • Default - The largest available capacity for a zero cost primary disk will be used.
    • +//
    • Description - The hardDrives property is an array of [[SoftLayer_Hardware_Component (type)|hardware component]] structures. +//
    • Each hard drive must specify the capacity property.
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +// { +// "hardDrives": [ +// { +// "capacity": 500 +// } +// ] +// } +// +//
    +//
  • +//
  • sshKeys +//
    SSH keys to install on the server upon provisioning.
      +//
    • Optional
    • +//
    • Type - array of [[SoftLayer_Security_Ssh_Key (type)|SoftLayer_Security_Ssh_Key]]
    • +//
    • Description - The sshKeys property is an array of [[SoftLayer_Security_Ssh_Key (type)|SSH Key]] structures with the id property set to the value of an existing SSH key.
    • +//
    • To create a new SSH key, call [[SoftLayer_Security_Ssh_Key/createObject|createObject]] on the [[SoftLayer_Security_Ssh_Key]] service.
    • +//
    • To obtain a list of existing SSH keys, call [[SoftLayer_Account/getSshKeys|getSshKeys]] on the [[SoftLayer_Account]] service. +//
    +// { +// "sshKeys": [ +// { +// "id": 123 +// } +// ] +// } +// +//
    +//
  • +//
  • postInstallScriptUri +//
    Specifies the uri location of the script to be downloaded and run after installation is complete.
      +//
    • Optional
    • +//
    • Type - string
    • +//
    +//
    +//
  • +// +// // //

    REST Example

    -// curl -X POST -d '{ -// "parameters":[ -// { -// "hostname": "host1", -// "domain": "example.com", -// "processorCoreAmount": 2, -// "memoryCapacity": 2, -// "hourlyBillingFlag": true, -// "operatingSystemReferenceCode": "UBUNTU_LATEST" -// } -// ] -// }' https://api.softlayer.com/rest/v3/SoftLayer_Hardware.json +// +// curl -X POST -d '{ +// "parameters":[ +// { +// "hostname": "host1", +// "domain": "example.com", +// "processorCoreAmount": 2, +// "memoryCapacity": 2, +// "hourlyBillingFlag": true, +// "operatingSystemReferenceCode": "UBUNTU_LATEST" +// } +// ] +// }' https://api.softlayer.com/rest/v3/SoftLayer_Hardware.json +// // // HTTP/1.1 201 Created // Location: https://api.softlayer.com/rest/v3/SoftLayer_Hardware/f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5/getObject // +// { +// "accountId": 232298, +// "bareMetalInstanceFlag": null, +// "domain": "example.com", +// "hardwareStatusId": null, +// "hostname": "host1", +// "id": null, +// "serviceProviderId": null, +// "serviceProviderResourceId": null, +// "globalIdentifier": "f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5", +// "hourlyBillingFlag": true, +// "memoryCapacity": 2, +// "operatingSystemReferenceCode": "UBUNTU_LATEST", +// "processorCoreAmount": 2 +// } // -// { -// "accountId": 232298, -// "bareMetalInstanceFlag": null, -// "domain": "example.com", -// "hardwareStatusId": null, -// "hostname": "host1", -// "id": null, -// "serviceProviderId": null, -// "serviceProviderResourceId": null, -// "globalIdentifier": "f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5", -// "hourlyBillingFlag": true, -// "memoryCapacity": 2, -// "operatingSystemReferenceCode": "UBUNTU_LATEST", -// "processorCoreAmount": 2 -// } // func (r Hardware_SecurityModule750) CreateObject(templateObject *datatypes.Hardware_SecurityModule750) (resp datatypes.Hardware_SecurityModule750, err error) { params := []interface{}{ @@ -6419,7 +6401,6 @@ func (r Hardware_SecurityModule750) CreatePostSoftwareInstallTransaction(install return } -// // This method will cancel a server effective immediately. For servers billed hourly, the charges will stop immediately after the method returns. func (r Hardware_SecurityModule750) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "deleteObject", nil, &r.Options, &resp) @@ -6472,7 +6453,7 @@ func (r Hardware_SecurityModule750) ExecuteRemoteScript(uri *string) (err error) return } -// The '''findByIpAddress''' method finds hardware using its primary public or private IP address. IP addresses that have a secondary subnet tied to the hardware will not return the hardware. If no hardware is found, no errors are generated and no data is returned. +// The ”'findByIpAddress”' method finds hardware using its primary public or private IP address. IP addresses that have a secondary subnet tied to the hardware will not return the hardware. If no hardware is found, no errors are generated and no data is returned. func (r Hardware_SecurityModule750) FindByIpAddress(ipAddress *string) (resp datatypes.Hardware, err error) { params := []interface{}{ ipAddress, @@ -6481,13 +6462,10 @@ func (r Hardware_SecurityModule750) FindByIpAddress(ipAddress *string) (resp dat return } -// // Obtain an [[SoftLayer_Container_Product_Order_Hardware_Server (type)|order container]] that can be sent to [[SoftLayer_Product_Order/verifyOrder|verifyOrder]] or [[SoftLayer_Product_Order/placeOrder|placeOrder]]. // -// // This is primarily useful when there is a necessity to confirm the price which will be charged for an order. // -// // See [[SoftLayer_Hardware/createObject|createObject]] for specifics on the requirements of the template object parameter. func (r Hardware_SecurityModule750) GenerateOrderTemplate(templateObject *datatypes.Hardware) (resp datatypes.Container_Product_Order, err error) { params := []interface{}{ @@ -6646,7 +6624,7 @@ func (r Hardware_SecurityModule750) GetBackendBandwidthUse(startDate *datatypes. return } -// The '''getBackendIncomingBandwidth''' method retrieves the amount of incoming private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. +// The ”'getBackendIncomingBandwidth”' method retrieves the amount of incoming private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_SecurityModule750) GetBackendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -6662,7 +6640,7 @@ func (r Hardware_SecurityModule750) GetBackendNetworkComponents() (resp []dataty return } -// The '''getBackendOutgoingBandwidth''' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. +// The ”'getBackendOutgoingBandwidth”' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_SecurityModule750) GetBackendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -6821,10 +6799,8 @@ func (r Hardware_SecurityModule750) GetCost() (resp datatypes.Float64, err error return } -// // There are many options that may be provided while ordering a server, this method can be used to determine what these options are. // -// // Detailed information on the return value can be found on the data type page for [[SoftLayer_Container_Hardware_Configuration (type)]]. func (r Hardware_SecurityModule750) GetCreateObjectOptions() (resp datatypes.Container_Hardware_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getCreateObjectOptions", nil, &r.Options, &resp) @@ -6882,7 +6858,7 @@ func (r Hardware_SecurityModule750) GetCustomerOwnedFlag() (resp bool, err error return } -// The '''getDailyAverage''' method calculates the average daily network traffic used by the selected server. Using the required parameter ''dateTime'' to enter a start and end date, the user retrieves this average, measure in gigabytes (GB) for the specified date range. When entering parameters, only the month, day and year are required - time entries are omitted as this method defaults the time to midnight in order to account for the entire day. +// The ”'getDailyAverage”' method calculates the average daily network traffic used by the selected server. Using the required parameter ”dateTime” to enter a start and end date, the user retrieves this average, measure in gigabytes (GB) for the specified date range. When entering parameters, only the month, day and year are required - time entries are omitted as this method defaults the time to midnight in order to account for the entire day. func (r Hardware_SecurityModule750) GetDailyAverage(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -7017,7 +6993,7 @@ func (r Hardware_SecurityModule750) GetFrontendBandwidthUse(startDate *datatypes return } -// The '''getFrontendIncomingBandwidth''' method retrieves the amount of incoming public network traffic used by a server between the given start and end date parameters. When entering the ''dateTime'' parameter, only the month, day and year of the start and end dates are required - the time (hour, minute and second) are set to midnight by default and cannot be changed. The amount of bandwidth retrieved is measured in gigabytes (GB). +// The ”'getFrontendIncomingBandwidth”' method retrieves the amount of incoming public network traffic used by a server between the given start and end date parameters. When entering the ”dateTime” parameter, only the month, day and year of the start and end dates are required - the time (hour, minute and second) are set to midnight by default and cannot be changed. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_SecurityModule750) GetFrontendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -7033,7 +7009,7 @@ func (r Hardware_SecurityModule750) GetFrontendNetworkComponents() (resp []datat return } -// The '''getFrontendOutgoingBandwidth''' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ''dateTime'' parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). +// The ”'getFrontendOutgoingBandwidth”' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ”dateTime” parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_SecurityModule750) GetFrontendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -7124,7 +7100,7 @@ func (r Hardware_SecurityModule750) GetHostIpsSoftwareComponent() (resp datatype return } -// The '''getHourlyBandwidth''' method retrieves all bandwidth updates hourly for the specified hardware. Because the potential number of data points can become excessive, the method limits the user to obtain data in 24-hour intervals. The required ''dateTime'' parameter is used as the starting point for the query and will be calculated for the 24-hour period starting with the specified date and time. For example, entering a parameter of +// The ”'getHourlyBandwidth”' method retrieves all bandwidth updates hourly for the specified hardware. Because the potential number of data points can become excessive, the method limits the user to obtain data in 24-hour intervals. The required ”dateTime” parameter is used as the starting point for the query and will be calculated for the 24-hour period starting with the specified date and time. For example, entering a parameter of // // '02/01/2008 0:00' // @@ -7597,7 +7573,6 @@ func (r Hardware_SecurityModule750) GetPrivateVlan() (resp datatypes.Network_Vla return } -// // *** DEPRECATED *** // Retrieve a backend network VLAN by searching for an IP address // Deprecated: This function has been marked as deprecated. @@ -7912,7 +7887,6 @@ func (r Hardware_SecurityModule750) GetTopLevelLocation() (resp datatypes.Locati return } -// // This method will query transaction history for a piece of hardware. func (r Hardware_SecurityModule750) GetTransactionHistory() (resp []datatypes.Provisioning_Version1_Transaction_History, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getTransactionHistory", nil, &r.Options, &resp) @@ -8042,7 +8016,7 @@ func (r Hardware_SecurityModule750) GetWindowsUpdateStatus() (resp datatypes.Con return } -// The '''importVirtualHost''' method attempts to import the host record for the virtualization platform running on a server. +// The ”'importVirtualHost”' method attempts to import the host record for the virtualization platform running on a server. func (r Hardware_SecurityModule750) ImportVirtualHost() (resp datatypes.Virtual_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "importVirtualHost", nil, &r.Options, &resp) return @@ -8072,7 +8046,7 @@ func (r Hardware_SecurityModule750) IsPingable() (resp bool, err error) { return } -// Determine if the server runs any version of the Microsoft Windows operating systems. Return ''true'' if it does and ''false if otherwise. +// Determine if the server runs any version of the Microsoft Windows operating systems. Return ”true” if it does and ”false if otherwise. func (r Hardware_SecurityModule750) IsWindowsServer() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "isWindowsServer", nil, &r.Options, &resp) return @@ -8544,271 +8518,277 @@ func (r Hardware_Server) CreateHyperThreadingUpdateTransaction(disableHyperthrea return } -// // // createObject() enables the creation of servers on an account. This // method is a simplified alternative to interacting with the ordering system directly. // -// // In order to create a server, a template object must be sent in with a few required // values. // -// // When this method returns an order will have been placed for a server of the specified configuration. // -// // To determine when the server is available you can poll the server via [[SoftLayer_Hardware/getObject|getObject]], // checking the provisionDate property. // When provisionDate is not null, the server will be ready. Be sure to use the globalIdentifier // as your initialization parameter. // -// // Warning: Servers created via this method will incur charges on your account. For testing input parameters see [[SoftLayer_Hardware/generateOrderTemplate|generateOrderTemplate]]. // -// // Input - [[SoftLayer_Hardware (type)|SoftLayer_Hardware]] //
      -//
    • hostname -//
      Hostname for the server.
        -//
      • Required
      • -//
      • Type - string
      • -//
      -//
      -//
    • -//
    • domain -//
      Domain for the server.
        -//
      • Required
      • -//
      • Type - string
      • -//
      -//
      -//
    • -//
    • processorCoreAmount -//
      The number of logical CPU cores to allocate.
        -//
      • Required
      • -//
      • Type - int
      • -//
      • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
      • -//
      -//
      -//
    • -//
    • memoryCapacity -//
      The amount of memory to allocate in gigabytes.
        -//
      • Required
      • -//
      • Type - int
      • -//
      • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
      • -//
      -//
      -//
    • -//
    • hourlyBillingFlag -//
      Specifies the billing type for the server.
        -//
      • Required
      • -//
      • Type - boolean
      • -//
      • When true the server will be billed on hourly usage, otherwise it will be billed on a monthly basis.
      • -//
      -//
      -//
    • -//
    • operatingSystemReferenceCode -//
      An identifier for the operating system to provision the server with.
        -//
      • Required
      • -//
      • Type - string
      • -//
      • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
      • -//
      -//
      -//
    • -//
    • datacenter.name -//
      Specifies which datacenter the server is to be provisioned in.
        -//
      • Required
      • -//
      • Type - string
      • -//
      • The datacenter property is a [[SoftLayer_Location (type)|location]] structure with the name field set.
      • -//
      • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
      • -//
      -// { -// "datacenter": { -// "name": "dal05" -// } -// } -//
      -//
    • -//
    • networkComponents.maxSpeed -//
      Specifies the connection speed for the server's network components.
        -//
      • Optional
      • -//
      • Type - int
      • -//
      • Default - The highest available zero cost port speed will be used.
      • -//
      • Description - The networkComponents property is an array with a single [[SoftLayer_Network_Component (type)|network component]] structure. The maxSpeed property must be set to specify the network uplink speed, in megabits per second, of the server.
      • -//
      • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
      • -//
      -// { -// "networkComponents": [ -// { -// "maxSpeed": 1000 -// } -// ] -// } -//
      -//
    • -//
    • networkComponents.redundancyEnabledFlag -//
      Specifies whether or not the server's network components should be in redundancy groups.
        -//
      • Optional
      • -//
      • Type - bool
      • -//
      • Default - false
      • -//
      • Description - The networkComponents property is an array with a single [[SoftLayer_Network_Component (type)|network component]] structure. When the redundancyEnabledFlag property is true the server's network components will be in redundancy groups.
      • -//
      -// { -// "networkComponents": [ -// { -// "redundancyEnabledFlag": false -// } -// ] -// } -//
      -//
    • -//
    • privateNetworkOnlyFlag -//
      Specifies whether or not the server only has access to the private network
        -//
      • Optional
      • -//
      • Type - boolean
      • -//
      • Default - false
      • -//
      • When true this flag specifies that a server is to only have access to the private network.
      • -//
      -//
      -//
    • -//
    • primaryNetworkComponent.networkVlan.id -//
      Specifies the network vlan which is to be used for the frontend interface of the server.
        -//
      • Optional
      • -//
      • Type - int
      • -//
      • Description - The primaryNetworkComponent property is a [[SoftLayer_Network_Component (type)|network component]] structure with the networkVlan property populated with a [[SoftLayer_Network_Vlan (type)|vlan]] structure. The id property must be set to specify the frontend network vlan of the server.
      • -//
      -// { -// "primaryNetworkComponent": { -// "networkVlan": { -// "id": 1 -// } -// } -// } -//
      -//
    • -//
    • primaryBackendNetworkComponent.networkVlan.id -//
      Specifies the network vlan which is to be used for the backend interface of the server.
        -//
      • Optional
      • -//
      • Type - int
      • -//
      • Description - The primaryBackendNetworkComponent property is a [[SoftLayer_Network_Component (type)|network component]] structure with the networkVlan property populated with a [[SoftLayer_Network_Vlan (type)|vlan]] structure. The id property must be set to specify the backend network vlan of the server.
      • -//
      -// { -// "primaryBackendNetworkComponent": { -// "networkVlan": { -// "id": 2 -// } -// } -// } -//
      -//
    • -//
    • fixedConfigurationPreset.keyName -//
        -//
      • Optional
      • -//
      • Type - string
      • -//
      • Description - The fixedConfigurationPreset property is a [[SoftLayer_Product_Package_Preset (type)|fixed configuration preset]] structure. The keyName property must be set to specify preset to use.
      • -//
      • If a fixed configuration preset is used processorCoreAmount, memoryCapacity and hardDrives properties must not be set.
      • -//
      • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
      • -//
      -// { -// "fixedConfigurationPreset": { -// "keyName": "SOME_KEY_NAME" -// } -// } -//
      -//
    • -//
    • userData.value -//
      Arbitrary data to be made available to the server.
        -//
      • Optional
      • -//
      • Type - string
      • -//
      • Description - The userData property is an array with a single [[SoftLayer_Hardware_Attribute (type)|attribute]] structure with the value property set to an arbitrary value.
      • -//
      • This value can be retrieved via the [[SoftLayer_Resource_Metadata/getUserMetadata|getUserMetadata]] method from a request originating from the server. This is primarily useful for providing data to software that may be on the server and configured to execute upon first boot.
      • -//
      -// { -// "userData": [ -// { -// "value": "someValue" -// } -// ] -// } -//
      -//
    • -//
    • hardDrives -//
      Hard drive settings for the server
        -//
      • Optional
      • -//
      • Type - SoftLayer_Hardware_Component
      • -//
      • Default - The largest available capacity for a zero cost primary disk will be used.
      • -//
      • Description - The hardDrives property is an array of [[SoftLayer_Hardware_Component (type)|hardware component]] structures. -//
      • Each hard drive must specify the capacity property.
      • -//
      • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
      • -//
      -// { -// "hardDrives": [ -// { -// "capacity": 500 -// } -// ] -// } -//
      -//
    • -//
    • sshKeys -//
      SSH keys to install on the server upon provisioning.
        -//
      • Optional
      • -//
      • Type - array of [[SoftLayer_Security_Ssh_Key (type)|SoftLayer_Security_Ssh_Key]]
      • -//
      • Description - The sshKeys property is an array of [[SoftLayer_Security_Ssh_Key (type)|SSH Key]] structures with the id property set to the value of an existing SSH key.
      • -//
      • To create a new SSH key, call [[SoftLayer_Security_Ssh_Key/createObject|createObject]] on the [[SoftLayer_Security_Ssh_Key]] service.
      • -//
      • To obtain a list of existing SSH keys, call [[SoftLayer_Account/getSshKeys|getSshKeys]] on the [[SoftLayer_Account]] service. -//
      -// { -// "sshKeys": [ -// { -// "id": 123 -// } -// ] -// } -//
      -//
    • -//
    • postInstallScriptUri -//
      Specifies the uri location of the script to be downloaded and run after installation is complete.
        -//
      • Optional
      • -//
      • Type - string
      • -//
      -//
      -//
    • -//
    // +//
  • hostname +//
    Hostname for the server.
      +//
    • Required
    • +//
    • Type - string
    • +//
    +//
    +//
  • +//
  • domain +//
    Domain for the server.
      +//
    • Required
    • +//
    • Type - string
    • +//
    +//
    +//
  • +//
  • processorCoreAmount +//
    The number of logical CPU cores to allocate.
      +//
    • Required
    • +//
    • Type - int
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +//
    +//
  • +//
  • memoryCapacity +//
    The amount of memory to allocate in gigabytes.
      +//
    • Required
    • +//
    • Type - int
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +//
    +//
  • +//
  • hourlyBillingFlag +//
    Specifies the billing type for the server.
      +//
    • Required
    • +//
    • Type - boolean
    • +//
    • When true the server will be billed on hourly usage, otherwise it will be billed on a monthly basis.
    • +//
    +//
    +//
  • +//
  • operatingSystemReferenceCode +//
    An identifier for the operating system to provision the server with.
      +//
    • Required
    • +//
    • Type - string
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +//
    +//
  • +//
  • datacenter.name +//
    Specifies which datacenter the server is to be provisioned in.
      +//
    • Required
    • +//
    • Type - string
    • +//
    • The datacenter property is a [[SoftLayer_Location (type)|location]] structure with the name field set.
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +// { +// "datacenter": { +// "name": "dal05" +// } +// } +// +//
    +//
  • +//
  • networkComponents.maxSpeed +//
    Specifies the connection speed for the server's network components.
      +//
    • Optional
    • +//
    • Type - int
    • +//
    • Default - The highest available zero cost port speed will be used.
    • +//
    • Description - The networkComponents property is an array with a single [[SoftLayer_Network_Component (type)|network component]] structure. The maxSpeed property must be set to specify the network uplink speed, in megabits per second, of the server.
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +// { +// "networkComponents": [ +// { +// "maxSpeed": 1000 +// } +// ] +// } +// +//
    +//
  • +//
  • networkComponents.redundancyEnabledFlag +//
    Specifies whether or not the server's network components should be in redundancy groups.
      +//
    • Optional
    • +//
    • Type - bool
    • +//
    • Default - false
    • +//
    • Description - The networkComponents property is an array with a single [[SoftLayer_Network_Component (type)|network component]] structure. When the redundancyEnabledFlag property is true the server's network components will be in redundancy groups.
    • +//
    +// { +// "networkComponents": [ +// { +// "redundancyEnabledFlag": false +// } +// ] +// } +// +//
    +//
  • +//
  • privateNetworkOnlyFlag +//
    Specifies whether or not the server only has access to the private network
      +//
    • Optional
    • +//
    • Type - boolean
    • +//
    • Default - false
    • +//
    • When true this flag specifies that a server is to only have access to the private network.
    • +//
    +//
    +//
  • +//
  • primaryNetworkComponent.networkVlan.id +//
    Specifies the network vlan which is to be used for the frontend interface of the server.
      +//
    • Optional
    • +//
    • Type - int
    • +//
    • Description - The primaryNetworkComponent property is a [[SoftLayer_Network_Component (type)|network component]] structure with the networkVlan property populated with a [[SoftLayer_Network_Vlan (type)|vlan]] structure. The id property must be set to specify the frontend network vlan of the server.
    • +//
    +// { +// "primaryNetworkComponent": { +// "networkVlan": { +// "id": 1 +// } +// } +// } +// +//
    +//
  • +//
  • primaryBackendNetworkComponent.networkVlan.id +//
    Specifies the network vlan which is to be used for the backend interface of the server.
      +//
    • Optional
    • +//
    • Type - int
    • +//
    • Description - The primaryBackendNetworkComponent property is a [[SoftLayer_Network_Component (type)|network component]] structure with the networkVlan property populated with a [[SoftLayer_Network_Vlan (type)|vlan]] structure. The id property must be set to specify the backend network vlan of the server.
    • +//
    +// { +// "primaryBackendNetworkComponent": { +// "networkVlan": { +// "id": 2 +// } +// } +// } +// +//
    +//
  • +//
  • fixedConfigurationPreset.keyName +//
      +//
    • Optional
    • +//
    • Type - string
    • +//
    • Description - The fixedConfigurationPreset property is a [[SoftLayer_Product_Package_Preset (type)|fixed configuration preset]] structure. The keyName property must be set to specify preset to use.
    • +//
    • If a fixed configuration preset is used processorCoreAmount, memoryCapacity and hardDrives properties must not be set.
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +// { +// "fixedConfigurationPreset": { +// "keyName": "SOME_KEY_NAME" +// } +// } +// +//
    +//
  • +//
  • userData.value +//
    Arbitrary data to be made available to the server.
      +//
    • Optional
    • +//
    • Type - string
    • +//
    • Description - The userData property is an array with a single [[SoftLayer_Hardware_Attribute (type)|attribute]] structure with the value property set to an arbitrary value.
    • +//
    • This value can be retrieved via the [[SoftLayer_Resource_Metadata/getUserMetadata|getUserMetadata]] method from a request originating from the server. This is primarily useful for providing data to software that may be on the server and configured to execute upon first boot.
    • +//
    +// { +// "userData": [ +// { +// "value": "someValue" +// } +// ] +// } +// +//
    +//
  • +//
  • hardDrives +//
    Hard drive settings for the server
      +//
    • Optional
    • +//
    • Type - SoftLayer_Hardware_Component
    • +//
    • Default - The largest available capacity for a zero cost primary disk will be used.
    • +//
    • Description - The hardDrives property is an array of [[SoftLayer_Hardware_Component (type)|hardware component]] structures. +//
    • Each hard drive must specify the capacity property.
    • +//
    • See [[SoftLayer_Hardware/getCreateObjectOptions|getCreateObjectOptions]] for available options.
    • +//
    +// { +// "hardDrives": [ +// { +// "capacity": 500 +// } +// ] +// } +// +//
    +//
  • +//
  • sshKeys +//
    SSH keys to install on the server upon provisioning.
      +//
    • Optional
    • +//
    • Type - array of [[SoftLayer_Security_Ssh_Key (type)|SoftLayer_Security_Ssh_Key]]
    • +//
    • Description - The sshKeys property is an array of [[SoftLayer_Security_Ssh_Key (type)|SSH Key]] structures with the id property set to the value of an existing SSH key.
    • +//
    • To create a new SSH key, call [[SoftLayer_Security_Ssh_Key/createObject|createObject]] on the [[SoftLayer_Security_Ssh_Key]] service.
    • +//
    • To obtain a list of existing SSH keys, call [[SoftLayer_Account/getSshKeys|getSshKeys]] on the [[SoftLayer_Account]] service. +//
    +// { +// "sshKeys": [ +// { +// "id": 123 +// } +// ] +// } +// +//
    +//
  • +//
  • postInstallScriptUri +//
    Specifies the uri location of the script to be downloaded and run after installation is complete.
      +//
    • Optional
    • +//
    • Type - string
    • +//
    +//
    +//
  • +// +// // //

    REST Example

    -// curl -X POST -d '{ -// "parameters":[ -// { -// "hostname": "host1", -// "domain": "example.com", -// "processorCoreAmount": 2, -// "memoryCapacity": 2, -// "hourlyBillingFlag": true, -// "operatingSystemReferenceCode": "UBUNTU_LATEST" -// } -// ] -// }' https://api.softlayer.com/rest/v3/SoftLayer_Hardware.json +// +// curl -X POST -d '{ +// "parameters":[ +// { +// "hostname": "host1", +// "domain": "example.com", +// "processorCoreAmount": 2, +// "memoryCapacity": 2, +// "hourlyBillingFlag": true, +// "operatingSystemReferenceCode": "UBUNTU_LATEST" +// } +// ] +// }' https://api.softlayer.com/rest/v3/SoftLayer_Hardware.json +// // // HTTP/1.1 201 Created // Location: https://api.softlayer.com/rest/v3/SoftLayer_Hardware/f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5/getObject // +// { +// "accountId": 232298, +// "bareMetalInstanceFlag": null, +// "domain": "example.com", +// "hardwareStatusId": null, +// "hostname": "host1", +// "id": null, +// "serviceProviderId": null, +// "serviceProviderResourceId": null, +// "globalIdentifier": "f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5", +// "hourlyBillingFlag": true, +// "memoryCapacity": 2, +// "operatingSystemReferenceCode": "UBUNTU_LATEST", +// "processorCoreAmount": 2 +// } // -// { -// "accountId": 232298, -// "bareMetalInstanceFlag": null, -// "domain": "example.com", -// "hardwareStatusId": null, -// "hostname": "host1", -// "id": null, -// "serviceProviderId": null, -// "serviceProviderResourceId": null, -// "globalIdentifier": "f5a3fcff-db1d-4b7c-9fa0-0349e41c29c5", -// "hourlyBillingFlag": true, -// "memoryCapacity": 2, -// "operatingSystemReferenceCode": "UBUNTU_LATEST", -// "processorCoreAmount": 2 -// } // func (r Hardware_Server) CreateObject(templateObject *datatypes.Hardware_Server) (resp datatypes.Hardware_Server, err error) { params := []interface{}{ @@ -8828,7 +8808,6 @@ func (r Hardware_Server) CreatePostSoftwareInstallTransaction(installCodes []str return } -// // This method will cancel a server effective immediately. For servers billed hourly, the charges will stop immediately after the method returns. func (r Hardware_Server) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "deleteObject", nil, &r.Options, &resp) @@ -8881,7 +8860,7 @@ func (r Hardware_Server) ExecuteRemoteScript(uri *string) (err error) { return } -// The '''findByIpAddress''' method finds hardware using its primary public or private IP address. IP addresses that have a secondary subnet tied to the hardware will not return the hardware. If no hardware is found, no errors are generated and no data is returned. +// The ”'findByIpAddress”' method finds hardware using its primary public or private IP address. IP addresses that have a secondary subnet tied to the hardware will not return the hardware. If no hardware is found, no errors are generated and no data is returned. func (r Hardware_Server) FindByIpAddress(ipAddress *string) (resp datatypes.Hardware, err error) { params := []interface{}{ ipAddress, @@ -8890,13 +8869,10 @@ func (r Hardware_Server) FindByIpAddress(ipAddress *string) (resp datatypes.Hard return } -// // Obtain an [[SoftLayer_Container_Product_Order_Hardware_Server (type)|order container]] that can be sent to [[SoftLayer_Product_Order/verifyOrder|verifyOrder]] or [[SoftLayer_Product_Order/placeOrder|placeOrder]]. // -// // This is primarily useful when there is a necessity to confirm the price which will be charged for an order. // -// // See [[SoftLayer_Hardware/createObject|createObject]] for specifics on the requirements of the template object parameter. func (r Hardware_Server) GenerateOrderTemplate(templateObject *datatypes.Hardware) (resp datatypes.Container_Product_Order, err error) { params := []interface{}{ @@ -9055,7 +9031,7 @@ func (r Hardware_Server) GetBackendBandwidthUse(startDate *datatypes.Time, endDa return } -// The '''getBackendIncomingBandwidth''' method retrieves the amount of incoming private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. +// The ”'getBackendIncomingBandwidth”' method retrieves the amount of incoming private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_Server) GetBackendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -9071,7 +9047,7 @@ func (r Hardware_Server) GetBackendNetworkComponents() (resp []datatypes.Network return } -// The '''getBackendOutgoingBandwidth''' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. +// The ”'getBackendOutgoingBandwidth”' method retrieves the amount of outgoing private network traffic used between the given start date and end date parameters. When entering start and end dates, only the month, day and year are used to calculate bandwidth totals - the time (HH:MM:SS) is ignored and defaults to midnight. The amount of bandwidth retrieved is measured in gigabytes. func (r Hardware_Server) GetBackendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -9230,10 +9206,8 @@ func (r Hardware_Server) GetCost() (resp datatypes.Float64, err error) { return } -// // There are many options that may be provided while ordering a server, this method can be used to determine what these options are. // -// // Detailed information on the return value can be found on the data type page for [[SoftLayer_Container_Hardware_Configuration (type)]]. func (r Hardware_Server) GetCreateObjectOptions() (resp datatypes.Container_Hardware_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getCreateObjectOptions", nil, &r.Options, &resp) @@ -9291,7 +9265,7 @@ func (r Hardware_Server) GetCustomerOwnedFlag() (resp bool, err error) { return } -// The '''getDailyAverage''' method calculates the average daily network traffic used by the selected server. Using the required parameter ''dateTime'' to enter a start and end date, the user retrieves this average, measure in gigabytes (GB) for the specified date range. When entering parameters, only the month, day and year are required - time entries are omitted as this method defaults the time to midnight in order to account for the entire day. +// The ”'getDailyAverage”' method calculates the average daily network traffic used by the selected server. Using the required parameter ”dateTime” to enter a start and end date, the user retrieves this average, measure in gigabytes (GB) for the specified date range. When entering parameters, only the month, day and year are required - time entries are omitted as this method defaults the time to midnight in order to account for the entire day. func (r Hardware_Server) GetDailyAverage(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -9426,7 +9400,7 @@ func (r Hardware_Server) GetFrontendBandwidthUse(startDate *datatypes.Time, endD return } -// The '''getFrontendIncomingBandwidth''' method retrieves the amount of incoming public network traffic used by a server between the given start and end date parameters. When entering the ''dateTime'' parameter, only the month, day and year of the start and end dates are required - the time (hour, minute and second) are set to midnight by default and cannot be changed. The amount of bandwidth retrieved is measured in gigabytes (GB). +// The ”'getFrontendIncomingBandwidth”' method retrieves the amount of incoming public network traffic used by a server between the given start and end date parameters. When entering the ”dateTime” parameter, only the month, day and year of the start and end dates are required - the time (hour, minute and second) are set to midnight by default and cannot be changed. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_Server) GetFrontendIncomingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -9442,7 +9416,7 @@ func (r Hardware_Server) GetFrontendNetworkComponents() (resp []datatypes.Networ return } -// The '''getFrontendOutgoingBandwidth''' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ''dateTime'' parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). +// The ”'getFrontendOutgoingBandwidth”' method retrieves the amount of outgoing public network traffic used by a server between the given start and end date parameters. The ”dateTime” parameter requires only the day, month and year to be entered - the time (hour, minute and second) are set to midnight be default in order to gather the data for the entire start and end date indicated in the parameter. The amount of bandwidth retrieved is measured in gigabytes (GB). func (r Hardware_Server) GetFrontendOutgoingBandwidth(startDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Float64, err error) { params := []interface{}{ startDate, @@ -9533,7 +9507,7 @@ func (r Hardware_Server) GetHostIpsSoftwareComponent() (resp datatypes.Software_ return } -// The '''getHourlyBandwidth''' method retrieves all bandwidth updates hourly for the specified hardware. Because the potential number of data points can become excessive, the method limits the user to obtain data in 24-hour intervals. The required ''dateTime'' parameter is used as the starting point for the query and will be calculated for the 24-hour period starting with the specified date and time. For example, entering a parameter of +// The ”'getHourlyBandwidth”' method retrieves all bandwidth updates hourly for the specified hardware. Because the potential number of data points can become excessive, the method limits the user to obtain data in 24-hour intervals. The required ”dateTime” parameter is used as the starting point for the query and will be calculated for the 24-hour period starting with the specified date and time. For example, entering a parameter of // // '02/01/2008 0:00' // @@ -10006,7 +9980,6 @@ func (r Hardware_Server) GetPrivateVlan() (resp datatypes.Network_Vlan, err erro return } -// // *** DEPRECATED *** // Retrieve a backend network VLAN by searching for an IP address // Deprecated: This function has been marked as deprecated. @@ -10321,7 +10294,6 @@ func (r Hardware_Server) GetTopLevelLocation() (resp datatypes.Location, err err return } -// // This method will query transaction history for a piece of hardware. func (r Hardware_Server) GetTransactionHistory() (resp []datatypes.Provisioning_Version1_Transaction_History, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getTransactionHistory", nil, &r.Options, &resp) @@ -10451,7 +10423,7 @@ func (r Hardware_Server) GetWindowsUpdateStatus() (resp datatypes.Container_Util return } -// The '''importVirtualHost''' method attempts to import the host record for the virtualization platform running on a server. +// The ”'importVirtualHost”' method attempts to import the host record for the virtualization platform running on a server. func (r Hardware_Server) ImportVirtualHost() (resp datatypes.Virtual_Host, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "importVirtualHost", nil, &r.Options, &resp) return @@ -10481,7 +10453,7 @@ func (r Hardware_Server) IsPingable() (resp bool, err error) { return } -// Determine if the server runs any version of the Microsoft Windows operating systems. Return ''true'' if it does and ''false if otherwise. +// Determine if the server runs any version of the Microsoft Windows operating systems. Return ”true” if it does and ”false if otherwise. func (r Hardware_Server) IsWindowsServer() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "isWindowsServer", nil, &r.Options, &resp) return diff --git a/services/network.go b/services/network.go index 0ae8a40..c42aab4 100644 --- a/services/network.go +++ b/services/network.go @@ -71,23 +71,15 @@ func (r Network) Offset(offset int) Network { // Initiate the automated process to establish connectivity granting the account private back-end network access to the services available through IBM Cloud Service Endpoint. Once initiated, the configuration process occurs asynchronously in the background. // -// -// //

    Responses

    // // True The request to connect was successfully initiated. // // False The account and Service Endpoint networks are already connected. // -// -// //

    Exceptions

    // // SoftLayer_Exception_NotReady Thrown when the current network configuration will not support connection alteration. -// -// -// -// func (r Network) ConnectPrivateEndpointService() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network", "connectPrivateEndpointService", nil, &r.Options, &resp) return @@ -95,23 +87,15 @@ func (r Network) ConnectPrivateEndpointService() (resp bool, err error) { // Initiate the automated process to revoke mutual connectivity from the account network and IBM Cloud Service Endpoint network. Once initiated, the configuration process occurs asynchronously in the background. // -// -// //

    Responses

    // // True The request to disconnect was successfully initiated. // // False The account and Service Endpoint networks are already disconnected. // -// -// //

    Exceptions

    // // SoftLayer_Exception_NotReady Thrown when the current network configuration will not support connection alteration. -// -// -// -// func (r Network) DisconnectPrivateEndpointService() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network", "disconnectPrivateEndpointService", nil, &r.Options, &resp) return @@ -125,29 +109,21 @@ func (r Network) GetObject() (resp datatypes.Network, err error) { // Accessing select IBM Cloud services attached to the private back-end network is made possible by establishing a network relationship between an account's private network and the Service Endpoint network. // -// -// //

    Responses

    // // True The account and Service Endpoint networks are currently connected. // // False The account and Service Endpoint networks are not connected; both networks are properly configured to connect. // -// -// //

    Exceptions

    // // SoftLayer_Exception_NotReady Thrown when the current network configuration will not support connection alteration. -// -// -// -// func (r Network) IsConnectedToPrivateEndpointService() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network", "isConnectedToPrivateEndpointService", nil, &r.Options, &resp) return } -// The SoftLayer_Network_Application_Delivery_Controller data type models a single instance of an application delivery controller. Local properties are read only, except for a ''notes'' property, which can be used to describe your application delivery controller service. The type's relational properties provide more information to the service's function and login information to the controller's backend management if advanced view is enabled. +// The SoftLayer_Network_Application_Delivery_Controller data type models a single instance of an application delivery controller. Local properties are read only, except for a ”notes” property, which can be used to describe your application delivery controller service. The type's relational properties provide more information to the service's function and login information to the controller's backend management if advanced view is enabled. type Network_Application_Delivery_Controller struct { Session *session.Session Options sl.Options @@ -187,7 +163,7 @@ func (r Network_Application_Delivery_Controller) Offset(offset int) Network_Appl return r } -// Create or add to an application delivery controller based load balancer service. The loadBalancer parameter must have its ''name'', ''type'', ''sourcePort'', and ''virtualIpAddress'' properties populated. Changes are reflected immediately in the application delivery controller. +// Create or add to an application delivery controller based load balancer service. The loadBalancer parameter must have its ”name”, ”type”, ”sourcePort”, and ”virtualIpAddress” properties populated. Changes are reflected immediately in the application delivery controller. func (r Network_Application_Delivery_Controller) CreateLiveLoadBalancer(loadBalancer *datatypes.Network_LoadBalancer_VirtualIpAddress) (resp bool, err error) { params := []interface{}{ loadBalancer, @@ -196,7 +172,7 @@ func (r Network_Application_Delivery_Controller) CreateLiveLoadBalancer(loadBala return } -// Remove a virtual IP address from an application delivery controller based load balancer. Only the ''name'' property in the loadBalancer parameter must be populated. Changes are reflected immediately in the application delivery controller. +// Remove a virtual IP address from an application delivery controller based load balancer. Only the ”name” property in the loadBalancer parameter must be populated. Changes are reflected immediately in the application delivery controller. func (r Network_Application_Delivery_Controller) DeleteLiveLoadBalancer(loadBalancer *datatypes.Network_LoadBalancer_VirtualIpAddress) (resp bool, err error) { params := []interface{}{ loadBalancer, @@ -205,7 +181,7 @@ func (r Network_Application_Delivery_Controller) DeleteLiveLoadBalancer(loadBala return } -// Remove an entire load balancer service, including all virtual IP addresses, from and application delivery controller based load balancer. The ''name'' property the and ''name'' property within the ''vip'' property of the service parameter must be provided. Changes are reflected immediately in the application delivery controller. +// Remove an entire load balancer service, including all virtual IP addresses, from and application delivery controller based load balancer. The ”name” property the and ”name” property within the ”vip” property of the service parameter must be provided. Changes are reflected immediately in the application delivery controller. func (r Network_Application_Delivery_Controller) DeleteLiveLoadBalancerService(service *datatypes.Network_LoadBalancer_Service) (err error) { var resp datatypes.Void params := []interface{}{ @@ -418,7 +394,7 @@ func (r Network_Application_Delivery_Controller) SaveCurrentConfiguration(notes return } -// Update the the virtual IP address interface within an application delivery controller based load balancer identified by the ''name'' property in the loadBalancer parameter. You only need to set the properties in the loadBalancer parameter that you wish to change. Any virtual IP properties omitted or left empty are ignored. Changes are reflected immediately in the application delivery controller. +// Update the the virtual IP address interface within an application delivery controller based load balancer identified by the ”name” property in the loadBalancer parameter. You only need to set the properties in the loadBalancer parameter that you wish to change. Any virtual IP properties omitted or left empty are ignored. Changes are reflected immediately in the application delivery controller. func (r Network_Application_Delivery_Controller) UpdateLiveLoadBalancer(loadBalancer *datatypes.Network_LoadBalancer_VirtualIpAddress) (resp bool, err error) { params := []interface{}{ loadBalancer, @@ -3167,7 +3143,6 @@ func (r Network_Component) GetObject() (resp datatypes.Network_Component, err er return } -// // **DEPRECATED - This operation will cease to function after April 4th, 2016 and will be removed from v3.2** // Retrieve various network statistics. The network statistics are retrieved from the network device using snmpget. Below is a list of statistics retrieved: // * Administrative Status @@ -3811,7 +3786,7 @@ func (r Network_Firewall_Template) Offset(offset int) Network_Firewall_Template // Get all available firewall template objects. // -// ''getAllObjects'' returns an array of SoftLayer_Network_Firewall_Template objects upon success. +// ”getAllObjects” returns an array of SoftLayer_Network_Firewall_Template objects upon success. func (r Network_Firewall_Template) GetAllObjects() (resp []datatypes.Network_Firewall_Template, err error) { err = r.Session.DoRequest("SoftLayer_Network_Firewall_Template", "getAllObjects", nil, &r.Options, &resp) return @@ -3873,7 +3848,7 @@ func (r Network_Firewall_Update_Request) Offset(offset int) Network_Firewall_Upd // Create a new firewall update request. If the SoftLayer_Network_Firewall_Update_Request object passed to this function has no rule, the firewall be set to bypass state and all the existing firewall rule(s) will be deleted. // -// ''createObject'' returns a Boolean ''true'' on successful object creation or ''false'' if your firewall update request was unable to be created. +// ”createObject” returns a Boolean ”true” on successful object creation or ”false” if your firewall update request was unable to be created. func (r Network_Firewall_Update_Request) CreateObject(templateObject *datatypes.Network_Firewall_Update_Request) (resp datatypes.Network_Firewall_Update_Request, err error) { params := []interface{}{ templateObject, @@ -3890,7 +3865,7 @@ func (r Network_Firewall_Update_Request) GetAuthorizingUser() (resp datatypes.Us // Get the possible attribute values for a firewall update request rule. These are the valid values which may be submitted as rule parameters for a firewall update request. // -// ''getFirewallUpdateRequestRuleAttributes'' returns a SoftLayer_Container_Utility_Network_Firewall_Rule_Attribute object upon success. +// ”getFirewallUpdateRequestRuleAttributes” returns a SoftLayer_Container_Utility_Network_Firewall_Rule_Attribute object upon success. func (r Network_Firewall_Update_Request) GetFirewallUpdateRequestRuleAttributes() (resp datatypes.Container_Utility_Network_Firewall_Rule_Attribute, err error) { err = r.Session.DoRequest("SoftLayer_Network_Firewall_Update_Request", "getFirewallUpdateRequestRuleAttributes", nil, &r.Options, &resp) return @@ -3914,7 +3889,7 @@ func (r Network_Firewall_Update_Request) GetNetworkComponentFirewall() (resp dat return } -// ''getObject'' returns a SoftLayer_Network_Firewall_Update_Request object. You can only get historical objects for servers attached to your account that have a network firewall enabled. ''createObject'' inserts a new SoftLayer_Network_Firewall_Update_Request object. You can only insert requests for servers attached to your account that have a network firewall enabled. ''getFirewallUpdateRequestRuleAttributes'' Get the possible attribute values for a firewall update request rule. +// ”getObject” returns a SoftLayer_Network_Firewall_Update_Request object. You can only get historical objects for servers attached to your account that have a network firewall enabled. ”createObject” inserts a new SoftLayer_Network_Firewall_Update_Request object. You can only insert requests for servers attached to your account that have a network firewall enabled. ”getFirewallUpdateRequestRuleAttributes” Get the possible attribute values for a firewall update request rule. func (r Network_Firewall_Update_Request) GetObject() (resp datatypes.Network_Firewall_Update_Request, err error) { err = r.Session.DoRequest("SoftLayer_Network_Firewall_Update_Request", "getObject", nil, &r.Options, &resp) return @@ -3978,7 +3953,7 @@ func (r Network_Firewall_Update_Request_Rule) Offset(offset int) Network_Firewal // Create a new firewall update request. The SoftLayer_Network_Firewall_Update_Request object passed to this function must have at least one rule. // -// ''createObject'' returns a Boolean ''true'' on successful object creation or ''false'' if your firewall update request was unable to be created.. +// ”createObject” returns a Boolean ”true” on successful object creation or ”false” if your firewall update request was unable to be created.. func (r Network_Firewall_Update_Request_Rule) CreateObject(templateObject *datatypes.Network_Firewall_Update_Request_Rule) (resp datatypes.Network_Firewall_Update_Request_Rule, err error) { params := []interface{}{ templateObject, @@ -4071,8 +4046,6 @@ func (r Network_Gateway) BypassVlans(vlans []datatypes.Network_Gateway_Vlan) (er } // Used to create a transaction to upgrade or rollback the vSRX version for Juniper gateway. -// -// func (r Network_Gateway) ChangeGatewayVersion(versionId *int, rollbackVersion *bool) (resp bool, err error) { params := []interface{}{ versionId, @@ -4111,8 +4084,6 @@ func (r Network_Gateway) EditObject(templateObject *datatypes.Network_Gateway) ( } // Purpose is to rebuild the target Gateway cluster with the specified OS price id. Method will remove the current OS and apply the default vSRX configuration settings. This will result in an extended OUTAGE!! Any custom configuration settings must be re-applied after the forced rebuild is completed. This is a DESTRUCTIVE action, use with caution. -// -// func (r Network_Gateway) ForceRebuildvSRXCluster(osPriceId *int) (resp bool, err error) { params := []interface{}{ osPriceId, @@ -4128,8 +4099,6 @@ func (r Network_Gateway) GetAccount() (resp datatypes.Account, err error) { } // Used to get a list of OS prices (ids) which are allowed for the Gateway. -// -// func (r Network_Gateway) GetAllowedOsPriceIds(memberId *int) (resp []int, err error) { params := []interface{}{ memberId, @@ -4139,8 +4108,6 @@ func (r Network_Gateway) GetAllowedOsPriceIds(memberId *int) (resp []int, err er } // Returns the Gbps capacity of the gateway object -// -// func (r Network_Gateway) GetCapacity() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getCapacity", nil, &r.Options, &resp) return @@ -4153,8 +4120,6 @@ func (r Network_Gateway) GetInsideVlans() (resp []datatypes.Network_Gateway_Vlan } // Returns manufacturer name for a given gateway object. -// -// func (r Network_Gateway) GetManufacturer(checkSameOs *bool, checkOsReloadMember *bool) (resp string, err error) { params := []interface{}{ checkSameOs, @@ -4165,8 +4130,6 @@ func (r Network_Gateway) GetManufacturer(checkSameOs *bool, checkOsReloadMember } // Returns true if no mismatch is found, gateway is not Juniper vSRX or SA gateway -// -// func (r Network_Gateway) GetMemberGatewayImagesMatch() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getMemberGatewayImagesMatch", nil, &r.Options, &resp) return @@ -4233,8 +4196,6 @@ func (r Network_Gateway) GetPublicVlan() (resp datatypes.Network_Vlan, err error } // Returns the following statuses SUPPORTED - rollback is supported and perform automatically UNSUPPORTED - rollback is not supported MANUAL - rollback can be performed but -// -// func (r Network_Gateway) GetRollbackSupport() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getRollbackSupport", nil, &r.Options, &resp) return @@ -4271,32 +4232,24 @@ func (r Network_Gateway) IsLicenseServerAllowed(licenseKeyName *string) (resp bo } // Returns true if rollback is allowed. -// -// func (r Network_Gateway) IsRollbackAllowed() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway", "isRollbackAllowed", nil, &r.Options, &resp) return } // Rebuild a vSRX gateway with HA cluster by destroying existing vSRX and installing new vSRX on both gateway servers, then creating HA cluster between 2 vSRX. This is a destructive process which will remove existing vSRX configuration and stop all gateway capabilities. vSRX will need to be re-configured after this operation. -// -// func (r Network_Gateway) RebuildvSRXHACluster() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway", "rebuildvSRXHACluster", nil, &r.Options, &resp) return } // Used to refresh the license for the Juniper Gateway, requires License readiness check has passed. -// -// func (r Network_Gateway) RefreshGatewayLicense() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Gateway", "refreshGatewayLicense", nil, &r.Options, &resp) return } // Returns true if password change is successful, false if not successful -// -// func (r Network_Gateway) SetGatewayPassword(password *string) (resp bool, err error) { params := []interface{}{ password, @@ -4327,8 +4280,6 @@ func (r Network_Gateway) UnbypassVlans(vlans []datatypes.Network_Gateway_Vlan) ( // The 'username' and 'password' in the record template are required. 'username' must not be blank and must exist in the Gateway password records 'password' must not be blank // // Returns true if password change is successful, false if not successful -// -// func (r Network_Gateway) UpdateGatewayUserPassword(record *datatypes.Network_Gateway_Member_Passwords) (resp bool, err error) { params := []interface{}{ record, @@ -4549,11 +4500,7 @@ func (r Network_Gateway_Precheck) GetObject() (resp datatypes.Network_Gateway_Pr // // Current categories include: upgrade_precheck : Required for major and minor upgrade version actions. license_precheck : Required for license upgrade and downgrade actions. reload_precheck : Required for OS Reload action. rollback_precheck : Optional and related to upgrade_precheck. Only returned if getRollbackPrecheck is provided and set to True (1). // -// -// // memberId : Integer : The softlayer member id. memberReadinessValue : String : The precheck readiness state for the member. See possible readiness values above. gatewayReadinessValue : String : The precheck readiness state for the gateway : See possible readiness values above. returnCode : Integer : The return code. 0 if no error. Reference cloud.ibm.com documentation for details. -// -// func (r Network_Gateway_Precheck) GetPrecheckStatus(gatewayId *int, getRollbackPrecheck *bool) (resp []datatypes.Network_Gateway_Precheck, err error) { params := []interface{}{ gatewayId, @@ -4564,8 +4511,6 @@ func (r Network_Gateway_Precheck) GetPrecheckStatus(gatewayId *int, getRollbackP } // Used to create a License Management Network Gateway Precheck transaction. -// -// func (r Network_Gateway_Precheck) LicenseManagementPrecheck(gatewayId *int) (resp bool, err error) { params := []interface{}{ gatewayId, @@ -4575,8 +4520,6 @@ func (r Network_Gateway_Precheck) LicenseManagementPrecheck(gatewayId *int) (res } // Create an OS Reload Network Gateway Precheck transaction. -// -// func (r Network_Gateway_Precheck) OsReloadPrecheck(gatewayId *int) (resp bool, err error) { params := []interface{}{ gatewayId, @@ -4586,8 +4529,6 @@ func (r Network_Gateway_Precheck) OsReloadPrecheck(gatewayId *int) (resp bool, e } // Create a Upgrade Network Gateway Precheck transaction. -// -// func (r Network_Gateway_Precheck) UpgradePrecheck(gatewayId *int) (resp bool, err error) { params := []interface{}{ gatewayId, @@ -4707,8 +4648,6 @@ func (r Network_Gateway_VersionUpgrade) GetObject() (resp datatypes.Network_Gate } // Used to get a list per package of prices ids for allowed vSRX OS-es for new orders. -// -// func (r Network_Gateway_VersionUpgrade) GetVsrxOrdersAllowedOS(accountId *int, validate *bool) (resp []datatypes.Product_Package_Item_Prices, err error) { params := []interface{}{ accountId, @@ -5594,8 +5533,6 @@ func (r Network_LBaaS_LoadBalancer) GetL7Pools() (resp []datatypes.Network_LBaaS } // Return listener time series datapoints. The time series data is available for Throughput, ConnectionRate and ActiveConnections. Throughput is in bits per second. The values are an average over the time range. The time series data is available for 1hour, 6hours, 12hours, 1day, 1week or 2weeks. -// -// func (r Network_LBaaS_LoadBalancer) GetListenerTimeSeriesData(loadBalancerUuid *string, metricName *string, timeRange *string, listenerUuid *string) (resp []datatypes.Network_LBaaS_LoadBalancerMonitoringMetricDataPoint, err error) { params := []interface{}{ loadBalancerUuid, @@ -5764,8 +5701,6 @@ func (r Network_LBaaS_Member) UpdateLoadBalancerMembers(loadBalancerUuid *string } // The SoftLayer_Network_LBaaS_SSLCipher type presents a structure that contains attributes of load balancer cipher suites. -// -// type Network_LBaaS_SSLCipher struct { Session *session.Session Options sl.Options @@ -6058,7 +5993,6 @@ func (r Network_LoadBalancer_Service) GetObject() (resp datatypes.Network_LoadBa // // Possible values for "Label" are: // -// // * IP Address // * Port // * Server Status @@ -6066,7 +6000,6 @@ func (r Network_LoadBalancer_Service) GetObject() (resp datatypes.Network_LoadBa // * Current Connections // * Total Hits // -// // Not all labels are guaranteed to be returned. func (r Network_LoadBalancer_Service) GetStatus() (resp []datatypes.Container_Network_LoadBalancer_StatusEntry, err error) { err = r.Session.DoRequest("SoftLayer_Network_LoadBalancer_Service", "getStatus", nil, &r.Options, &resp) @@ -6242,7 +6175,7 @@ func (r Network_Media_Transcode_Account) CreateTranscodeAccount() (resp bool, er return } -// '''Note'''. This method is obsolete. Please use the [[SoftLayer_Network_Media_Transcode_Job::createObject|createObject]] method on SoftLayer_Network_Media_Transcode_Job object instead. SoftLayer_Network_Media_Transcode_Job::createObject returns an object of a newly created Transcode Job. +// ”'Note”'. This method is obsolete. Please use the [[SoftLayer_Network_Media_Transcode_Job::createObject|createObject]] method on SoftLayer_Network_Media_Transcode_Job object instead. SoftLayer_Network_Media_Transcode_Job::createObject returns an object of a newly created Transcode Job. // // With this method, you can create a transcode job. // @@ -6254,21 +6187,17 @@ func (r Network_Media_Transcode_Account) CreateTranscodeAccount() (resp bool, er // // An example SoftLayer_Network_Media_Transcode_Job parameter looks like this: // -// // * name: My transcoding // * transcodePresetName: F4V 896kbps 640x352 16x9 29.97fps // * transcodePresetGuid: {87E01268-C3E3-4A85-9701-052C9AC42BD4} // * inputFile: /in/my_birthday.wmv // * outputFile: /out/my_birthday_flash // -// // Notice that an output file does not have a file extension. The Transcode server will append a file extension based on an output format. A newly created transcode job will be in "Pending" status and it will be added to the Transcoding queue. You will receive a notification email whenever there is a status change on your transcode job. For example, the Transcode server starts to process your transcode job, you will be notified via an email. // // You can add up to 3 pending jobs at a time. Transcode jobs with any other status such as "Complete" or "Error" will not be counted toward your pending jobs. // // Once a job is complete, the Transcode server will place the output file into the /out directory along with a notification email. The files in the /out directory will be removed 3 days after they were created. You will need to use an FTP client to download transcoded files. -// -// func (r Network_Media_Transcode_Account) CreateTranscodeJob(newJob *datatypes.Network_Media_Transcode_Job) (resp bool, err error) { params := []interface{}{ newJob, @@ -6387,21 +6316,17 @@ func (r Network_Media_Transcode_Job) Offset(offset int) Network_Media_Transcode_ // // An example SoftLayer_Network_Media_Transcode_Job parameter looks like this: // -// // * name: My transcoding // * transcodePresetName: F4V 896kbps 640x352 16x9 29.97fps // * transcodePresetGuid: {87E01268-C3E3-4A85-9701-052C9AC42BD4} // * inputFile: /in/my_birthday.wmv // * outputFile: /out/my_birthday_flash // -// // Notice that an output file does not have a file extension. The Transcode server will append a file extension based on an output format. A newly created transcode job will be in "Pending" status and it will be added to the Transcoding queue. You will receive a notification email whenever there is a status change on your transcode job. For example, the Transcode server starts to process your transcode job, you will be notified via an email. // // You can add up to 3 pending jobs at a time. Transcode jobs with any other status such as "Complete" or "Error" will not be counted toward your pending jobs. // // Once a job is complete, the Transcode server will place the output file into the /out directory along with a notification email. The files in the /out directory will be removed 3 days after they were created. You will need to use an FTP client to download transcoded files. -// -// func (r Network_Media_Transcode_Job) CreateObject(templateObject *datatypes.Network_Media_Transcode_Job) (resp datatypes.Network_Media_Transcode_Job, err error) { params := []interface{}{ templateObject, @@ -6966,7 +6891,6 @@ func (r Network_Monitor_Version1_Query_Host) GetResponseAction() (resp datatypes // # monitorLevel determines the highest level of SoftLayer_Network_Monitor_Version1_Query_Type object that can be placed in a monitoring instance on this server // # responseLevel determines the highest level of SoftLayer_Network_Monitor_Version1_Query_ResponseType object that can be placed in a monitoring instance on this server // -// // Also note that the query type and response types are available through getAllQueryTypes and getAllResponseTypes, respectively. type Network_Monitor_Version1_Query_Host_Stratum struct { Session *session.Session @@ -7071,7 +6995,7 @@ func (r Network_Pod) Offset(offset int) Network_Pod { return r } -// Filtering is supported for ``datacenterName`` and ``capabilities``. When filtering on capabilities, use the ``in`` operation. Pods fulfilling all capabilities provided will be returned. ``datacenterName`` represents an operation against ``SoftLayer_Location_Datacenter.name`, such as dal05 when referring to Dallas 5. +// Filtering is supported for “datacenterName“ and “capabilities“. When filtering on capabilities, use the “in“ operation. Pods fulfilling all capabilities provided will be returned. “datacenterName“ represents an operation against “SoftLayer_Location_Datacenter.name`, such as dal05 when referring to Dallas 5. // // ```Examples:``` // @@ -7091,7 +7015,7 @@ func (r Network_Pod) GetCapabilities() (resp []string, err error) { return } -// Set the initialization parameter to the ``name`` of the Pod to retrieve. +// Set the initialization parameter to the “name“ of the Pod to retrieve. func (r Network_Pod) GetObject() (resp datatypes.Network_Pod, err error) { err = r.Session.DoRequest("SoftLayer_Network_Pod", "getObject", nil, &r.Options, &resp) return @@ -7796,9 +7720,9 @@ func (r Network_Storage) DeleteFolder(folder *string) (resp bool, err error) { return } -// Delete a network storage volume. '''This cannot be undone.''' At this time only network storage snapshots may be deleted with this method. +// Delete a network storage volume. ”'This cannot be undone.”' At this time only network storage snapshots may be deleted with this method. // -// ''deleteObject'' returns Boolean ''true'' on successful deletion or ''false'' if it was unable to remove a volume; +// ”deleteObject” returns Boolean ”true” on successful deletion or ”false” if it was unable to remove a volume; func (r Network_Storage) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "deleteObject", nil, &r.Options, &resp) return @@ -8030,7 +7954,7 @@ func (r Network_Storage) GetBillingItemCategory() (resp datatypes.Product_Item_C return } -// Retrieve network storage accounts by username and storage account type. Use this method if you wish to retrieve a storage record by username rather than by id. The ''type'' parameter must correspond to one of the available ''nasType'' values in the SoftLayer_Network_Storage data type. +// Retrieve network storage accounts by username and storage account type. Use this method if you wish to retrieve a storage record by username rather than by id. The ”type” parameter must correspond to one of the available ”nasType” values in the SoftLayer_Network_Storage data type. func (r Network_Storage) GetByUsername(username *string, typ *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ username, @@ -8112,9 +8036,6 @@ func (r Network_Storage) GetFailoverNotAllowed() (resp string, err error) { return } -// -// -// func (r Network_Storage) GetFileBlockEncryptedLocations() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage", "getFileBlockEncryptedLocations", nil, &r.Options, &resp) return @@ -8960,10 +8881,10 @@ func (r Network_Storage) UpgradeVolumeCapacity(itemId *int) (resp bool, err erro // {{CloudLayerOnlyMethod}} Upload a file to a Storage account's root directory. Once uploaded, this method returns new file entity identifier for the upload file. // -// The following properties are required in the ''file'' parameter. -// *'''name''': The name of the file you wish to upload -// *'''content''': The raw contents of the file you wish to upload. -// *'''contentType''': The MIME-type of content that you wish to upload. +// The following properties are required in the ”file” parameter. +// *”'name”': The name of the file you wish to upload +// *”'content”': The raw contents of the file you wish to upload. +// *”'contentType”': The MIME-type of content that you wish to upload. func (r Network_Storage) UploadFile(file *datatypes.Container_Utility_File_Entity) (resp datatypes.Container_Utility_File_Entity, err error) { params := []interface{}{ file, @@ -10040,9 +9961,9 @@ func (r Network_Storage_Backup_Evault) DeleteFolder(folder *string) (resp bool, return } -// Delete a network storage volume. '''This cannot be undone.''' At this time only network storage snapshots may be deleted with this method. +// Delete a network storage volume. ”'This cannot be undone.”' At this time only network storage snapshots may be deleted with this method. // -// ''deleteObject'' returns Boolean ''true'' on successful deletion or ''false'' if it was unable to remove a volume; +// ”deleteObject” returns Boolean ”true” on successful deletion or ”false” if it was unable to remove a volume; func (r Network_Storage_Backup_Evault) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "deleteObject", nil, &r.Options, &resp) return @@ -10051,8 +9972,6 @@ func (r Network_Storage_Backup_Evault) DeleteObject() (resp bool, err error) { // This method can be used to help maintain the storage space on a vault. When a job is removed from the Webcc, the task and stored usage still exists on the vault. This method can be used to delete the associated task and its usage. // // All that is required for the use of the method is to pass in an integer array of task(s). -// -// func (r Network_Storage_Backup_Evault) DeleteTasks(tasks []int) (resp bool, err error) { params := []interface{}{ tasks, @@ -10287,7 +10206,7 @@ func (r Network_Storage_Backup_Evault) GetBillingItemCategory() (resp datatypes. return } -// Retrieve network storage accounts by username and storage account type. Use this method if you wish to retrieve a storage record by username rather than by id. The ''type'' parameter must correspond to one of the available ''nasType'' values in the SoftLayer_Network_Storage data type. +// Retrieve network storage accounts by username and storage account type. Use this method if you wish to retrieve a storage record by username rather than by id. The ”type” parameter must correspond to one of the available ”nasType” values in the SoftLayer_Network_Storage data type. func (r Network_Storage_Backup_Evault) GetByUsername(username *string, typ *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ username, @@ -10369,9 +10288,6 @@ func (r Network_Storage_Backup_Evault) GetFailoverNotAllowed() (resp string, err return } -// -// -// func (r Network_Storage_Backup_Evault) GetFileBlockEncryptedLocations() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getFileBlockEncryptedLocations", nil, &r.Options, &resp) return @@ -10451,11 +10367,7 @@ func (r Network_Storage_Backup_Evault) GetHardware() (resp datatypes.Hardware, e return } -// Retrieve a list of hardware associated with a SoftLayer customer account, placing all hardware with associated EVault storage accounts at the beginning of the list. The return type is SoftLayer_Hardware_Server[] contains the results; the number of items returned in the result will be returned in the soap header (totalItems). ''getHardwareWithEvaultFirst'' is useful in situations where you wish to search for hardware and provide paginated output. -// -// -// -// +// Retrieve a list of hardware associated with a SoftLayer customer account, placing all hardware with associated EVault storage accounts at the beginning of the list. The return type is SoftLayer_Hardware_Server[] contains the results; the number of items returned in the result will be returned in the soap header (totalItems). ”getHardwareWithEvaultFirst” is useful in situations where you wish to search for hardware and provide paginated output. // // Results are only returned for hardware belonging to the account of the user making the API call. // @@ -11256,10 +11168,10 @@ func (r Network_Storage_Backup_Evault) UpgradeVolumeCapacity(itemId *int) (resp // {{CloudLayerOnlyMethod}} Upload a file to a Storage account's root directory. Once uploaded, this method returns new file entity identifier for the upload file. // -// The following properties are required in the ''file'' parameter. -// *'''name''': The name of the file you wish to upload -// *'''content''': The raw contents of the file you wish to upload. -// *'''contentType''': The MIME-type of content that you wish to upload. +// The following properties are required in the ”file” parameter. +// *”'name”': The name of the file you wish to upload +// *”'content”': The raw contents of the file you wish to upload. +// *”'contentType”': The MIME-type of content that you wish to upload. func (r Network_Storage_Backup_Evault) UploadFile(file *datatypes.Container_Utility_File_Entity) (resp datatypes.Container_Utility_File_Entity, err error) { params := []interface{}{ file, @@ -11956,13 +11868,9 @@ func (r Network_Storage_Hub_Cleversafe_Account) GetCapacityUsage() (resp int, er // // [ , ] // -// -// // { "start": "", "errors": [], "end": "", "resource_type": "account", "warnings": [], "resources": [{"metrics" : [{"name": "retrieval", "value": ""}]}] } // // Notes: 1) When no data is found for a particular triplet (resource_id, storage_location, storage_class) a JSON element is inserted to the warnings Array. 2) If all queried triplets find data, only the resources Array will be populated, errors and warnings will remain empty. -// -// func (r Network_Storage_Hub_Cleversafe_Account) GetCloudObjectStorageMetrics(start *string, end *string, storageLocation *string, storageClass *string, metrics *string) (resp []string, err error) { params := []interface{}{ start, @@ -12485,9 +12393,9 @@ func (r Network_Storage_Iscsi) DeleteFolder(folder *string) (resp bool, err erro return } -// Delete a network storage volume. '''This cannot be undone.''' At this time only network storage snapshots may be deleted with this method. +// Delete a network storage volume. ”'This cannot be undone.”' At this time only network storage snapshots may be deleted with this method. // -// ''deleteObject'' returns Boolean ''true'' on successful deletion or ''false'' if it was unable to remove a volume; +// ”deleteObject” returns Boolean ”true” on successful deletion or ”false” if it was unable to remove a volume; func (r Network_Storage_Iscsi) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "deleteObject", nil, &r.Options, &resp) return @@ -12719,7 +12627,7 @@ func (r Network_Storage_Iscsi) GetBillingItemCategory() (resp datatypes.Product_ return } -// Retrieve network storage accounts by username and storage account type. Use this method if you wish to retrieve a storage record by username rather than by id. The ''type'' parameter must correspond to one of the available ''nasType'' values in the SoftLayer_Network_Storage data type. +// Retrieve network storage accounts by username and storage account type. Use this method if you wish to retrieve a storage record by username rather than by id. The ”type” parameter must correspond to one of the available ”nasType” values in the SoftLayer_Network_Storage data type. func (r Network_Storage_Iscsi) GetByUsername(username *string, typ *string) (resp []datatypes.Network_Storage, err error) { params := []interface{}{ username, @@ -12801,9 +12709,6 @@ func (r Network_Storage_Iscsi) GetFailoverNotAllowed() (resp string, err error) return } -// -// -// func (r Network_Storage_Iscsi) GetFileBlockEncryptedLocations() (resp []datatypes.Location, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getFileBlockEncryptedLocations", nil, &r.Options, &resp) return @@ -13647,10 +13552,10 @@ func (r Network_Storage_Iscsi) UpgradeVolumeCapacity(itemId *int) (resp bool, er // {{CloudLayerOnlyMethod}} Upload a file to a Storage account's root directory. Once uploaded, this method returns new file entity identifier for the upload file. // -// The following properties are required in the ''file'' parameter. -// *'''name''': The name of the file you wish to upload -// *'''content''': The raw contents of the file you wish to upload. -// *'''contentType''': The MIME-type of content that you wish to upload. +// The following properties are required in the ”file” parameter. +// *”'name”': The name of the file you wish to upload +// *”'content”': The raw contents of the file you wish to upload. +// *”'contentType”': The MIME-type of content that you wish to upload. func (r Network_Storage_Iscsi) UploadFile(file *datatypes.Container_Utility_File_Entity) (resp datatypes.Container_Utility_File_Entity, err error) { params := []interface{}{ file, @@ -14100,7 +14005,7 @@ func (r Network_Storage_Schedule) CreateObject(templateObject *datatypes.Network return } -// Delete a network storage schedule. '''This cannot be undone.''' ''deleteObject'' returns Boolean ''true'' on successful deletion or ''false'' if it was unable to remove a schedule; +// Delete a network storage schedule. ”'This cannot be undone.”' ”deleteObject” returns Boolean ”true” on successful deletion or ”false” if it was unable to remove a schedule; func (r Network_Storage_Schedule) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "deleteObject", nil, &r.Options, &resp) return @@ -14331,9 +14236,9 @@ func (r Network_Subnet) AllowAccessToNetworkStorageList(networkStorageTemplateOb // This interface allows you to remove the route of your secondary subnets. The result will be a subnet that is no longer routed on the network. Remove the route of subnets you are not actively using, as it will make it easier to identify available subnets later. // -// '''Important:''' When removing the route of ''Portable'' subnets, know that any subnet depending on an IP address provided by the Portable subnet will also have their routes removed! +// ”'Important:”' When removing the route of ”Portable” subnets, know that any subnet depending on an IP address provided by the Portable subnet will also have their routes removed! // -// To review what subnets are routed to IP addresses provided by a ''Portable'' subnet, you can utilize the following object mask: 'mask[ipAddresses[endpointSubnets]]'. Any subnet present in conjunction with ''endpointSubnets'' is a subnet which depends on the respective IP address. +// To review what subnets are routed to IP addresses provided by a ”Portable” subnet, you can utilize the following object mask: 'mask[ipAddresses[endpointSubnets]]'. Any subnet present in conjunction with ”endpointSubnets” is a subnet which depends on the respective IP address. // // The behavior of this interface is such that either true or false is returned. A result of false can be interpreted as the clear route request having already been completed. In contrast, a result of true means the subnet is currently routed and will be transitioned. This route change is asynchronous to the request. A response of true does not mean the subnet's route has changed, but simply that it will change. In order to monitor for the completion of the change, you may either attempt a clear route again until the result is false, or monitor one or more SoftLayer_Network_Subnet properties: subnetType, networkVlanId, and or endPointIpAddress to determine if routing of the subnet has been removed. func (r Network_Subnet) ClearRoute() (resp bool, err error) { @@ -14347,7 +14252,6 @@ func (r Network_Subnet) CreateReverseDomainRecords() (resp datatypes.Dns_Domain_ return } -// // ***DEPRECATED*** // This endpoint is deprecated in favor of the more expressive and capable SoftLayer_Network_Subnet::route, to which this endpoint now proxies. Refer to it for more information. // @@ -14361,7 +14265,6 @@ func (r Network_Subnet) CreateSubnetRouteUpdateTransaction(newEndPointIpAddress return } -// // ***DEPRECATED*** // This function is used to create a new SoftLayer SWIP transaction to register your RWHOIS data with ARIN. SWIP transactions can only be initiated on subnets that contain more than 8 IP addresses. // Deprecated: This function has been marked as deprecated. @@ -14379,7 +14282,6 @@ func (r Network_Subnet) EditNote(note *string) (resp bool, err error) { return } -// // ***DEPRECATED*** // Retrieve a list of a SoftLayer customer's subnets along with their SWIP transaction statuses. This is a shortcut method that combines the SoftLayer_Network_Subnet retrieval methods along with [[object masks]] to retrieve their subnets' associated SWIP transactions as well. // @@ -14684,13 +14586,13 @@ func (r Network_Subnet) RemoveAccessToNetworkStorageList(networkStorageTemplateO // // For each identifier type, one or more 'identifier' formats are possible. // -// ''SoftLayer_Network_Subnet_IpAddress'' will accept the following identifier formats:
    • An entirely numeric value will be treated as a SoftLayer_Network_Subnet_IpAddress.id value of the desired IP address object.
    • A dotted-quad IPv4 address.
    • A full or compressed IPv6 address.
    +// ”SoftLayer_Network_Subnet_IpAddress” will accept the following identifier formats:
    • An entirely numeric value will be treated as a SoftLayer_Network_Subnet_IpAddress.id value of the desired IP address object.
    • A dotted-quad IPv4 address.
    • A full or compressed IPv6 address.
    // -// ''SoftLayer_Network_Vlan'' will accept the following identifier formats:
    • An entirely numeric value will be treated as a SoftLayer_Network_Vlan.id value of the desired VLAN object.
    • A semantic VLAN identifier of the form <data center short name>.<router>.<vlan number>, where < and > are literal, eg. dal13.fcr01.1234 - the router name may optionally contain the 'a' or 'b' redundancy qualifier (which has no meaning in this context).
    +// ”SoftLayer_Network_Vlan” will accept the following identifier formats:
    • An entirely numeric value will be treated as a SoftLayer_Network_Vlan.id value of the desired VLAN object.
    • A semantic VLAN identifier of the form <data center short name>.<router>.<vlan number>, where < and > are literal, eg. dal13.fcr01.1234 - the router name may optionally contain the 'a' or 'b' redundancy qualifier (which has no meaning in this context).
    // -// ''SoftLayer_Hardware_Server'' will accept the following identifier formats:
    • An entirely numeric value will be treated as a SoftLayer_Hardware_Server.id value of the desired server.
    • A UUID corresponding to a server's SoftLayer_Hardware_Server.globalIdentifier.
    • A value corresponding to a unique SoftLayer_Hardware_Server.hostname.
    • A value corresponding to a unique fully-qualified domain name in the format 'hostname<domain>' where < and > are literal, e.g. myhost<mydomain.com>, hostname refers to SoftLayer_Hardware_Server.hostname and domain to SoftLayer_Hardware_Server.domain, respectively.
    +// ”SoftLayer_Hardware_Server” will accept the following identifier formats:
    • An entirely numeric value will be treated as a SoftLayer_Hardware_Server.id value of the desired server.
    • A UUID corresponding to a server's SoftLayer_Hardware_Server.globalIdentifier.
    • A value corresponding to a unique SoftLayer_Hardware_Server.hostname.
    • A value corresponding to a unique fully-qualified domain name in the format 'hostname<domain>' where < and > are literal, e.g. myhost<mydomain.com>, hostname refers to SoftLayer_Hardware_Server.hostname and domain to SoftLayer_Hardware_Server.domain, respectively.
    // -// ''SoftLayer_Virtual_Guest'' will accept the following identifier formats:
    • An entirely numeric value will be treated as a SoftLayer_Virtual_Guest.id value of the desired server.
    • A UUID corresponding to a server's SoftLayer_Virtual_Guest.globalIdentifier.
    • A value corresponding to a unique SoftLayer_Virtual_Guest.hostname.
    • A value corresponding to a unique fully-qualified domain name in the format 'hostname<domain>' where < and > are literal, e.g. myhost<mydomain.com>, hostname refers to SoftLayer_Virtual_Guest.hostname and domain to SoftLayer_Virtual_Guest.domain, respectively.
    +// ”SoftLayer_Virtual_Guest” will accept the following identifier formats:
    • An entirely numeric value will be treated as a SoftLayer_Virtual_Guest.id value of the desired server.
    • A UUID corresponding to a server's SoftLayer_Virtual_Guest.globalIdentifier.
    • A value corresponding to a unique SoftLayer_Virtual_Guest.hostname.
    • A value corresponding to a unique fully-qualified domain name in the format 'hostname<domain>' where < and > are literal, e.g. myhost<mydomain.com>, hostname refers to SoftLayer_Virtual_Guest.hostname and domain to SoftLayer_Virtual_Guest.domain, respectively.
    // // The routing destination result of specifying a SoftLayer_Hardware_Server or SoftLayer_Virtual_Guest type will be the primary IP address of the server for the same network segment the subnet is on. Thus, a public subnet will be routed to the server's public, primary IP address. Additionally, this IP address resolution will match the subnet's IP version; routing a IPv6 subnet to a server will result in selection of the primary IPv6 address of the respective network segment, if available. // @@ -15086,7 +14988,6 @@ func (r Network_Subnet_IpAddress_Global) GetObject() (resp datatypes.Network_Sub return } -// // ***DEPRECATED*** // This endpoint is deprecated in favor of the more expressive and capable SoftLayer_Network_Subnet::route, to which this endpoint now proxies. Refer to it for more information. // @@ -15100,7 +15001,6 @@ func (r Network_Subnet_IpAddress_Global) Route(newEndPointIpAddress *string) (re return } -// // ***DEPRECATED*** // This endpoint is deprecated in favor of SoftLayer_Network_Subnet::clearRoute, to which this endpoint now proxies. Refer to it for more information. // Deprecated: This function has been marked as deprecated. @@ -15157,19 +15057,17 @@ func (r Network_Subnet_Registration) ClearRegistration() (resp bool, err error) // Create registration with a global registrar to associate an assigned subnet with the provided contact details. // -// Contact information is provided in the form of a [[SoftLayer_Account_Regional_Registry_Detail|person detail record]], which reference can be provided when the registration is created or afterwards. Registrations without an associated person detail will remain in the ``OPEN`` status. To specify a person detail when creating a registration, the ``detailReferences`` property should be populated with a list item providing a ``detailId`` value referencing the [[SoftLayer_Account_Regional_Registry_Detail|person detail record]]. +// Contact information is provided in the form of a [[SoftLayer_Account_Regional_Registry_Detail|person detail record]], which reference can be provided when the registration is created or afterwards. Registrations without an associated person detail will remain in the “OPEN“ status. To specify a person detail when creating a registration, the “detailReferences“ property should be populated with a list item providing a “detailId“ value referencing the [[SoftLayer_Account_Regional_Registry_Detail|person detail record]]. // // The same applies to [[SoftLayer_Account_Regional_Registry_Detail|network detail records]], though these references need not be provided. The system will create a reference to the network described by the registration's subnet in the absence of a provided network detail reference. However, if a specific detail is referenced, it must describe the same subnet as the registration. // // A template containing the following properties will create a subnet registration: // -// // * networkIdentifier // * cidr // * detailReferences // -// -// ``networkIdentifier`` is the base address of the public, SoftLayer owned subnet which is being registered. ``cidr`` must be an integer representing the CIDR of the subnet to be registered. The ``networkIdentifier``/``cidr`` must represent an assigned subnet. ``detailReferences`` tie the registration to SoftLayer_Account_Regional_Registry_Detail objects. +// “networkIdentifier“ is the base address of the public, SoftLayer owned subnet which is being registered. “cidr“ must be an integer representing the CIDR of the subnet to be registered. The “networkIdentifier“/“cidr“ must represent an assigned subnet. “detailReferences“ tie the registration to SoftLayer_Account_Regional_Registry_Detail objects. func (r Network_Subnet_Registration) CreateObject(templateObject *datatypes.Network_Subnet_Registration) (resp datatypes.Network_Subnet_Registration, err error) { params := []interface{}{ templateObject, @@ -15462,11 +15360,9 @@ func (r Network_Subnet_Rwhois_Data) GetObject() (resp datatypes.Network_Subnet_R return } -// // **DEPRECATED** // The SoftLayer_Network_Subnet_Swip_Transaction data type contains basic information tracked at SoftLayer to allow automation of Swip creation, update, and removal requests. A specific transaction is attached to an accountId and a subnetId. This also contains a "Status Name" which tells the customer what the transaction is doing: // -// // * REQUEST QUEUED: Request is queued up to be sent to ARIN // * REQUEST SENT: The email request has been sent to ARIN // * REQUEST CONFIRMED: ARIN has confirmed that the request is good, and should be available in 24 hours @@ -15516,7 +15412,6 @@ func (r Network_Subnet_Swip_Transaction) Offset(offset int) Network_Subnet_Swip_ return r } -// // **DEPRECATED** // This function will return an array of SoftLayer_Network_Subnet_Swip_Transaction objects, one for each SWIP that is currently in transaction with ARIN. This includes all swip registrations, swip removal requests, and SWIP objects that are currently OK. // Deprecated: This function has been marked as deprecated. @@ -15531,7 +15426,6 @@ func (r Network_Subnet_Swip_Transaction) GetAccount() (resp datatypes.Account, e return } -// // **DEPRECATED** // getObject retrieves the SoftLayer_Network_Subnet_Swip_Transaction object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Network_Subnet_Swip_transaction service. You can only retrieve Swip transactions tied to the account. func (r Network_Subnet_Swip_Transaction) GetObject() (resp datatypes.Network_Subnet_Swip_Transaction, err error) { @@ -15545,7 +15439,6 @@ func (r Network_Subnet_Swip_Transaction) GetSubnet() (resp datatypes.Network_Sub return } -// // **DEPRECATED** // This method finds all subnets attached to your account that are in OK status and starts "DELETE" transactions with ARIN, allowing you to remove your SWIP registration information. // Deprecated: This function has been marked as deprecated. @@ -15554,7 +15447,6 @@ func (r Network_Subnet_Swip_Transaction) RemoveAllSubnetSwips() (resp int, err e return } -// // **DEPRECATED** // This function, when called on an instantiated SWIP transaction, will allow you to start a "DELETE" transaction with ARIN, allowing you to remove your SWIP registration information. // Deprecated: This function has been marked as deprecated. @@ -15563,7 +15455,6 @@ func (r Network_Subnet_Swip_Transaction) RemoveSwipData() (resp bool, err error) return } -// // **DEPRECATED** // This function will allow you to update ARIN's registration data for a subnet to your current RWHOIS data. // Deprecated: This function has been marked as deprecated. @@ -15572,7 +15463,6 @@ func (r Network_Subnet_Swip_Transaction) ResendSwipData() (resp bool, err error) return } -// // **DEPRECATED** // swipAllSubnets finds all subnets attached to your account and attempts to create a SWIP transaction for all subnets that do not already have a SWIP transaction in progress. // Deprecated: This function has been marked as deprecated. @@ -15581,7 +15471,6 @@ func (r Network_Subnet_Swip_Transaction) SwipAllSubnets() (resp int, err error) return } -// // **DEPRECATED** // This method finds all subnets attached to your account that are in "OK" status and updates their data with ARIN. Use this function after you have updated your RWHOIS data if you want to keep SWIP up to date. // Deprecated: This function has been marked as deprecated. @@ -15746,7 +15635,6 @@ func (r Network_Tunnel_Module_Context) EditAddressTranslations(translations []da // Negotiation parameters for both phases one and two are editable. Here are the phase one and two parameters that can modified: // -// // *Phase One // **Authentication // ***Default value is set to MD5. @@ -15778,7 +15666,6 @@ func (r Network_Tunnel_Module_Context) EditAddressTranslations(translations []da // ***Valid Options are: Off = 0, On = 1. // ***NOTE: If perfect forward secrecy is turned On (set to 1), then a phase 2 diffie-hellman group is required. // -// // The remote peer address for the network tunnel may also be modified if needed. Invalid options will not be accepted and will cause an exception to be thrown. There are properties that provide valid options and limits for each negotiation parameter. Those properties are as follows: // * encryptionDefault // * encryptionOptions @@ -15790,7 +15677,6 @@ func (r Network_Tunnel_Module_Context) EditAddressTranslations(translations []da // * phaseTwoKeylifeDefault // * keylifeLimits // -// // Configurations cannot be modified if a network tunnel's requires complex manual setups/configuration modifications by the SoftLayer Network department. If the former is required, the configurations for the network tunnel will be locked until the manual configurations are complete. A network tunnel's configurations are applied via a transaction. If a network tunnel configuration change transaction is currently running, the network tunnel's setting cannot be modified until the running transaction completes. // // NOTE: A network tunnel's configurations must be applied to the network device in order for the modifications made to take effect. @@ -16236,7 +16122,6 @@ func (r Network_Vlan) GetPrivateVlan() (resp datatypes.Network_Vlan, err error) return } -// // *** DEPRECATED *** // Retrieve the private network VLAN associated with an IP address. // Deprecated: This function has been marked as deprecated. @@ -16260,7 +16145,7 @@ func (r Network_Vlan) GetPublicNetworkGateways() (resp []datatypes.Network_Gatew return } -// Retrieve the VLAN that belongs to a server's public network interface, as described by a server's fully-qualified domain name. A server's ''FQDN'' is it's hostname, followed by a period then it's domain name. +// Retrieve the VLAN that belongs to a server's public network interface, as described by a server's fully-qualified domain name. A server's ”FQDN” is it's hostname, followed by a period then it's domain name. func (r Network_Vlan) GetPublicVlanByFqdn(fqdn *string) (resp datatypes.Network_Vlan, err error) { params := []interface{}{ fqdn, @@ -16347,7 +16232,7 @@ func (r Network_Vlan) SetTags(tags *string) (resp bool, err error) { return } -// The '''getSensorData''' method updates a VLAN's firewall to allow or disallow intra-VLAN communication. +// The ”'getSensorData”' method updates a VLAN's firewall to allow or disallow intra-VLAN communication. func (r Network_Vlan) UpdateFirewallIntraVlanCommunication(enabled *bool) (err error) { var resp datatypes.Void params := []interface{}{ diff --git a/services/notification.go b/services/notification.go index 628ad25..79eb965 100644 --- a/services/notification.go +++ b/services/notification.go @@ -445,7 +445,6 @@ func (r Notification_User_Subscriber) Offset(offset int) Notification_User_Subsc // // For example to create a subscriber for a Storage EVault service to be notified 15 times during a billing cycle and to be notified when the vault usage reaches 85% of its allowed capacity use the following structure: // -// // *userRecordId = 1111 // *notificationId = 3 // *resourceRecord @@ -456,8 +455,6 @@ func (r Notification_User_Subscriber) Offset(offset int) Notification_User_Subsc // *preference[2] // **notificationPreferenceId = 3 // **value = 15 -// -// func (r Notification_User_Subscriber) CreateObject(templateObject *datatypes.Notification_User_Subscriber) (resp bool, err error) { params := []interface{}{ templateObject, @@ -470,7 +467,6 @@ func (r Notification_User_Subscriber) CreateObject(templateObject *datatypes.Not // // Subscriber preferences may also be edited. To edit the preferences, you must pass in the id off the preferences to edit. Here is an example of structure to pass in. In this example, the structure will set the subscriber status to active and the threshold preference to 90 and the limit preference to 20 // -// // *id = 1111 // *active = 1 // *preferences[1] @@ -579,7 +575,6 @@ func (r Notification_User_Subscriber_Billing) Offset(offset int) Notification_Us // // For example to create a subscriber for a Storage EVault service to be notified 15 times during a billing cycle and to be notified when the vault usage reaches 85% of its allowed capacity use the following structure: // -// // *userRecordId = 1111 // *notificationId = 3 // *resourceRecord @@ -590,8 +585,6 @@ func (r Notification_User_Subscriber_Billing) Offset(offset int) Notification_Us // *preference[2] // **notificationPreferenceId = 3 // **value = 15 -// -// func (r Notification_User_Subscriber_Billing) CreateObject(templateObject *datatypes.Notification_User_Subscriber) (resp bool, err error) { params := []interface{}{ templateObject, @@ -604,7 +597,6 @@ func (r Notification_User_Subscriber_Billing) CreateObject(templateObject *datat // // Subscriber preferences may also be edited. To edit the preferences, you must pass in the id off the preferences to edit. Here is an example of structure to pass in. In this example, the structure will set the subscriber status to active and the threshold preference to 90 and the limit preference to 20 // -// // *id = 1111 // *active = 1 // *preferences[1] @@ -719,7 +711,6 @@ func (r Notification_User_Subscriber_Mobile) ClearSnoozeTimer() (resp bool, err // // For example to create a subscriber for a Storage EVault service to be notified 15 times during a billing cycle and to be notified when the vault usage reaches 85% of its allowed capacity use the following structure: // -// // *userRecordId = 1111 // *notificationId = 3 // *resourceRecord @@ -730,8 +721,6 @@ func (r Notification_User_Subscriber_Mobile) ClearSnoozeTimer() (resp bool, err // *preference[2] // **notificationPreferenceId = 3 // **value = 15 -// -// func (r Notification_User_Subscriber_Mobile) CreateObject(templateObject *datatypes.Notification_User_Subscriber) (resp bool, err error) { params := []interface{}{ templateObject, @@ -744,7 +733,6 @@ func (r Notification_User_Subscriber_Mobile) CreateObject(templateObject *dataty // // Subscriber preferences may also be edited. To edit the preferences, you must pass in the id off the preferences to edit. Here is an example of structure to pass in. In this example, the structure will set the subscriber status to active and the threshold preference to 90 and the limit preference to 20 // -// // *id = 1111 // *active = 1 // *preferences[1] diff --git a/services/product.go b/services/product.go index 4a2ab9e..92a6155 100644 --- a/services/product.go +++ b/services/product.go @@ -714,7 +714,6 @@ func (r Product_Order) GetVlans(locationId *int, packageId *int, selectedItems * return } -// // Use this method to place bare metal server, virtual server and additional service orders with SoftLayer. // Upon success, your credit card or PayPal account will incur charges for the monthly order total // (or prorated value if ordered mid billing cycle). If all products on the order are only billed hourly, @@ -725,26 +724,20 @@ func (r Product_Order) GetVlans(locationId *int, packageId *int, selectedItems * // process. This authorization tells PayPal that you indeed want to place an order with SoftLayer. // From PayPal's web site, you will be redirected back to SoftLayer for your order receipt. // -// // When an order is placed, your order will be in a "pending approval" state. When all internal checks pass, // your order will be automatically approved. For orders that may need extra attention, a Sales representative // will review the order and contact you if necessary. Once the order is approved, your server or service will // be provisioned and available to you shortly thereafter. Depending on the type of server or service ordered, // provisioning times will vary. // -// // ## Order Containers // -// -// // When placing API orders, it's important to order your server and services on the appropriate // [[SoftLayer_Container_Product_Order]]. Failing to provide the correct container may delay your server or service // from being provisioned in a timely manner. Some common order containers are included below. // -// // **Note:** `SoftLayer_Container_Product_Order_` has been removed from the containers in the table below for readability. // -// // | Product | Order Container | Package Type | // | ------- | --------------- | ------------ | // | Bare metal server by CPU | [[SoftLayer_Container_Product_Order_Hardware_Server]] | BARE_METAL_CPU | @@ -772,210 +765,202 @@ func (r Product_Order) GetVlans(locationId *int, packageId *int, selectedItems * // | External authentication | [[SoftLayer_Container_Product_Order_User_Customer_External_Binding]] | ADDITIONAL_SERVICES | // | Dedicated Host | [[SoftLayer_Container_Product_Order_Virtual_DedicatedHost]] | DEDICATED_HOST | // -// // ## Server example // -// -// // This example includes a single bare metal server being ordered with monthly billing. // -// // **Warning:** the price ids provided below may be outdated or unavailable, so you will need to determine the // // available prices from the bare metal server [[SoftLayer_Product_Package/getAllObjects]], which have a // [[SoftLayer_Product_Package_Type]] of `BARE_METAL_CPU` or `BARE_METAL_CORE`. You can get a full list of // package types with [[SoftLayer_Product_Package_Type/getAllObjects]]. // -// // ### Bare Metal Ordering // // ```xml // -// -// -// your username -// your api key -// -// -// -// -// -// -// -// example.com -// server1 -// -// -// 138124 -// 142 -// -// -// 58 -// -// -// 22337 -// -// -// 21189 -// -// -// 876 -// -// -// 57 -// -// -// 55 -// -// -// 21190 -// -// -// 36381 -// -// -// 21 -// -// -// 22013 -// -// -// 906 -// -// -// 420 -// -// -// 418 -// -// -// 342 -// -// -// false -// -// -// -// +// +// +// +// your username +// your api key +// +// +// +// +// +// +// +// example.com +// server1 +// +// +// 138124 +// 142 +// +// +// 58 +// +// +// 22337 +// +// +// 21189 +// +// +// 876 +// +// +// 57 +// +// +// 55 +// +// +// 21190 +// +// +// 36381 +// +// +// 21 +// +// +// 22013 +// +// +// 906 +// +// +// 420 +// +// +// 418 +// +// +// 342 +// +// +// false +// +// +// +// +// // // ``` // -// // ## Virtual server example // -// -// // This example includes 2 identical virtual servers (except for hostname) being ordered for hourly billing. // It includes an optional image template id and VLAN data specified on the virtualGuest objects - // `primaryBackendNetworkComponent` and `primaryNetworkComponent`. // -// // **Warning:** the price ids provided below may be outdated or unavailable, so you will need to determine the // // available prices from the virtual server package with [[SoftLayer_Product_Package/getAllObjects]], // which has a [[SoftLayer_Product_Package_Type]] of `VIRTUAL_SERVER_INSTANCE`. // -// // #### Virtual Ordering // // ```xml // -// -// -// your username -// your api key -// -// -// -// -// -// 13251 -// 37473 -// 46 -// -// -// 2159 -// -// -// 55 -// -// -// 13754 -// -// -// 1641 -// -// -// 905 -// -// -// 1800 -// -// -// 58 -// -// -// 21 -// -// -// 1645 -// -// -// 272 -// -// -// 57 -// -// -// 418 -// -// -// 420 -// -// -// 2 -// true -// -// -// example.com -// server1 -// -// -// 12345 -// -// -// -// -// 67890 -// -// -// -// -// example.com -// server2 -// -// -// 12345 -// -// -// -// -// 67890 -// -// -// -// -// -// -// -// +// +// +// +// your username +// your api key +// +// +// +// +// +// 13251 +// 37473 +// 46 +// +// +// 2159 +// +// +// 55 +// +// +// 13754 +// +// +// 1641 +// +// +// 905 +// +// +// 1800 +// +// +// 58 +// +// +// 21 +// +// +// 1645 +// +// +// 272 +// +// +// 57 +// +// +// 418 +// +// +// 420 +// +// +// 2 +// true +// +// +// example.com +// server1 +// +// +// 12345 +// +// +// +// +// 67890 +// +// +// +// +// example.com +// server2 +// +// +// 12345 +// +// +// +// +// 67890 +// +// +// +// +// +// +// +// +// // // ``` // -// // ## VLAN example // -// // **Warning:** the price ids provided below may be outdated or unavailable, so you will need to determine the // // available prices from the additional services pacakge with [[SoftLayer_Product_Package/getAllObjects]], @@ -983,89 +968,83 @@ func (r Product_Order) GetVlans(locationId *int, packageId *int, selectedItems * // You can get a full list of [[SoftLayer_Product_Package_Type/getAllObjects|]] to find other available additional // service packages.

    // -// // ### VLAN Ordering // // ```xml // -// -// -// your username -// your api key -// -// -// -// -// -// 154820 -// 0 -// -// -// 2021 -// -// -// 2018 -// -// -// true -// -// -// -// +// +// +// +// your username +// your api key +// +// +// +// +// +// 154820 +// 0 +// +// +// 2021 +// +// +// 2018 +// +// +// true +// +// +// +// +// // // ``` // -// // ## Multiple products example // -// -// // This example includes a combination of the above examples in a single order. Note that all the configuration // options for each individual order container are the same as above, except now we encapsulate each one within // the `orderContainers` property on the base [[SoftLayer_Container_Product_Order]]. // -// // **Warning:** not all products are available to be ordered with other products. For example, since // // SSL certificates require validation from a 3rd party, the approval process may take days or even weeks, // and this would not be acceptable when you need your hourly virtual server right now. To better accommodate // customers, we restrict several products to be ordered individually. // -// // ### Bare metal server + virtual server + VLAN // -// -// // ```xml // -// -// -// your username -// your api key -// -// -// -// -// -// -// -// ... -// -// -// ... -// -// -// ... -// -// -// -// -// -// -// -// ``` // +// +// +// your username +// your api key +// +// +// +// +// +// +// +// ... +// +// +// ... +// +// +// ... +// +// +// +// +// +// // +// +// ``` func (r Product_Order) PlaceOrder(orderData interface{}, saveAsQuote *bool) (resp datatypes.Container_Product_Order_Receipt, err error) { err = datatypes.SetComplexType(orderData) if err != nil { @@ -1112,8 +1091,6 @@ func (r Product_Order) RequiredItems(itemPrices []datatypes.Product_Item_Price) // This service returns the same container that was provided, but with additional information that can be used for debugging or validation. It will also contain pricing information (prorated if applicable) for each of the products on the order. If an exception occurs during verification, a container with the SoftLayer_Exception_Order exception type will be specified in the result.

    // // verifyOrder accepts the same [[SoftLayer_Container_Product_Order]] as placeOrder, so see [[SoftLayer_Product_Order/placeOrder]] for more details. -// -// func (r Product_Order) VerifyOrder(orderData interface{}) (resp datatypes.Container_Product_Order, err error) { err = datatypes.SetComplexType(orderData) if err != nil { @@ -1497,13 +1474,13 @@ func (r Product_Package) GetObject() (resp datatypes.Product_Package, err error) return } -// This method will return a collection of [[SoftLayer_Container_Product_Order_Network_Storage_Hub_Datacenter]] objects which contain a datacenter location and all the associated active usage rate prices where object storage is available. This method is really only applicable to the object storage additional service package which has a [[SoftLayer_Product_Package_Type]] of '''ADDITIONAL_SERVICES_OBJECT_STORAGE'''. This information is useful so that you can see the "pay as you go" rates per datacenter. +// This method will return a collection of [[SoftLayer_Container_Product_Order_Network_Storage_Hub_Datacenter]] objects which contain a datacenter location and all the associated active usage rate prices where object storage is available. This method is really only applicable to the object storage additional service package which has a [[SoftLayer_Product_Package_Type]] of ”'ADDITIONAL_SERVICES_OBJECT_STORAGE”'. This information is useful so that you can see the "pay as you go" rates per datacenter. func (r Product_Package) GetObjectStorageDatacenters() (resp []datatypes.Container_Product_Order_Network_Storage_Hub_Datacenter, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getObjectStorageDatacenters", nil, &r.Options, &resp) return } -// This method will return a collection of [[SoftLayer_Container_Product_Order_Network_Storage_ObjectStorage_LocationGroup]] objects which contain a location group and all the associated active usage rate prices where object storage is available. This method is really only applicable to the object storage additional service package which has a [[SoftLayer_Product_Package_Type]] of '''ADDITIONAL_SERVICES_OBJECT_STORAGE'''. This information is useful so that you can see the "pay as you go" rates per location group. +// This method will return a collection of [[SoftLayer_Container_Product_Order_Network_Storage_ObjectStorage_LocationGroup]] objects which contain a location group and all the associated active usage rate prices where object storage is available. This method is really only applicable to the object storage additional service package which has a [[SoftLayer_Product_Package_Type]] of ”'ADDITIONAL_SERVICES_OBJECT_STORAGE”'. This information is useful so that you can see the "pay as you go" rates per location group. func (r Product_Package) GetObjectStorageLocationGroups() (resp []datatypes.Container_Product_Order_Network_Storage_ObjectStorage_LocationGroup, err error) { err = r.Session.DoRequest("SoftLayer_Product_Package", "getObjectStorageLocationGroups", nil, &r.Options, &resp) return @@ -1892,7 +1869,7 @@ func (r Product_Package_Server_Option) GetOptions(typ *string) (resp []datatypes return } -// The [[SoftLayer_Product_Package_Type]] object indicates the type for a service offering (package). The type can be used to filter packages. For example, if you are looking for the package representing virtual servers, you can filter on the type's key name of '''VIRTUAL_SERVER_INSTANCE'''. For bare metal servers by core or CPU, filter on '''BARE_METAL_CORE''' or '''BARE_METAL_CPU''', respectively. +// The [[SoftLayer_Product_Package_Type]] object indicates the type for a service offering (package). The type can be used to filter packages. For example, if you are looking for the package representing virtual servers, you can filter on the type's key name of ”'VIRTUAL_SERVER_INSTANCE”'. For bare metal servers by core or CPU, filter on ”'BARE_METAL_CORE”' or ”'BARE_METAL_CPU”', respectively. type Product_Package_Type struct { Session *session.Session Options sl.Options diff --git a/services/resource.go b/services/resource.go index 4381426..916a55b 100644 --- a/services/resource.go +++ b/services/resource.go @@ -400,7 +400,7 @@ func (r Resource_Metadata) GetTags() (resp []string, err error) { return } -// The getUserMetadata method retrieves metadata completed by users who interact with the resource. Metadata gathered using this method is unique to parameters set using the '''setUserMetadata''' method, which must be executed prior to completing this method. User metadata may also be provided while placing an order for a resource. +// The getUserMetadata method retrieves metadata completed by users who interact with the resource. Metadata gathered using this method is unique to parameters set using the ”'setUserMetadata”' method, which must be executed prior to completing this method. User metadata may also be provided while placing an order for a resource. func (r Resource_Metadata) GetUserMetadata() (resp string, err error) { err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getUserMetadata", nil, &r.Options, &resp) return diff --git a/services/sales.go b/services/sales.go index 4a0e777..1c5d416 100644 --- a/services/sales.go +++ b/services/sales.go @@ -29,7 +29,7 @@ import ( "github.com/softlayer/softlayer-go/sl" ) -// The presale event data types indicate the information regarding an individual presale event. The '''locationId''' will indicate the datacenter associated with the presale event. The '''itemId''' will indicate the product item associated with a particular presale event - however these are more rare. The '''startDate''' and '''endDate''' will provide information regarding when the presale event is available for use. At the end of the presale event, the server or services purchased will be available once approved and provisioned. +// The presale event data types indicate the information regarding an individual presale event. The ”'locationId”' will indicate the datacenter associated with the presale event. The ”'itemId”' will indicate the product item associated with a particular presale event - however these are more rare. The ”'startDate”' and ”'endDate”' will provide information regarding when the presale event is available for use. At the end of the presale event, the server or services purchased will be available once approved and provisioned. type Sales_Presale_Event struct { Session *session.Session Options sl.Options @@ -99,7 +99,7 @@ func (r Sales_Presale_Event) GetLocation() (resp datatypes.Location, err error) return } -// '''getObject''' retrieves the [[SoftLayer_Sales_Presale_Event]] object whose id number corresponds to the id number of the init parameter passed to the SoftLayer_Sales_Presale_Event service. Customers may only retrieve presale events that are currently active. +// ”'getObject”' retrieves the [[SoftLayer_Sales_Presale_Event]] object whose id number corresponds to the id number of the init parameter passed to the SoftLayer_Sales_Presale_Event service. Customers may only retrieve presale events that are currently active. func (r Sales_Presale_Event) GetObject() (resp datatypes.Sales_Presale_Event, err error) { err = r.Session.DoRequest("SoftLayer_Sales_Presale_Event", "getObject", nil, &r.Options, &resp) return diff --git a/services/search.go b/services/search.go index edd1224..a39eef0 100644 --- a/services/search.go +++ b/services/search.go @@ -83,7 +83,6 @@ func (r Search) Offset(offset int) Search { // // A collection of available object types and their properties can be retrieved by calling the [[SoftLayer_Search/getObjectTypes]] method. // -// // #### Exact Match on Text Fields // To enforce an exact match on text fields, encapsulate the term in double quotes. For example, given a set of device host names: // @@ -102,8 +101,6 @@ func (r Search) AdvancedSearch(searchString *string) (resp []datatypes.Container // This method returns a collection of [[SoftLayer_Container_Search_ObjectType]] containers that specify which indexed object types and properties are exposed for the current user. These object types can be used to discover searchable data and to create or validate object index search strings. // -// -// // Refer to the [[SoftLayer_Search/search]] and [[SoftLayer_Search/advancedSearch]] methods for information on using object types and properties in search strings. func (r Search) GetObjectTypes() (resp []datatypes.Container_Search_ObjectType, err error) { err = r.Session.DoRequest("SoftLayer_Search", "getObjectTypes", nil, &r.Options, &resp) @@ -126,7 +123,6 @@ func (r Search) GetObjectTypes() (resp []datatypes.Container_Search_ObjectType, // // A collection of available object types can be retrieved by calling the [[SoftLayer_Search/getObjectTypes]] method. // -// // #### Exact Match on Text Fields // To enforce an exact match on text fields, encapsulate the term in double quotes. For example, given a set of device host names: // diff --git a/services/ticket.go b/services/ticket.go index ba8c909..dba85ec 100644 --- a/services/ticket.go +++ b/services/ticket.go @@ -71,9 +71,6 @@ func (r Ticket) Offset(offset int) Ticket { return r } -// -// -// func (r Ticket) AddAssignedAgent(agentId *int) (err error) { var resp datatypes.Void params := []interface{}{ @@ -129,7 +126,7 @@ func (r Ticket) AddAttachedVirtualGuest(guestId *int, callCommit *bool) (resp da return } -// As part of the customer service process SoftLayer has provided a quick feedback mechanism for its customers to rate their overall experience with SoftLayer after a ticket is closed. addFinalComments() sets these comments for a ticket update made by a SoftLayer employee. Final comments may only be set on closed tickets, can only be set once, and may not exceed 4000 characters in length. Once the comments are set ''addFinalComments()'' returns a boolean true. +// As part of the customer service process SoftLayer has provided a quick feedback mechanism for its customers to rate their overall experience with SoftLayer after a ticket is closed. addFinalComments() sets these comments for a ticket update made by a SoftLayer employee. Final comments may only be set on closed tickets, can only be set once, and may not exceed 4000 characters in length. Once the comments are set ”addFinalComments()” returns a boolean true. func (r Ticket) AddFinalComments(finalComments *string) (resp bool, err error) { params := []interface{}{ finalComments, @@ -158,7 +155,7 @@ func (r Ticket) AddScheduledAutoClose(activationTime *string) (err error) { return } -// Add an update to a ticket. A ticket update's entry has a maximum length of 4000 characters, so ''addUpdate()'' splits the ''entry'' property in the ''templateObject'' parameter into 3900 character blocks and creates one entry per 3900 character block. Once complete ''addUpdate()'' emails the ticket's owner and additional email addresses with an update message if the ticket's ''notifyUserOnUpdateFlag'' is set. If the ticket is a Legal or Abuse ticket, then the account's abuse emails are also notified when the updates are processed. Finally, ''addUpdate()'' returns an array of the newly created ticket updates. +// Add an update to a ticket. A ticket update's entry has a maximum length of 4000 characters, so ”addUpdate()” splits the ”entry” property in the ”templateObject” parameter into 3900 character blocks and creates one entry per 3900 character block. Once complete ”addUpdate()” emails the ticket's owner and additional email addresses with an update message if the ticket's ”notifyUserOnUpdateFlag” is set. If the ticket is a Legal or Abuse ticket, then the account's abuse emails are also notified when the updates are processed. Finally, ”addUpdate()” returns an array of the newly created ticket updates. func (r Ticket) AddUpdate(templateObject *datatypes.Ticket_Update, attachedFiles []datatypes.Container_Utility_File_Attachment) (resp []datatypes.Ticket_Update, err error) { params := []interface{}{ templateObject, @@ -170,7 +167,7 @@ func (r Ticket) AddUpdate(templateObject *datatypes.Ticket_Update, attachedFiles // Create an administrative support ticket. Use an administrative ticket if you require SoftLayer's assistance managing your server or content. If you are experiencing an issue with SoftLayer's hardware, network, or services then please open a standard support ticket. // -// Support tickets may only be created in the open state. The SoftLayer API defaults new ticket properties ''userEditableFlag'' to true, ''accountId'' to the id of the account that your API user belongs to, and ''statusId'' to 1001 (or "open"). You may not assign your new to ticket to users that your API user does not have access to. +// Support tickets may only be created in the open state. The SoftLayer API defaults new ticket properties ”userEditableFlag” to true, ”accountId” to the id of the account that your API user belongs to, and ”statusId” to 1001 (or "open"). You may not assign your new to ticket to users that your API user does not have access to. // // Once your ticket is created it is placed in a queue for SoftLayer employees to work. As they update the ticket new [[SoftLayer_Ticket_Update]] entries are added to the ticket object. // @@ -204,7 +201,6 @@ func (r Ticket) CreateAdministrativeTicket(templateObject *datatypes.Ticket, con // * "Sales process / upgrades" // * "Moving to competitor" // -// // The content parameter describes further the reason for cancelling the server. func (r Ticket) CreateCancelServerTicket(attachmentId *int, reason *string, content *string, cancelAssociatedItems *bool, attachmentType *string) (resp datatypes.Ticket, err error) { params := []interface{}{ @@ -232,7 +228,6 @@ func (r Ticket) CreateCancelServerTicket(attachmentId *int, reason *string, cont // * "Sales process / upgrades" // * "Moving to competitor" // -// // The content parameter describes further the reason for cancelling service. func (r Ticket) CreateCancelServiceTicket(attachmentId *int, reason *string, content *string, attachmentType *string) (resp datatypes.Ticket, err error) { params := []interface{}{ @@ -247,7 +242,7 @@ func (r Ticket) CreateCancelServiceTicket(attachmentId *int, reason *string, con // Create a standard support ticket. Use a standard support ticket if you need to work out a problem related to SoftLayer's hardware, network, or services. If you require SoftLayer's assistance managing your server or content then please open an administrative ticket. // -// Support tickets may only be created in the open state. The SoftLayer API defaults new ticket properties ''userEditableFlag'' to true, ''accountId'' to the id of the account that your API user belongs to, and ''statusId'' to 1001 (or "open"). You may not assign your new to ticket to users that your API user does not have access to. +// Support tickets may only be created in the open state. The SoftLayer API defaults new ticket properties ”userEditableFlag” to true, ”accountId” to the id of the account that your API user belongs to, and ”statusId” to 1001 (or "open"). You may not assign your new to ticket to users that your API user does not have access to. // // Once your ticket is created it is placed in a queue for SoftLayer employees to work. As they update the ticket new [[SoftLayer_Ticket_Update]] entries are added to the ticket object. func (r Ticket) CreateStandardTicket(templateObject *datatypes.Ticket, contents *string, attachmentId *int, rootPassword *string, controlPanelPassword *string, accessPort *string, attachedFiles []datatypes.Container_Utility_File_Attachment, attachmentType *string) (resp datatypes.Ticket, err error) { @@ -279,7 +274,7 @@ func (r Ticket) CreateUpgradeTicket(attachmentId *int, genericUpgrade *string, u return } -// Edit a SoftLayer ticket. The edit method is two-fold. You may either edit a ticket itself, add an update to a ticket, attach up to two files to a ticket, or perform all of these tasks. The SoftLayer API ignores changes made to the ''userEditableFlag'' and ''accountId'' properties. You may not assign a ticket to a user that your API account does not have access to. You may not enter a custom title for standard support tickets, buy may do so when editing an administrative ticket. Finally, you may not close a ticket using this method. Please contact SoftLayer if you need a ticket closed. +// Edit a SoftLayer ticket. The edit method is two-fold. You may either edit a ticket itself, add an update to a ticket, attach up to two files to a ticket, or perform all of these tasks. The SoftLayer API ignores changes made to the ”userEditableFlag” and ”accountId” properties. You may not assign a ticket to a user that your API account does not have access to. You may not enter a custom title for standard support tickets, buy may do so when editing an administrative ticket. Finally, you may not close a ticket using this method. Please contact SoftLayer if you need a ticket closed. // // If you need to only add an update to a ticket then please use the [[SoftLayer_Ticket::addUpdate|addUpdate]] method in this service. Likewise if you need to only attach a file to a ticket then use the [[SoftLayer_Ticket::addAttachedFile|addAttachedFile]] method. The edit method exists as a convenience if you need to perform all these tasks at once. func (r Ticket) Edit(templateObject *datatypes.Ticket, contents *string, attachedFiles []datatypes.Container_Utility_File_Attachment) (resp datatypes.Ticket, err error) { @@ -338,7 +333,7 @@ func (r Ticket) GetAttachedDedicatedHosts() (resp []datatypes.Virtual_DedicatedH return } -// Retrieve the file attached to a SoftLayer ticket by it's given identifier. To retrieve a list of files attached to a ticket either call the SoftLayer_Ticket::getAttachedFiles method or call SoftLayer_Ticket::getObject with ''attachedFiles'' defined in an object mask. +// Retrieve the file attached to a SoftLayer ticket by it's given identifier. To retrieve a list of files attached to a ticket either call the SoftLayer_Ticket::getAttachedFiles method or call SoftLayer_Ticket::getObject with ”attachedFiles” defined in an object mask. func (r Ticket) GetAttachedFile(attachmentId *int) (resp []byte, err error) { params := []interface{}{ attachmentId, @@ -549,9 +544,6 @@ func (r Ticket) MarkAsViewed() (err error) { return } -// -// -// func (r Ticket) RemoveAssignedAgent(agentId *int) (err error) { var resp datatypes.Void params := []interface{}{ @@ -561,7 +553,7 @@ func (r Ticket) RemoveAssignedAgent(agentId *int) (err error) { return } -// removeAttachedAdditionalEmails() removes the specified email addresses from a ticket's notification list. If one of the provided email addresses is not attached to the ticket then ''removeAttachedAdditiaonalEmails()'' ignores it and continues to the next one. Once the email addresses are removed ''removeAttachedAdditiaonalEmails()'' returns a boolean true. +// removeAttachedAdditionalEmails() removes the specified email addresses from a ticket's notification list. If one of the provided email addresses is not attached to the ticket then ”removeAttachedAdditiaonalEmails()” ignores it and continues to the next one. Once the email addresses are removed ”removeAttachedAdditiaonalEmails()” returns a boolean true. func (r Ticket) RemoveAttachedAdditionalEmails(emails []string) (resp bool, err error) { params := []interface{}{ emails, @@ -1045,7 +1037,7 @@ func (r Ticket_Update_Employee) Offset(offset int) Ticket_Update_Employee { return r } -// As part of the customer service process SoftLayer has provided a quick feedback mechanism for its customers to rate the responses that its employees give on tickets. addResponseRating() sets the rating for a single ticket update made by a SoftLayer employee. Ticket ratings have the integer values 1 through 5, with 1 being the worst and 5 being the best. Once the rating is set ''addResponseRating()'' returns a boolean true. +// As part of the customer service process SoftLayer has provided a quick feedback mechanism for its customers to rate the responses that its employees give on tickets. addResponseRating() sets the rating for a single ticket update made by a SoftLayer employee. Ticket ratings have the integer values 1 through 5, with 1 being the worst and 5 being the best. Once the rating is set ”addResponseRating()” returns a boolean true. func (r Ticket_Update_Employee) AddResponseRating(responseRating *int, responseIndex *int) (resp bool, err error) { params := []interface{}{ responseRating, diff --git a/services/user.go b/services/user.go index f119603..c27feeb 100644 --- a/services/user.go +++ b/services/user.go @@ -252,8 +252,6 @@ func (r User_Customer) CheckExternalAuthenticationStatus(authenticationContainer } // Add a description here -// -// func (r User_Customer) CheckPhoneFactorAuthenticationForPasswordSet(passwordSet *datatypes.Container_User_Customer_PasswordSet, authenticationContainer *datatypes.Container_User_Customer_External_Binding) (resp bool, err error) { params := []interface{}{ passwordSet, @@ -1616,7 +1614,6 @@ func (r User_Customer_External_Binding_Phone) UpdateNote(text *string) (resp boo // Phone external binding supports a primary and a backup phone number. You can use this method to update your phone number used for the phone authentication. You can provide an array of [[SoftLayer_Container_User_Data_Phone|User Phone]] objects. You have to mark one as the primary phone number by setting "phoneType" to "PRIMARY". // -// // *countryCode: Country code number for the phone number. Default: 1 (United States & Canada +1) // *phone: Phone number that 2 Form Factor system will call or text for user authentication. // The phone number format must match the format selected in the Country Code. @@ -1624,8 +1621,6 @@ func (r User_Customer_External_Binding_Phone) UpdateNote(text *string) (resp boo // are allowed. Commas can be used for a one second pause to navigate phone system menus. // *phoneType: Specify the primary and backup phone number by setting this value to "PRIMARY" or "BACKUP". // If omitted, it will be considered to be the primary phone number. If you are passing two Phone objects, you must specify the phone type of each phone number. -// -// func (r User_Customer_External_Binding_Phone) UpdatePhone(phoneData []datatypes.Container_User_Data_Phone) (resp bool, err error) { params := []interface{}{ phoneData, @@ -1642,7 +1637,6 @@ func (r User_Customer_External_Binding_Phone) UpdatePhone(phoneData []datatypes. // ** Active // ** Inactive // -// // SoftLayer users with an active external binding will be prohibited from using the API for security reasons. type User_Customer_External_Binding_Totp struct { Session *session.Session @@ -1844,7 +1838,6 @@ func (r User_Customer_External_Binding_Vendor) GetObject() (resp datatypes.User_ // * The credential's expiration date // * The last time the credential was updated // -// // SoftLayer users with an active external binding will be prohibited from using the API for security reasons. type User_Customer_External_Binding_Verisign struct { Session *session.Session @@ -2699,8 +2692,6 @@ func (r User_Customer_OpenIdConnect) CheckExternalAuthenticationStatus(authentic } // Add a description here -// -// func (r User_Customer_OpenIdConnect) CheckPhoneFactorAuthenticationForPasswordSet(passwordSet *datatypes.Container_User_Customer_PasswordSet, authenticationContainer *datatypes.Container_User_Customer_External_Binding) (resp bool, err error) { params := []interface{}{ passwordSet, @@ -3949,8 +3940,6 @@ func (r User_Customer_OpenIdConnect_TrustedProfile) CheckExternalAuthenticationS } // Add a description here -// -// func (r User_Customer_OpenIdConnect_TrustedProfile) CheckPhoneFactorAuthenticationForPasswordSet(passwordSet *datatypes.Container_User_Customer_PasswordSet, authenticationContainer *datatypes.Container_User_Customer_External_Binding) (resp bool, err error) { params := []interface{}{ passwordSet, @@ -5113,8 +5102,6 @@ func (r User_Customer_Security_Answer) GetUser() (resp datatypes.User_Customer, // Each SoftLayer User Customer instance is assigned a status code that determines how it's treated in the customer portal. This status is reflected in the SoftLayer_User_Customer_Status data type. Status differs from user permissions in that user status applies globally to the portal while user permissions are applied to specific portal functions. // // Note that a status of "PENDING" also has been added. This status is specific to users that are configured to use IBMid authentication. This would include some (not all) users on accounts that are linked to Platform Services (PaaS, formerly Bluemix) accounts, but is not limited to users in such accounts. Using IBMid authentication is optional for active users even if it is not required by the account type. PENDING status indicates that a relationship between an IBMid and a user is being set up but is not complete. To be complete, PENDING users need to perform an action ("accepting the invitation") before becoming an active user within IBM Cloud and/or IMS. PENDING is a system state, and can not be administered by users (including the account master user). SoftLayer Commercial is the only environment where IBMid and/or account linking are used. -// -// type User_Customer_Status struct { Session *session.Session Options sl.Options diff --git a/services/virtual.go b/services/virtual.go index 254a93c..0ea995f 100644 --- a/services/virtual.go +++ b/services/virtual.go @@ -502,181 +502,189 @@ func (r Virtual_Guest) CreateArchiveTransaction(groupName *string, blockDevices return } -// // createObject() enables the creation of computing instances on an account. This method is a simplified alternative to interacting with the ordering system directly. // -// // In order to create a computing instance, a template object must be sent in with a few required values. // -// // When this method returns an order will have been placed for a computing instance of the specified configuration. // -// // To determine when the instance is available you can poll the instance via [[SoftLayer_Virtual_Guest/getObject]], with an object mask requesting the `provisionDate` relational property. When `provisionDate` is not `null`, the instance will be ready. // -// // > **Warning:** Computing instances created via this method will incur charges on your account. For testing input parameters see [[SoftLayer_Virtual_Guest/generateOrderTemplate]]. // -// // ### Required Input [[SoftLayer_Virtual_Guest]] // -// -// // - `Hostname` String **Required** -// + Hostname for the computing instance. +// - Hostname for the computing instance. +// // - `Domain` String **Required** -// + Domain for the computing instance. +// - Domain for the computing instance. +// // - `startCpus` Integer **Required** -// + The number of CPU cores to allocate. -// + See [[SoftLayer_Virtual_Guest/getCreateObjectOptions]] for available options. +// - The number of CPU cores to allocate. +// - See [[SoftLayer_Virtual_Guest/getCreateObjectOptions]] for available options. +// // - `maxMemory` Integer **Required** -// + The amount of memory to allocate in megabytes. -// + See [[SoftLayer_Virtual_Guest/getCreateObjectOptions]] for available options. -// - `datacenter.name` *String* **Required** -// + Specifies which datacenter the instance is to be provisioned in. Needs to be a nested object. -// + Example: `"datacenter": {"name": "dal05"}` -// + See [[SoftLayer_Virtual_Guest/getCreateObjectOptions]] for available options. +// - The amount of memory to allocate in megabytes. +// - See [[SoftLayer_Virtual_Guest/getCreateObjectOptions]] for available options. // +// - `datacenter.name` *String* **Required** +// - Specifies which datacenter the instance is to be provisioned in. Needs to be a nested object. +// - Example: `"datacenter": {"name": "dal05"}` +// - See [[SoftLayer_Virtual_Guest/getCreateObjectOptions]] for available options. // // - `hourlyBillingFlag` Boolean **Required** -// + Specifies the billing type for the instance. -// + True for hourly billing, False for monthly billing. +// - Specifies the billing type for the instance. +// - True for hourly billing, False for monthly billing. +// // - `localDiskFlag` Boolean **Required** -// + Specifies the disk type for the instance. -// + True for local to the instance disks, False for SAN disks. +// - Specifies the disk type for the instance. +// - True for local to the instance disks, False for SAN disks. +// // - `dedicatedAccountHostOnlyFlag` Boolean -// + When true this flag specifies that a compute instance is to run on hosts that only have guests from the same account. -// + Default: False +// - When true this flag specifies that a compute instance is to run on hosts that only have guests from the same account. +// - Default: False +// // - `operatingSystemReferenceCode` String **Conditionally required** -// + An identifier for the operating system to provision the computing instance with. -// + Not required when using a `blockDeviceTemplateGroup.globalIdentifier`, as the template will have its own operating system. -// + See [[SoftLayer_Virtual_Guest/getCreateObjectOptions]] for available options. -// + **Notice**: Some operating systems are billed based on the number of CPUs the guest has. The price which is used can be determined by calling -// [[SoftLayer_Virtual_Guest/generateOrderTemplate]] with your desired device specifications. +// - An identifier for the operating system to provision the computing instance with. +// - Not required when using a `blockDeviceTemplateGroup.globalIdentifier`, as the template will have its own operating system. +// - See [[SoftLayer_Virtual_Guest/getCreateObjectOptions]] for available options. +// - **Notice**: Some operating systems are billed based on the number of CPUs the guest has. The price which is used can be determined by calling +// [[SoftLayer_Virtual_Guest/generateOrderTemplate]] with your desired device specifications. +// // - `blockDeviceTemplateGroup.globalIdentifier` String -// + The GUID for the template to be used to provision the computing instance. -// + Conflicts with `operatingSystemReferenceCode` -// + **Notice**: Some operating systems are billed based on the number of CPUs the guest has. The price which is used can be determined by calling -// [[SoftLayer_Virtual_Guest/generateOrderTemplate]] with your desired device specifications. -// + A list of public images may be obtained via a request to [[SoftLayer_Virtual_Guest_Block_Device_Template_Group/getPublicImages]] -// + A list of private images may be obtained via a request to [[SoftLayer_Account/getPrivateBlockDeviceTemplateGroups]] -// + Example: `"blockDeviceTemplateGroup": { globalIdentifier": "07beadaa-1e11-476e-a188-3f7795feb9fb"` +// - The GUID for the template to be used to provision the computing instance. +// - Conflicts with `operatingSystemReferenceCode` +// - **Notice**: Some operating systems are billed based on the number of CPUs the guest has. The price which is used can be determined by calling +// [[SoftLayer_Virtual_Guest/generateOrderTemplate]] with your desired device specifications. +// - A list of public images may be obtained via a request to [[SoftLayer_Virtual_Guest_Block_Device_Template_Group/getPublicImages]] +// - A list of private images may be obtained via a request to [[SoftLayer_Account/getPrivateBlockDeviceTemplateGroups]] +// - Example: `"blockDeviceTemplateGroup": { globalIdentifier": "07beadaa-1e11-476e-a188-3f7795feb9fb"` +// // - `networkComponents.maxSpeed` Integer -// + Specifies the connection speed for the instance's network components. -// + The `networkComponents` property is an array with a single [[SoftLayer_Virtual_Guest_Network_Component]] structure. -// The `maxSpeed` property must be set to specify the network uplink speed, in megabits per second, of the computing instance. -// + See [[SoftLayer_Virtual_Guest/getCreateObjectOptions]] for available options. -// + Default: 10 -// + Example: `"networkComponents": [{"maxSpeed": 1000}]` +// - Specifies the connection speed for the instance's network components. +// - The `networkComponents` property is an array with a single [[SoftLayer_Virtual_Guest_Network_Component]] structure. +// The `maxSpeed` property must be set to specify the network uplink speed, in megabits per second, of the computing instance. +// - See [[SoftLayer_Virtual_Guest/getCreateObjectOptions]] for available options. +// - Default: 10 +// - Example: `"networkComponents": [{"maxSpeed": 1000}]` +// // - `privateNetworkOnlyFlag` Boolean -// + When true this flag specifies that a compute instance is to only have access to the private network. -// + Default: False +// - When true this flag specifies that a compute instance is to only have access to the private network. +// - Default: False +// // - `primaryNetworkComponent.networkVlan.id` Integer -// + Specifies the network vlan which is to be used for the frontend interface of the computing instance. -// + The `primaryNetworkComponent` property is a [[SoftLayer_Virtual_Guest_Network_Component]] structure with the `networkVlan` property populated with a i -// [[SoftLayer_Network_Vlan]] structure. The `id` property must be set to specify the frontend network vlan of the computing instance. -// + *NOTE* This is the VLAN `id`, NOT the vlan number. -// + Example: `"primaryNetworkComponent":{"networkVlan": {"id": 1234567}}` +// - Specifies the network vlan which is to be used for the frontend interface of the computing instance. +// - The `primaryNetworkComponent` property is a [[SoftLayer_Virtual_Guest_Network_Component]] structure with the `networkVlan` property populated with a i +// [[SoftLayer_Network_Vlan]] structure. The `id` property must be set to specify the frontend network vlan of the computing instance. +// - *NOTE* This is the VLAN `id`, NOT the vlan number. +// - Example: `"primaryNetworkComponent":{"networkVlan": {"id": 1234567}}` +// // - `backendNetworkComponent.networkVlan.id` Integer -// + Specifies the network vlan which is to be used for the backend interface of the computing instance. -// + The `backendNetworkComponent` property is a [[SoftLayer_Virtual_Guest_Network_Component]] structure with the `networkVlan` property populated with a -// [[SoftLayer_Network_Vlan]] structure. The `id` property must be set to specify the backend network vlan of the computing instance. -// + *NOTE* This is the VLAN `id`, NOT the vlan number. -// + Example: `"backendNetworkComponent":{"networkVlan": {"id": 1234567}}` +// - Specifies the network vlan which is to be used for the backend interface of the computing instance. +// - The `backendNetworkComponent` property is a [[SoftLayer_Virtual_Guest_Network_Component]] structure with the `networkVlan` property populated with a +// [[SoftLayer_Network_Vlan]] structure. The `id` property must be set to specify the backend network vlan of the computing instance. +// - *NOTE* This is the VLAN `id`, NOT the vlan number. +// - Example: `"backendNetworkComponent":{"networkVlan": {"id": 1234567}}` +// // - `primaryNetworkComponent.securityGroupBindings` [[SoftLayer_Virtual_Network_SecurityGroup_NetworkComponentBinding]][] -// + Specifies the security groups to be attached to this VSI's frontend network adapter -// + The `primaryNetworkComponent` property is a [[SoftLayer_Virtual_Guest_Network_Component]] structure with the `securityGroupBindings` property populated -// with an array of [[SoftLayer_Virtual_Network_SecurityGroup_NetworkComponentBinding]] structures. The `securityGroup` property in each must be set to -// specify the security group to be attached to the primary frontend network component. -// + Example: -// ``` -// "primaryNetworkComponent": { -// "securityGroupBindings": [ -// {"securityGroup":{"id": 5555555}}, -// {"securityGroup":{"id": 1112223}}, -// ] -// } -// ``` +// - Specifies the security groups to be attached to this VSI's frontend network adapter +// - The `primaryNetworkComponent` property is a [[SoftLayer_Virtual_Guest_Network_Component]] structure with the `securityGroupBindings` property populated +// with an array of [[SoftLayer_Virtual_Network_SecurityGroup_NetworkComponentBinding]] structures. The `securityGroup` property in each must be set to +// specify the security group to be attached to the primary frontend network component. +// - Example: +// ``` +// "primaryNetworkComponent": { +// "securityGroupBindings": [ +// {"securityGroup":{"id": 5555555}}, +// {"securityGroup":{"id": 1112223}}, +// ] +// } +// ``` +// // - `primaryBackendNetworkComponent.securityGroupBindings` [[SoftLayer_Virtual_Network_SecurityGroup_NetworkComponentBinding]][] -// + Specifies the security groups to be attached to this VSI's backend network adapter -// + The `primaryNetworkComponent` property is a [[SoftLayer_Virtual_Guest_Network_Component]] structure with the `securityGroupBindings` property populated -// with an array of [[SoftLayer_Virtual_Network_SecurityGroup_NetworkComponentBinding]] structures. The `securityGroup` property in each must be set to -// specify the security group to be attached to the primary frontend network component. -// + Example: -// ``` -// "primaryBackendNetworkComponent": { -// "securityGroupBindings": [ -// {"securityGroup":{"id": 33322211}}, -// {"securityGroup":{"id": 77777222}}, -// ] -// } -// ``` +// - Specifies the security groups to be attached to this VSI's backend network adapter +// - The `primaryNetworkComponent` property is a [[SoftLayer_Virtual_Guest_Network_Component]] structure with the `securityGroupBindings` property populated +// with an array of [[SoftLayer_Virtual_Network_SecurityGroup_NetworkComponentBinding]] structures. The `securityGroup` property in each must be set to +// specify the security group to be attached to the primary frontend network component. +// - Example: +// ``` +// "primaryBackendNetworkComponent": { +// "securityGroupBindings": [ +// {"securityGroup":{"id": 33322211}}, +// {"securityGroup":{"id": 77777222}}, +// ] +// } +// ``` +// // - `blockDevices` [[SoftLayer_Virtual_Guest_Block_Device]][] -// + Block device and disk image settings for the computing instance -// + The `blockDevices` property is an array of [[SoftLayer_Virtual_Guest_Block_Device]] structures. Each block device must specify the `device` property -// along with the `diskImage` property, which is a [[SoftLayer_Virtual_Disk_Image]] structure with the `capacity` property set. The `device` number `'1'` -// is reserved for the SWAP disk attached to the computing instance. -// + Default: The smallest available capacity for the primary disk will be used. If an image template is specified the disk capacity will be be provided by the template. -// + Example: -// ``` -// "blockDevices":[{"device": "0", "diskImage": {"capacity": 100}}], -// "localDiskFlag": true -// ``` -// + See [[SoftLayer_Virtual_Guest/getCreateObjectOptions]] for available options. +// - Block device and disk image settings for the computing instance +// - The `blockDevices` property is an array of [[SoftLayer_Virtual_Guest_Block_Device]] structures. Each block device must specify the `device` property +// along with the `diskImage` property, which is a [[SoftLayer_Virtual_Disk_Image]] structure with the `capacity` property set. The `device` number `'1'` +// is reserved for the SWAP disk attached to the computing instance. +// - Default: The smallest available capacity for the primary disk will be used. If an image template is specified the disk capacity will be be provided by the template. +// - Example: +// ``` +// "blockDevices":[{"device": "0", "diskImage": {"capacity": 100}}], +// "localDiskFlag": true +// ``` +// - See [[SoftLayer_Virtual_Guest/getCreateObjectOptions]] for available options. +// // - `userData.value` String -// + Arbitrary data to be made available to the computing instance. -// + The `userData` property is an array with a single [[SoftLayer_Virtual_Guest_Attribute]] structure with the `value` property set to an arbitrary value. -// This value can be retrieved via the [[SoftLayer_Resource_Metadata/getUserMetadata]] method from a request originating from the computing instance. -// This is primarily useful for providing data to software that may be on the instance and configured to execute upon first boot. -// + Example: `"userData":[{"value": "testData"}]` +// - Arbitrary data to be made available to the computing instance. +// - The `userData` property is an array with a single [[SoftLayer_Virtual_Guest_Attribute]] structure with the `value` property set to an arbitrary value. +// This value can be retrieved via the [[SoftLayer_Resource_Metadata/getUserMetadata]] method from a request originating from the computing instance. +// This is primarily useful for providing data to software that may be on the instance and configured to execute upon first boot. +// - Example: `"userData":[{"value": "testData"}]` +// // - `sshKeys` [[SoftLayer_Security_Ssh_Key]][] -// + The `sshKeys` property is an array of [[SoftLayer_Security_Ssh_Key]] structures with the `id` property set to the value of an existing SSH key. -// + To create a new SSH key, call [[SoftLayer_Security_Ssh_Key/createObject|createObject]]. -// + To obtain a list of existing SSH keys, call [[SoftLayer_Account/getSshKeys]] -// + Example: `"sshKeys":[{"id": 1234567}]` -// - `postInstallScriptUri` String -// + Specifies the uri location of the script to be downloaded and run after installation is complete. Only scripts from HTTPS servers are executed on startup. +// - The `sshKeys` property is an array of [[SoftLayer_Security_Ssh_Key]] structures with the `id` property set to the value of an existing SSH key. +// - To create a new SSH key, call [[SoftLayer_Security_Ssh_Key/createObject|createObject]]. +// - To obtain a list of existing SSH keys, call [[SoftLayer_Account/getSshKeys]] +// - Example: `"sshKeys":[{"id": 1234567}]` // +// - `postInstallScriptUri` String +// - Specifies the uri location of the script to be downloaded and run after installation is complete. Only scripts from HTTPS servers are executed on startup. // // REST Example: // ``` -// curl -X POST -d '{ -// "parameters":[ -// { -// "hostname": "host1", -// "domain": "example.com", -// "startCpus": 1, -// "maxMemory": 1024, -// "hourlyBillingFlag": true, -// "localDiskFlag": true, -// "operatingSystemReferenceCode": "UBUNTU_LATEST" -// } -// }' https://api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/createObject.json // +// curl -X POST -d '{ +// "parameters":[ +// { +// "hostname": "host1", +// "domain": "example.com", +// "startCpus": 1, +// "maxMemory": 1024, +// "hourlyBillingFlag": true, +// "localDiskFlag": true, +// "operatingSystemReferenceCode": "UBUNTU_LATEST" +// } +// }' https://api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/createObject.json // // HTTP/1.1 201 Created // Location: https://api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/1301396/getObject // +// { +// "accountId": 232298, +// "createDate": "2012-11-30T16:28:17-06:00", +// "dedicatedAccountHostOnlyFlag": false, +// "domain": "example.com", +// "hostname": "host1", +// "id": 1301396, +// "lastPowerStateId": null, +// "lastVerifiedDate": null, +// "maxCpu": 1, +// "maxCpuUnits": "CORE", +// "maxMemory": 1024, +// "metricPollDate": null, +// "modifyDate": null, +// "privateNetworkOnlyFlag": false, +// "startCpus": 1, +// "statusId": 1001, +// "globalIdentifier": "2d203774-0ee1-49f5-9599-6ef67358dd31" +// } // -// { -// "accountId": 232298, -// "createDate": "2012-11-30T16:28:17-06:00", -// "dedicatedAccountHostOnlyFlag": false, -// "domain": "example.com", -// "hostname": "host1", -// "id": 1301396, -// "lastPowerStateId": null, -// "lastVerifiedDate": null, -// "maxCpu": 1, -// "maxCpuUnits": "CORE", -// "maxMemory": 1024, -// "metricPollDate": null, -// "modifyDate": null, -// "privateNetworkOnlyFlag": false, -// "startCpus": 1, -// "statusId": 1001, -// "globalIdentifier": "2d203774-0ee1-49f5-9599-6ef67358dd31" -// } // ``` func (r Virtual_Guest) CreateObject(templateObject *datatypes.Virtual_Guest) (resp datatypes.Virtual_Guest, err error) { params := []interface{}{ @@ -686,89 +694,87 @@ func (r Virtual_Guest) CreateObject(templateObject *datatypes.Virtual_Guest) (re return } -// // createObjects() enables the creation of multiple computing instances on an account in a single call. This // method is a simplified alternative to interacting with the ordering system directly. // -// // In order to create a computing instance a set of template objects must be sent in with a few required // values. // -// // Warning: Computing instances created via this method will incur charges on your account. // -// // See [[SoftLayer_Virtual_Guest/createObject|createObject]] for specifics on the requirements of each template object. // -// //

    Example

    -// curl -X POST -d '{ -// "parameters":[ -// [ -// { -// "hostname": "host1", -// "domain": "example.com", -// "startCpus": 1, -// "maxMemory": 1024, -// "hourlyBillingFlag": true, -// "localDiskFlag": true, -// "operatingSystemReferenceCode": "UBUNTU_LATEST" -// }, -// { -// "hostname": "host2", -// "domain": "example.com", -// "startCpus": 1, -// "maxMemory": 1024, -// "hourlyBillingFlag": true, -// "localDiskFlag": true, -// "operatingSystemReferenceCode": "UBUNTU_LATEST" -// } -// ] -// ] -// }' https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/createObjects.json +// +// curl -X POST -d '{ +// "parameters":[ +// [ +// { +// "hostname": "host1", +// "domain": "example.com", +// "startCpus": 1, +// "maxMemory": 1024, +// "hourlyBillingFlag": true, +// "localDiskFlag": true, +// "operatingSystemReferenceCode": "UBUNTU_LATEST" +// }, +// { +// "hostname": "host2", +// "domain": "example.com", +// "startCpus": 1, +// "maxMemory": 1024, +// "hourlyBillingFlag": true, +// "localDiskFlag": true, +// "operatingSystemReferenceCode": "UBUNTU_LATEST" +// } +// ] +// ] +// }' https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/createObjects.json +// // // HTTP/1.1 200 OK // -// // [ -// { -// "accountId": 232298, -// "createDate": "2012-11-30T23:56:48-06:00", -// "dedicatedAccountHostOnlyFlag": false, -// "domain": "softlayer.com", -// "hostname": "ubuntu1", -// "id": 1301456, -// "lastPowerStateId": null, -// "lastVerifiedDate": null, -// "maxCpu": 1, -// "maxCpuUnits": "CORE", -// "maxMemory": 1024, -// "metricPollDate": null, -// "modifyDate": null, -// "privateNetworkOnlyFlag": false, -// "startCpus": 1, -// "statusId": 1001, -// "globalIdentifier": "fed4c822-48c0-45d0-85e2-90476aa0c542" -// }, -// { -// "accountId": 232298, -// "createDate": "2012-11-30T23:56:49-06:00", -// "dedicatedAccountHostOnlyFlag": false, -// "domain": "softlayer.com", -// "hostname": "ubuntu2", -// "id": 1301457, -// "lastPowerStateId": null, -// "lastVerifiedDate": null, -// "maxCpu": 1, -// "maxCpuUnits": "CORE", -// "maxMemory": 1024, -// "metricPollDate": null, -// "modifyDate": null, -// "privateNetworkOnlyFlag": false, -// "startCpus": 1, -// "statusId": 1001, -// "globalIdentifier": "bed4c686-9562-4ade-9049-dc4d5b6b200c" -// } +// +// { +// "accountId": 232298, +// "createDate": "2012-11-30T23:56:48-06:00", +// "dedicatedAccountHostOnlyFlag": false, +// "domain": "softlayer.com", +// "hostname": "ubuntu1", +// "id": 1301456, +// "lastPowerStateId": null, +// "lastVerifiedDate": null, +// "maxCpu": 1, +// "maxCpuUnits": "CORE", +// "maxMemory": 1024, +// "metricPollDate": null, +// "modifyDate": null, +// "privateNetworkOnlyFlag": false, +// "startCpus": 1, +// "statusId": 1001, +// "globalIdentifier": "fed4c822-48c0-45d0-85e2-90476aa0c542" +// }, +// { +// "accountId": 232298, +// "createDate": "2012-11-30T23:56:49-06:00", +// "dedicatedAccountHostOnlyFlag": false, +// "domain": "softlayer.com", +// "hostname": "ubuntu2", +// "id": 1301457, +// "lastPowerStateId": null, +// "lastVerifiedDate": null, +// "maxCpu": 1, +// "maxCpuUnits": "CORE", +// "maxMemory": 1024, +// "metricPollDate": null, +// "modifyDate": null, +// "privateNetworkOnlyFlag": false, +// "startCpus": 1, +// "statusId": 1001, +// "globalIdentifier": "bed4c686-9562-4ade-9049-dc4d5b6b200c" +// } +// // ] // func (r Virtual_Guest) CreateObjects(templateObjects []datatypes.Virtual_Guest) (resp []datatypes.Virtual_Guest, err error) { @@ -789,7 +795,6 @@ func (r Virtual_Guest) CreatePostSoftwareInstallTransaction(data *string, return return } -// // This method will cancel a computing instance effective immediately. For instances billed hourly, the charges will stop immediately after the method returns. func (r Virtual_Guest) DeleteObject() (resp bool, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "deleteObject", nil, &r.Options, &resp) @@ -878,13 +883,10 @@ func (r Virtual_Guest) FindByIpAddress(ipAddress *string) (resp datatypes.Virtua return } -// // Obtain an [[SoftLayer_Container_Product_Order_Virtual_Guest (type)|order container]] that can be sent to [[SoftLayer_Product_Order/verifyOrder|verifyOrder]] or [[SoftLayer_Product_Order/placeOrder|placeOrder]]. // -// // This is primarily useful when there is a necessity to confirm the price which will be charged for an order. // -// // See [[SoftLayer_Virtual_Guest/createObject|createObject]] for specifics on the requirements of the template object parameter. func (r Virtual_Guest) GenerateOrderTemplate(templateObject *datatypes.Virtual_Guest) (resp datatypes.Container_Product_Order, err error) { params := []interface{}{ @@ -1231,10 +1233,8 @@ func (r Virtual_Guest) GetCpuMetricImageByDate(startDateTime *datatypes.Time, en return } -// // There are many options that may be provided while ordering a computing instance, this method can be used to determine what these options are. // -// // Detailed information on the return value can be found on the data type page for [[SoftLayer_Container_Virtual_Guest_Configuration (type)]]. func (r Virtual_Guest) GetCreateObjectOptions() (resp datatypes.Container_Virtual_Guest_Configuration, err error) { err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getCreateObjectOptions", nil, &r.Options, &resp) @@ -3514,7 +3514,7 @@ func (r Virtual_Storage_Repository) GetType() (resp datatypes.Virtual_Storage_Re return } -// Retrieve disk usage data on a [[SoftLayer_Virtual_Guest|Cloud Computing Instance]] image for the time range you provide. Each data entry objects contain ''dateTime'' and ''counter'' properties. ''dateTime'' property indicates the time that the disk usage data was measured and ''counter'' property holds the disk usage in bytes. +// Retrieve disk usage data on a [[SoftLayer_Virtual_Guest|Cloud Computing Instance]] image for the time range you provide. Each data entry objects contain ”dateTime” and ”counter” properties. ”dateTime” property indicates the time that the disk usage data was measured and ”counter” property holds the disk usage in bytes. func (r Virtual_Storage_Repository) GetUsageMetricDataByDate(startDateTime *datatypes.Time, endDateTime *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { params := []interface{}{ startDateTime, diff --git a/session/session.go b/session/session.go index 48ae861..5bdc87f 100644 --- a/session/session.go +++ b/session/session.go @@ -25,7 +25,6 @@ import ( "net/http" "os" "os/user" - "runtime" "strings" "time" @@ -356,10 +355,11 @@ func isRetryable(err error) bool { return isTimeout(err) || hasRetryableCode(err) } +// Set ENV Variable SL_USERAGENT to append that to the useragent string func getDefaultUserAgent() string { - return fmt.Sprintf("softlayer-go/%s (%s;%s;%s)", sl.Version.String(), - runtime.Version(), - runtime.GOARCH, - runtime.GOOS, - ) + envAgent := os.Getenv("SL_USERAGENT") + if envAgent != "" { + envAgent = fmt.Sprintf("(%s)", envAgent) + } + return fmt.Sprintf("softlayer-go/%s %s ", sl.Version.String(), envAgent) } diff --git a/session/session_test.go b/session/session_test.go index d16115e..d18cd48 100644 --- a/session/session_test.go +++ b/session/session_test.go @@ -1,8 +1,10 @@ package session import ( + "os" "strings" "testing" + "time" ) func TestSession_WithDefaultUserAgent(t *testing.T) { @@ -14,15 +16,37 @@ func TestSession_WithDefaultUserAgent(t *testing.T) { } } +func TestSession_WithOSENV(t *testing.T) { + + old, exists := os.LookupEnv("SL_USERAGENT") + os.Setenv("SL_USERAGENT", "session_test") + expected := getDefaultUserAgent() + + if !strings.Contains(expected, "session_test") { + t.Errorf("UserAgent '%s' does not contain %s", expected, "session_test") + } + if exists { + os.Setenv("SL_USERAGENT", old) + } else { + os.Unsetenv("SL_USERAGENT") + } +} + func TestAddToUserAgent(t *testing.T) { s := New() + defaultUA := getDefaultUserAgent() ua := "product/v1 ( myproduct )" s.AppendUserAgent(ua) if !strings.HasSuffix(s.userAgent, ua) { t.Errorf("UserAgent expected to end with %s, but ends with %s", ua, s.userAgent) } - if !strings.HasPrefix(s.userAgent, getDefaultUserAgent()) { - t.Errorf("UserAgent expected to start with %s, but starts with %s", getDefaultUserAgent(), s.userAgent) + if !strings.HasPrefix(s.userAgent, defaultUA) { + t.Errorf("UserAgent expected to start with %s, but starts with %s", defaultUA, s.userAgent) + } + oldUa := s.userAgent + s.AppendUserAgent("") + if oldUa != s.userAgent { + t.Errorf("UserAgent changed. Old: '%s', New: '%s'", oldUa, s.userAgent) } } @@ -35,3 +59,40 @@ func TestResetUserAgent(t *testing.T) { t.Errorf("UserAgent expected to reset to %s, but found to be %s", getDefaultUserAgent(), s.userAgent) } } + +func TestSetTimeout(t *testing.T) { + s := New() + newTimeout, err := time.ParseDuration("192s") + if err != nil { + t.Errorf("Failed to get a time duration: %v", err) + } + s = s.SetTimeout(newTimeout) + + if s.Timeout != newTimeout { + t.Errorf("Session.Timeout (%v) != newTimeout (%v)", s.Timeout, newTimeout) + } +} + +func TestSetRetryWait(t *testing.T) { + s := New() + newTimeout, err := time.ParseDuration("192s") + if err != nil { + t.Errorf("Failed to get a time duration: %v", err) + } + s = s.SetRetryWait(newTimeout) + + if s.RetryWait != newTimeout { + t.Errorf("Session.RetryWait (%v) != newTimeout (%v)", s.RetryWait, newTimeout) + } +} + +func TestSetRetries(t *testing.T) { + s := New() + newVariable := 10 + + s = s.SetRetries(newVariable) + + if s.Retries != newVariable { + t.Errorf("Session.Retries (%v) != newVariable (%v)", s.Retries, newVariable) + } +} diff --git a/session/sessionfakes/fake_transport_handler.go b/session/sessionfakes/fake_transport_handler.go new file mode 100644 index 0000000..07acdd8 --- /dev/null +++ b/session/sessionfakes/fake_transport_handler.go @@ -0,0 +1,126 @@ +// Code generated by counterfeiter. DO NOT EDIT. +package sessionfakes + +import ( + "sync" + + "github.com/softlayer/softlayer-go/session" + "github.com/softlayer/softlayer-go/sl" +) + +type FakeTransportHandler struct { + DoRequestStub func(*session.Session, string, string, []interface{}, *sl.Options, interface{}) error + doRequestMutex sync.RWMutex + doRequestArgsForCall []struct { + arg1 *session.Session + arg2 string + arg3 string + arg4 []interface{} + arg5 *sl.Options + arg6 interface{} + } + doRequestReturns struct { + result1 error + } + doRequestReturnsOnCall map[int]struct { + result1 error + } + invocations map[string][][]interface{} + invocationsMutex sync.RWMutex +} + +func (fake *FakeTransportHandler) DoRequest(arg1 *session.Session, arg2 string, arg3 string, arg4 []interface{}, arg5 *sl.Options, arg6 interface{}) error { + var arg4Copy []interface{} + if arg4 != nil { + arg4Copy = make([]interface{}, len(arg4)) + copy(arg4Copy, arg4) + } + fake.doRequestMutex.Lock() + ret, specificReturn := fake.doRequestReturnsOnCall[len(fake.doRequestArgsForCall)] + fake.doRequestArgsForCall = append(fake.doRequestArgsForCall, struct { + arg1 *session.Session + arg2 string + arg3 string + arg4 []interface{} + arg5 *sl.Options + arg6 interface{} + }{arg1, arg2, arg3, arg4Copy, arg5, arg6}) + fake.recordInvocation("DoRequest", []interface{}{arg1, arg2, arg3, arg4Copy, arg5, arg6}) + fake.doRequestMutex.Unlock() + if fake.DoRequestStub != nil { + return fake.DoRequestStub(arg1, arg2, arg3, arg4, arg5, arg6) + } + if specificReturn { + return ret.result1 + } + fakeReturns := fake.doRequestReturns + return fakeReturns.result1 +} + +func (fake *FakeTransportHandler) DoRequestCallCount() int { + fake.doRequestMutex.RLock() + defer fake.doRequestMutex.RUnlock() + return len(fake.doRequestArgsForCall) +} + +func (fake *FakeTransportHandler) DoRequestCalls(stub func(*session.Session, string, string, []interface{}, *sl.Options, interface{}) error) { + fake.doRequestMutex.Lock() + defer fake.doRequestMutex.Unlock() + fake.DoRequestStub = stub +} + +func (fake *FakeTransportHandler) DoRequestArgsForCall(i int) (*session.Session, string, string, []interface{}, *sl.Options, interface{}) { + fake.doRequestMutex.RLock() + defer fake.doRequestMutex.RUnlock() + argsForCall := fake.doRequestArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5, argsForCall.arg6 +} + +func (fake *FakeTransportHandler) DoRequestReturns(result1 error) { + fake.doRequestMutex.Lock() + defer fake.doRequestMutex.Unlock() + fake.DoRequestStub = nil + fake.doRequestReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeTransportHandler) DoRequestReturnsOnCall(i int, result1 error) { + fake.doRequestMutex.Lock() + defer fake.doRequestMutex.Unlock() + fake.DoRequestStub = nil + if fake.doRequestReturnsOnCall == nil { + fake.doRequestReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.doRequestReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeTransportHandler) Invocations() map[string][][]interface{} { + fake.invocationsMutex.RLock() + defer fake.invocationsMutex.RUnlock() + fake.doRequestMutex.RLock() + defer fake.doRequestMutex.RUnlock() + copiedInvocations := map[string][][]interface{}{} + for key, value := range fake.invocations { + copiedInvocations[key] = value + } + return copiedInvocations +} + +func (fake *FakeTransportHandler) recordInvocation(key string, args []interface{}) { + fake.invocationsMutex.Lock() + defer fake.invocationsMutex.Unlock() + if fake.invocations == nil { + fake.invocations = map[string][][]interface{}{} + } + if fake.invocations[key] == nil { + fake.invocations[key] = [][]interface{}{} + } + fake.invocations[key] = append(fake.invocations[key], args) +} + +var _ session.TransportHandler = new(FakeTransportHandler) diff --git a/sl/version.go b/sl/version.go index 8f36a8d..a01c245 100644 --- a/sl/version.go +++ b/sl/version.go @@ -30,10 +30,10 @@ type VersionInfo struct { } var Version = VersionInfo{ - Major: 0, + Major: 1, Minor: 1, Patch: 0, - Pre: "alpha", + Pre: "", } func (v VersionInfo) String() string { diff --git a/tools/main.go b/tools/main.go index 6e83490..f03363b 100644 --- a/tools/main.go +++ b/tools/main.go @@ -27,8 +27,7 @@ Commands: generate: Generate the SDK from the API metadata - version: library version management -` + version: library version management` func main() { if len(os.Args) < 2 {