Skip to content

Commit

Permalink
Merge pull request #192 from softlayer/20240523
Browse files Browse the repository at this point in the history
20240523 Updates
  • Loading branch information
allmightyspiff authored May 23, 2024
2 parents 1882591 + 4142df4 commit 386f1c8
Show file tree
Hide file tree
Showing 14 changed files with 318 additions and 583 deletions.
12 changes: 6 additions & 6 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "go.sum|^.secrets.baseline$",
"lines": null
},
"generated_at": "2024-04-18T14:44:04Z",
"generated_at": "2024-05-23T19:37:19Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -126,39 +126,39 @@
"hashed_secret": "319f96013e95ce7556aa082a9dd58dce40aeff0f",
"is_secret": false,
"is_verified": false,
"line_number": 1870,
"line_number": 1877,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "fa9250fd74ad6c9f6737049b5bd842709fbf4ae3",
"is_secret": false,
"is_verified": false,
"line_number": 1877,
"line_number": 1884,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "bf9130647c179bd2b6992bcf2db4560b91bc513d",
"is_secret": false,
"is_verified": false,
"line_number": 1884,
"line_number": 1891,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "0f39e6d6c8aafa1e3e723d1b06aef02ead75b908",
"is_secret": false,
"is_verified": false,
"line_number": 1891,
"line_number": 1898,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "5487abf5507e25b18b47a3e8cd1ecfdea8c0e9e9",
"is_secret": false,
"is_verified": false,
"line_number": 1898,
"line_number": 1905,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down
24 changes: 17 additions & 7 deletions datatypes/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ type Account struct {
// Private template group objects (parent and children) and the shared template group objects (parent only) for an account.
BlockDeviceTemplateGroups []Virtual_Guest_Block_Device_Template_Group `json:"blockDeviceTemplateGroups,omitempty" xmlrpc:"blockDeviceTemplateGroups,omitempty"`

// Flag indicating whether this account is restricted from performing a self-service brand migration by updating their credit card details.
BlockSelfServiceBrandMigration *bool `json:"blockSelfServiceBrandMigration,omitempty" xmlrpc:"blockSelfServiceBrandMigration,omitempty"`

// no documentation yet
BluemixAccountId *string `json:"bluemixAccountId,omitempty" xmlrpc:"bluemixAccountId,omitempty"`

Expand Down Expand Up @@ -423,13 +426,6 @@ type Account struct {
// no documentation yet
GlobalIpv6Records []Network_Subnet_IpAddress_Global `json:"globalIpv6Records,omitempty" xmlrpc:"globalIpv6Records,omitempty"`

// A count of [Deprecated] The global load balancer accounts for a softlayer customer account.
GlobalLoadBalancerAccountCount *uint `json:"globalLoadBalancerAccountCount,omitempty" xmlrpc:"globalLoadBalancerAccountCount,omitempty"`

// [Deprecated] The global load balancer accounts for a softlayer customer account.
// Deprecated: This function has been marked as deprecated.
GlobalLoadBalancerAccounts []Network_LoadBalancer_Global_Account `json:"globalLoadBalancerAccounts,omitempty" xmlrpc:"globalLoadBalancerAccounts,omitempty"`

// An account's associated hardware objects.
Hardware []Hardware `json:"hardware,omitempty" xmlrpc:"hardware,omitempty"`

Expand Down Expand Up @@ -3082,3 +3078,17 @@ type Account_Status struct {
// no documentation yet
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
}

// no documentation yet
type Account_Status_Change_Reason struct {
Entity

// no documentation yet
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`

// no documentation yet
KeyName *string `json:"keyName,omitempty" xmlrpc:"keyName,omitempty"`

// no documentation yet
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
}
10 changes: 0 additions & 10 deletions datatypes/billing.go
Original file line number Diff line number Diff line change
Expand Up @@ -1522,16 +1522,6 @@ type Billing_Item_Network_LoadBalancer struct {
Billing_Item
}

// The global load balancer service has been deprecated and is no longer available.
//
// The SoftLayer_Billing_Item_Network_LoadBalancer_Global data type contains general information relating to a single SoftLayer billing item whose item category code is 'global_load_balancer'
type Billing_Item_Network_LoadBalancer_Global struct {
Billing_Item

// The resource for a global load balancer billing item.
Resource *Network_LoadBalancer_Global_Account `json:"resource,omitempty" xmlrpc:"resource,omitempty"`
}

// A SoftLayer_Billing_Item_Network_LoadBalancer_VirtualIpAddress represents the [[SoftLayer_Billing_Item|billing item]] related to a single [[SoftLayer_Network_LoadBalancer_VirtualIpAddress|load balancer]] instance.
type Billing_Item_Network_LoadBalancer_VirtualIpAddress struct {
Billing_Item
Expand Down
13 changes: 0 additions & 13 deletions datatypes/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -3946,19 +3946,6 @@ type Container_Product_Order_Network_LoadBalancer_AsAService struct {
UseSystemPublicIpPool *bool `json:"useSystemPublicIpPool,omitempty" xmlrpc:"useSystemPublicIpPool,omitempty"`
}

// The global load balancer service has been deprecated and is no longer available.
//
// This is the datatype that needs to be populated and sent to SoftLayer_Product_Order::placeOrder. This datatype has everything required to place a global load balancer order with SoftLayer.
type Container_Product_Order_Network_LoadBalancer_Global struct {
Container_Product_Order

// The domain name that will be load balanced.
Domain *string `json:"domain,omitempty" xmlrpc:"domain,omitempty"`

// The hostname that will be load balanced.
Hostname *string `json:"hostname,omitempty" xmlrpc:"hostname,omitempty"`
}

// This is the datatype that needs to be populated and sent to SoftLayer_Product_Order::placeOrder. This datatype has everything required to place a network message delivery order with SoftLayer.
type Container_Product_Order_Network_Message_Delivery struct {
Container_Product_Order
Expand Down
1 change: 1 addition & 0 deletions datatypes/location.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type Location struct {
BackboneDependentCount *uint `json:"backboneDependentCount,omitempty" xmlrpc:"backboneDependentCount,omitempty"`

// no documentation yet
// Deprecated: This function has been marked as deprecated.
BackboneDependents []Network_Backbone_Location_Dependent `json:"backboneDependents,omitempty" xmlrpc:"backboneDependents,omitempty"`

// A flag indicating whether or not the datacenter/location is BNPP compliant.
Expand Down
112 changes: 8 additions & 104 deletions datatypes/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -567,19 +567,22 @@ type Network_Backbone struct {
// The unit portion of the bandwidth capacity of a SoftLayer backbone. For instance, if a backbone is rated at "10 G" capacity then the capacityUnits property of the backbone is "G".
CapacityUnits *string `json:"capacityUnits,omitempty" xmlrpc:"capacityUnits,omitempty"`

// A backbone's status.
// [Deprecated] A backbone's status.
// Deprecated: This function has been marked as deprecated.
Health *string `json:"health,omitempty" xmlrpc:"health,omitempty"`

// A backbone's internal identifier.
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`

// Which of the SoftLayer datacenters a backbone is connected to.
// [Deprecated] Which of the SoftLayer datacenters a backbone is connected to.
// Deprecated: This function has been marked as deprecated.
Location *Location `json:"location,omitempty" xmlrpc:"location,omitempty"`

// A backbone's name. This is usually the name of the backbone's network provider followed by a number in case SoftLayer uses more than one backbone from a provider. Backbone provider numbers start with the number one and increment from there.
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`

// A backbone's primary network component.
// [Deprecated] A backbone's primary network component.
// Deprecated: This function has been marked as deprecated.
NetworkComponent *Network_Component `json:"networkComponent,omitempty" xmlrpc:"networkComponent,omitempty"`

// The internal identifier of the network component that backbone is connected to.
Expand All @@ -594,6 +597,7 @@ type Network_Backbone_Location_Dependent struct {
Entity

// no documentation yet
// Deprecated: This function has been marked as deprecated.
DependentLocation *Location `json:"dependentLocation,omitempty" xmlrpc:"dependentLocation,omitempty"`

// no documentation yet
Expand All @@ -603,6 +607,7 @@ type Network_Backbone_Location_Dependent struct {
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`

// no documentation yet
// Deprecated: This function has been marked as deprecated.
SourceLocation *Location `json:"sourceLocation,omitempty" xmlrpc:"sourceLocation,omitempty"`

// no documentation yet
Expand Down Expand Up @@ -1883,9 +1888,6 @@ type Network_Gateway_Member_Attribute struct {
// Username associated with the gateway.
Username *string `json:"username,omitempty" xmlrpc:"username,omitempty"`

// The vSRX version of the gateway software
VSRXVersion *string `json:"vSRXVersion,omitempty" xmlrpc:"vSRXVersion,omitempty"`

// The version of the gateway software
Version *string `json:"version,omitempty" xmlrpc:"version,omitempty"`

Expand Down Expand Up @@ -2738,104 +2740,6 @@ type Network_LBaaS_SessionAffinity struct {
Type *string `json:"type,omitempty" xmlrpc:"type,omitempty"`
}

// The global load balancer service has been deprecated and is no longer available.
type Network_LoadBalancer_Global_Account struct {
Entity

// Your SoftLayer customer account.
Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"`

// The maximum number of hosts that a global load balancer account is allowed to have.
AllowedNumberOfHosts *int `json:"allowedNumberOfHosts,omitempty" xmlrpc:"allowedNumberOfHosts,omitempty"`

// The average amount of connections per second used within the current billing cycle. This number is updated daily.
AverageConnectionsPerSecond *Float64 `json:"averageConnectionsPerSecond,omitempty" xmlrpc:"averageConnectionsPerSecond,omitempty"`

// The current billing item for a Global Load Balancer account.
BillingItem *Billing_Item `json:"billingItem,omitempty" xmlrpc:"billingItem,omitempty"`

// The amount of connections per second a global load balancer account may use within a billing cycle without being billed for an overage.
ConnectionsPerSecond *int `json:"connectionsPerSecond,omitempty" xmlrpc:"connectionsPerSecond,omitempty"`

// The IP address that will be return to a DNS request when none of the hosts for a global load balancer account could be returned.
FallbackIp *string `json:"fallbackIp,omitempty" xmlrpc:"fallbackIp,omitempty"`

// A count of the hosts in the load balancing pool for a global load balancer account.
HostCount *uint `json:"hostCount,omitempty" xmlrpc:"hostCount,omitempty"`

// The hostname of a global load balancer account that is being load balanced.
Hostname *string `json:"hostname,omitempty" xmlrpc:"hostname,omitempty"`

// The hosts in the load balancing pool for a global load balancer account.
Hosts []Network_LoadBalancer_Global_Host `json:"hosts,omitempty" xmlrpc:"hosts,omitempty"`

// The unique identifier of a global load balancer account.
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`

// The load balance method of a global load balancer account
LoadBalanceType *Network_LoadBalancer_Global_Type `json:"loadBalanceType,omitempty" xmlrpc:"loadBalanceType,omitempty"`

// The identifier of the load balance method for a global load balancer account.
LoadBalanceTypeId *int `json:"loadBalanceTypeId,omitempty" xmlrpc:"loadBalanceTypeId,omitempty"`

// A flag indicating that the global load balancer is a managed resource.
ManagedResourceFlag *bool `json:"managedResourceFlag,omitempty" xmlrpc:"managedResourceFlag,omitempty"`

// Additional customer defined information for a global load balancer account.
Notes *string `json:"notes,omitempty" xmlrpc:"notes,omitempty"`
}

// The global load balancer service has been deprecated and is no longer available.
type Network_LoadBalancer_Global_Host struct {
Entity

// The IP address of the host that will be returned by the global load balancers in response to a dns request.
DestinationIp *string `json:"destinationIp,omitempty" xmlrpc:"destinationIp,omitempty"`

// The port of the host that will be used for health checks.
DestinationPort *int `json:"destinationPort,omitempty" xmlrpc:"destinationPort,omitempty"`

// Whether the host is enabled or not. The value can be '0' for disabled, or '1' for enabled.
Enabled *int `json:"enabled,omitempty" xmlrpc:"enabled,omitempty"`

// The health check type of a host. Valid values include 'none', 'http', and 'tcp'.
HealthCheck *string `json:"healthCheck,omitempty" xmlrpc:"healthCheck,omitempty"`

// The number of times the host was selected by the load balance method.
Hits *Float64 `json:"hits,omitempty" xmlrpc:"hits,omitempty"`

// The unique identifier of a global load balancer host.
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`

// The order of this host within the load balance pool. This is only significant if the load balance method is set to failover.
LoadBalanceOrder *int `json:"loadBalanceOrder,omitempty" xmlrpc:"loadBalanceOrder,omitempty"`

// The global load balancer account a host belongs to.
LoadBalancerAccount *Network_LoadBalancer_Global_Account `json:"loadBalancerAccount,omitempty" xmlrpc:"loadBalancerAccount,omitempty"`

// The location of a host in a datacenter.serverRoom format.
Location *string `json:"location,omitempty" xmlrpc:"location,omitempty"`

// The health status of a host. The status can be either 'UP', 'DOWN', or null which could mean that the health check type is set to 'none' or an update to the ip, port, or health check type was recently done and the host is waiting for the new status.
Status *string `json:"status,omitempty" xmlrpc:"status,omitempty"`

// The load balance weight of a host. The total weight of all hosts in the load balancing pool must not exceed 100.
Weight *int `json:"weight,omitempty" xmlrpc:"weight,omitempty"`
}

// The global load balancer service has been deprecated and is no longer available.
//
// The SoftLayer_Network_LoadBalancer_Global_Type data type represents a single load balance method that can be assigned to a global load balancer account. The load balance method determines how hosts in a load balancing pool are chosen by the global load balancers.
type Network_LoadBalancer_Global_Type struct {
Entity

// The unique identifier of a load balance method.
Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"`

// The name of a load balance method.
Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"`
}

// The SoftLayer_Network_LoadBalancer_Service data type contains all the information relating to a specific service (destination) on a particular load balancer.
//
// Information retained on the object itself is the the source and destination of the service, routing type, weight, and whether or not the service is currently enabled.
Expand Down
67 changes: 60 additions & 7 deletions services/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,12 @@ func (r Account) GetBlockDeviceTemplateGroups() (resp []datatypes.Virtual_Guest_
return
}

// Retrieve Flag indicating whether this account is restricted from performing a self-service brand migration by updating their credit card details.
func (r Account) GetBlockSelfServiceBrandMigration() (resp bool, err error) {
err = r.Session.DoRequest("SoftLayer_Account", "getBlockSelfServiceBrandMigration", nil, &r.Options, &resp)
return
}

// Retrieve
func (r Account) GetBluemixAccountId() (resp string, err error) {
err = r.Session.DoRequest("SoftLayer_Account", "getBluemixAccountId", nil, &r.Options, &resp)
Expand Down Expand Up @@ -747,12 +753,6 @@ func (r Account) GetGlobalIpv6Records() (resp []datatypes.Network_Subnet_IpAddre
return
}

// Retrieve [Deprecated] The global load balancer accounts for a softlayer customer account.
func (r Account) GetGlobalLoadBalancerAccounts() (resp []datatypes.Network_LoadBalancer_Global_Account, err error) {
err = r.Session.DoRequest("SoftLayer_Account", "getGlobalLoadBalancerAccounts", nil, &r.Options, &resp)
return
}

// Retrieve An account's associated hardware objects.
func (r Account) GetHardware() (resp []datatypes.Hardware, err error) {
err = r.Session.DoRequest("SoftLayer_Account", "getHardware", nil, &r.Options, &resp)
Expand Down Expand Up @@ -3505,9 +3505,10 @@ func (r Account_Lockdown_Request) CancelRequest() (err error) {
}

// Takes the original lockdown request ID, and an optional disable date. If no date is passed with the API call, the account will be disabled immediately. Otherwise, the account will be disabled on the date given. All hardware will be reclaimed and all accounts permanently disabled.
func (r Account_Lockdown_Request) DisableLockedAccount(disableDate *string) (resp int, err error) {
func (r Account_Lockdown_Request) DisableLockedAccount(disableDate *string, statusChangeReasonKeyName *string) (resp int, err error) {
params := []interface{}{
disableDate,
statusChangeReasonKeyName,
}
err = r.Session.DoRequest("SoftLayer_Account_Lockdown_Request", "disableLockedAccount", params, &r.Options, &resp)
return
Expand Down Expand Up @@ -5580,3 +5581,55 @@ func (r Account_Shipment_Type) GetObject() (resp datatypes.Account_Shipment_Type
err = r.Session.DoRequest("SoftLayer_Account_Shipment_Type", "getObject", nil, &r.Options, &resp)
return
}

// no documentation yet
type Account_Status_Change_Reason struct {
Session session.SLSession
Options sl.Options
}

// GetAccountStatusChangeReasonService returns an instance of the Account_Status_Change_Reason SoftLayer service
func GetAccountStatusChangeReasonService(sess session.SLSession) Account_Status_Change_Reason {
return Account_Status_Change_Reason{Session: sess}
}

func (r Account_Status_Change_Reason) Id(id int) Account_Status_Change_Reason {
r.Options.Id = &id
return r
}

func (r Account_Status_Change_Reason) Mask(mask string) Account_Status_Change_Reason {
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
mask = fmt.Sprintf("mask[%s]", mask)
}

r.Options.Mask = mask
return r
}

func (r Account_Status_Change_Reason) Filter(filter string) Account_Status_Change_Reason {
r.Options.Filter = filter
return r
}

func (r Account_Status_Change_Reason) Limit(limit int) Account_Status_Change_Reason {
r.Options.Limit = &limit
return r
}

func (r Account_Status_Change_Reason) Offset(offset int) Account_Status_Change_Reason {
r.Options.Offset = &offset
return r
}

// no documentation yet
func (r Account_Status_Change_Reason) GetAllObjects() (resp []datatypes.Account_Status_Change_Reason, err error) {
err = r.Session.DoRequest("SoftLayer_Account_Status_Change_Reason", "getAllObjects", nil, &r.Options, &resp)
return
}

// no documentation yet
func (r Account_Status_Change_Reason) GetObject() (resp datatypes.Account_Status_Change_Reason, err error) {
err = r.Session.DoRequest("SoftLayer_Account_Status_Change_Reason", "getObject", nil, &r.Options, &resp)
return
}
Loading

0 comments on commit 386f1c8

Please sign in to comment.