From b7257b37c00e25cbf3d6f9a51d5a4e79c2376e06 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sun, 1 Nov 2020 00:23:46 +0000 Subject: [PATCH] Updated generated classes on Sun Nov 1 00:23:46 UTC 2020 --- datatypes/configuration.go | 2 +- datatypes/container.go | 25 +- datatypes/hardware.go | 2 +- datatypes/monitoring.go | 165 ----------- datatypes/security.go | 2 +- datatypes/virtual.go | 3 + services/hardware.go | 6 +- services/monitoring.go | 542 ------------------------------------- services/network.go | 52 ++++ services/security.go | 2 +- 10 files changed, 77 insertions(+), 724 deletions(-) diff --git a/datatypes/configuration.go b/datatypes/configuration.go index 65b45c1..c4e9a7d 100644 --- a/datatypes/configuration.go +++ b/datatypes/configuration.go @@ -45,7 +45,7 @@ type Configuration_Storage_Group struct { ArrayType *Configuration_Storage_Group_Array_Type `json:"arrayType,omitempty" xmlrpc:"arrayType,omitempty"` // Determine if the storage group is able to be image captured. If unable to image capture the reasons will be provided. - CaptureEnabledFlag *string `json:"captureEnabledFlag,omitempty" xmlrpc:"captureEnabledFlag,omitempty"` + CaptureEnabledFlag *Container_Hardware_CaptureEnabled `json:"captureEnabledFlag,omitempty" xmlrpc:"captureEnabledFlag,omitempty"` // no documentation yet CreateEmployee *User_Employee `json:"createEmployee,omitempty" xmlrpc:"createEmployee,omitempty"` diff --git a/datatypes/container.go b/datatypes/container.go index 100bb8d..7d85032 100644 --- a/datatypes/container.go +++ b/datatypes/container.go @@ -259,9 +259,6 @@ type Container_Account_Historical_Summary_Detail_Uptime struct { // The hardware for uptime details. CloudComputingInstance *Virtual_Guest `json:"cloudComputingInstance,omitempty" xmlrpc:"cloudComputingInstance,omitempty"` - // The configuration value for the detail's resource. - ConfigurationValue *Monitoring_Agent_Configuration_Value `json:"configurationValue,omitempty" xmlrpc:"configurationValue,omitempty"` - // The data associated with a host uptime details. Data []Metric_Tracking_Object_Data `json:"data,omitempty" xmlrpc:"data,omitempty"` @@ -1733,6 +1730,17 @@ type Container_Graph_Plot_Coordinate struct { ZValue *Float64 `json:"zValue,omitempty" xmlrpc:"zValue,omitempty"` } +// no documentation yet +type Container_Hardware_CaptureEnabled struct { + Entity + + // no documentation yet + Enabled *bool `json:"enabled,omitempty" xmlrpc:"enabled,omitempty"` + + // no documentation yet + Reasons []string `json:"reasons,omitempty" xmlrpc:"reasons,omitempty"` +} + // The hardware configuration container is used to provide configuration options for servers. // // Each configuration option will include both an itemPrice and a template. @@ -4000,7 +4008,7 @@ type Container_Product_Order_Hardware_Server struct { // Array of disk drive slot categories to destroy on reclaim. For example: ['disk0', 'disk1', 'disk2']. One drive_destruction price must be included for each slot provided. Note that once the initial order or upgrade order are approved, the destruction property is not removable and the drives will be destroyed at the end of the server's lifecycle. Not all drive slots are required, but all can be provided. DriveDestructionDisks []string `json:"driveDestructionDisks,omitempty" xmlrpc:"driveDestructionDisks,omitempty"` - // Id of the [[SoftLayer_Monitoring_Agent_Configuration_Template_Group]] to be used with the monitoring package + // Id used with the monitoring package. (Deprecated) MonitoringAgentConfigurationTemplateGroupId *int `json:"monitoringAgentConfigurationTemplateGroupId,omitempty" xmlrpc:"monitoringAgentConfigurationTemplateGroupId,omitempty"` // When ordering Virtual Server (Private Node), this variable specifies the role of the server configuration. (Deprecated) @@ -4063,13 +4071,10 @@ type Container_Product_Order_Hardware_Server_Vpc struct { Zone *string `json:"zone,omitempty" xmlrpc:"zone,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 Monitoring Package order with SoftLayer. +// This is the datatype that needs to be populated and sent to SoftLayer_Product_Order::placeOrder. This datatype has everything required to place a Monitoring Package order with SoftLayer. This class is no longer available. type Container_Product_Order_Monitoring_Package struct { Container_Product_Order - // no documentation yet - ConfigurationTemplateGroups []Monitoring_Agent_Configuration_Template_Group `json:"configurationTemplateGroups,omitempty" xmlrpc:"configurationTemplateGroups,omitempty"` - // no documentation yet ServerType *string `json:"serverType,omitempty" xmlrpc:"serverType,omitempty"` } @@ -4638,7 +4643,7 @@ type Container_Product_Order_Security_Certificate struct { // Indicates if it is an renewal order of an existing SSL certificate. RenewalFlag *bool `json:"renewalFlag,omitempty" xmlrpc:"renewalFlag,omitempty"` - // The number of servers. + // (DEPRECATED) Do not set this property, as it will always be set to 1. ServerCount *int `json:"serverCount,omitempty" xmlrpc:"serverCount,omitempty"` // The server type. This is the name from a [[SoftLayer_Security_Certificate_Request_ServerType]] object. @@ -4647,7 +4652,7 @@ type Container_Product_Order_Security_Certificate struct { // The technical contact associated with a SSL certificate. If the address is not provided the organization information address will be used. TechnicalContact *Container_Product_Order_Attribute_Contact `json:"technicalContact,omitempty" xmlrpc:"technicalContact,omitempty"` - // The period that a SSL certificate is valid for. For example, 12, 24, 36 + // (DEPRECATED) The period that a SSL certificate is valid for. For example, 12, 24, 36. This property will be set automatically based on the certificate product ordered when verifying or placing orders. ValidityMonths *int `json:"validityMonths,omitempty" xmlrpc:"validityMonths,omitempty"` } diff --git a/datatypes/hardware.go b/datatypes/hardware.go index 0510a32..5f85f9e 100644 --- a/datatypes/hardware.go +++ b/datatypes/hardware.go @@ -1907,7 +1907,7 @@ type Hardware_Server struct { BiosPasswordNullFlag *bool `json:"biosPasswordNullFlag,omitempty" xmlrpc:"biosPasswordNullFlag,omitempty"` // Determine if the server is able to be image captured. If unable to image capture a reason will be provided. - CaptureEnabledFlag *string `json:"captureEnabledFlag,omitempty" xmlrpc:"captureEnabledFlag,omitempty"` + CaptureEnabledFlag *Container_Hardware_CaptureEnabled `json:"captureEnabledFlag,omitempty" xmlrpc:"captureEnabledFlag,omitempty"` // no documentation yet ContainsSolidStateDrivesFlag *bool `json:"containsSolidStateDrivesFlag,omitempty" xmlrpc:"containsSolidStateDrivesFlag,omitempty"` diff --git a/datatypes/monitoring.go b/datatypes/monitoring.go index a04deff..2d7521e 100644 --- a/datatypes/monitoring.go +++ b/datatypes/monitoring.go @@ -20,171 +20,6 @@ package datatypes -// A monitoring agent object contains information describing the agent. -type Monitoring_Agent struct { - Entity - - // The current status of the corresponding agent - AgentStatus *Monitoring_Agent_Status `json:"agentStatus,omitempty" xmlrpc:"agentStatus,omitempty"` - - // A count of all custom configuration profiles associated with the corresponding agent - ConfigurationProfileCount *uint `json:"configurationProfileCount,omitempty" xmlrpc:"configurationProfileCount,omitempty"` - - // All custom configuration profiles associated with the corresponding agent - ConfigurationProfiles []Configuration_Template_Section_Profile `json:"configurationProfiles,omitempty" xmlrpc:"configurationProfiles,omitempty"` - - // A template of an agent's current configuration which contains information about the structure of the configuration values. - ConfigurationTemplate *Configuration_Template `json:"configurationTemplate,omitempty" xmlrpc:"configurationTemplate,omitempty"` - - // Internal identifier of a configuration template that is used to configure this agent - ConfigurationTemplateId *int `json:"configurationTemplateId,omitempty" xmlrpc:"configurationTemplateId,omitempty"` - - // A count of the values associated with the corresponding Agent configuration. - ConfigurationValueCount *uint `json:"configurationValueCount,omitempty" xmlrpc:"configurationValueCount,omitempty"` - - // The values associated with the corresponding Agent configuration. - ConfigurationValues []Monitoring_Agent_Configuration_Value `json:"configurationValues,omitempty" xmlrpc:"configurationValues,omitempty"` - - // Created date - CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"` - - // SoftLayer hardware related to the agent. - Hardware *Hardware `json:"hardware,omitempty" xmlrpc:"hardware,omitempty"` - - // Internal identifier of a monitoring agent - Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"` - - // Last modified date - ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"` - - // Monitoring agent name - Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"` - - // Contains general information relating to a single SoftLayer product. - ProductItem *Product_Item `json:"productItem,omitempty" xmlrpc:"productItem,omitempty"` - - // Indicates if this monitoring agent resides on your local box or on a SoftLayer monitoring cluster. - RemoteMonitoringAgentFlag *bool `json:"remoteMonitoringAgentFlag,omitempty" xmlrpc:"remoteMonitoringAgentFlag,omitempty"` - - // Internal identifier of a monitoring robot that this agent belongs to - RobotId *int `json:"robotId,omitempty" xmlrpc:"robotId,omitempty"` - - // A description for a specific installation of a Software Component - SoftwareDescription *Software_Description `json:"softwareDescription,omitempty" xmlrpc:"softwareDescription,omitempty"` - - // Internal identifier of a monitoring agent status - StatusId *int `json:"statusId,omitempty" xmlrpc:"statusId,omitempty"` - - // Monitoring agent status name. - StatusName *string `json:"statusName,omitempty" xmlrpc:"statusName,omitempty"` - - // Softlayer_Virtual_Guest object related to the monitoring agent, which this virtual guest object and hardware is on the server of the running agent. - VirtualGuest *Virtual_Guest `json:"virtualGuest,omitempty" xmlrpc:"virtualGuest,omitempty"` -} - -// The SoftLayer_Monitoring_Agent_Configuration_Template_Group class is consisted of configuration templates for agents in a monitoring package. -type Monitoring_Agent_Configuration_Template_Group struct { - Entity - - // no documentation yet - Account *Account `json:"account,omitempty" xmlrpc:"account,omitempty"` - - // Internal identifier of a SoftLayer account that this configuration template belongs to - AccountId *int `json:"accountId,omitempty" xmlrpc:"accountId,omitempty"` - - // Created date - CreateDate *Time `json:"createDate,omitempty" xmlrpc:"createDate,omitempty"` - - // Description of a monitoring agent configuration group - Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"` - - // Internal identifier of a monitoring agent configuration group - Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"` - - // no documentation yet - Item *Product_Item `json:"item,omitempty" xmlrpc:"item,omitempty"` - - // Internal identifier of a configuration template type - ItemId *int `json:"itemId,omitempty" xmlrpc:"itemId,omitempty"` - - // Last modified date - ModifyDate *Time `json:"modifyDate,omitempty" xmlrpc:"modifyDate,omitempty"` - - // Name of a monitoring agent configuration group - Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"` -} - -// SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference class holds the reference information, essentially a SQL join, between a monitoring configuration group and agent configuration templates. -type Monitoring_Agent_Configuration_Template_Group_Reference struct { - Entity - - // no documentation yet - ConfigurationTemplate *Configuration_Template `json:"configurationTemplate,omitempty" xmlrpc:"configurationTemplate,omitempty"` - - // Internal identifier of a configuration template - ConfigurationTemplateId *int `json:"configurationTemplateId,omitempty" xmlrpc:"configurationTemplateId,omitempty"` - - // Internal identifier of a configuration group reference record - Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"` - - // no documentation yet - TemplateGroup *Monitoring_Agent_Configuration_Template_Group `json:"templateGroup,omitempty" xmlrpc:"templateGroup,omitempty"` - - // Internal identifier of a monitoring agent configuration group - TemplateGroupId *int `json:"templateGroupId,omitempty" xmlrpc:"templateGroupId,omitempty"` -} - -// Monitoring agent configuration value -type Monitoring_Agent_Configuration_Value struct { - Entity - - // Internal identifier of a monitoring Agent that this configuration value - AgentId *int `json:"agentId,omitempty" xmlrpc:"agentId,omitempty"` - - // Internal identifier of a monitoring configuration definition by which - ConfigurationDefinitionId *int `json:"configurationDefinitionId,omitempty" xmlrpc:"configurationDefinitionId,omitempty"` - - // no documentation yet - Definition *Configuration_Template_Section_Definition `json:"definition,omitempty" xmlrpc:"definition,omitempty"` - - // User-friendly description of a configuration value. - Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"` - - // Internal identifier of a monitoring configuration value. - Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"` - - // The metric data type used to retrieve metric data currently being tracked. - MetricDataType *Container_Metric_Data_Type `json:"metricDataType,omitempty" xmlrpc:"metricDataType,omitempty"` - - // no documentation yet - MonitoringAgent *Monitoring_Agent `json:"monitoringAgent,omitempty" xmlrpc:"monitoringAgent,omitempty"` - - // no documentation yet - Profile *Configuration_Template_Section_Profile `json:"profile,omitempty" xmlrpc:"profile,omitempty"` - - // Internal identifier of a configuration profile. Configuration profile is associated with a configuration section type of "Template section". - // - // A "Template section" defines skeleton configuration definitions. For instance, if you want to monitor additional hard disks with "CPU/Memory/Disk Monitoring Agent", you will have to add a new configuration profiles. - ProfileId *int `json:"profileId,omitempty" xmlrpc:"profileId,omitempty"` - - // Configuration value - Value *string `json:"value,omitempty" xmlrpc:"value,omitempty"` -} - -// Monitoring agent status -type Monitoring_Agent_Status struct { - Entity - - // Description of a monitoring agent status - Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"` - - // Internal identifier of a monitoring agent status - Id *int `json:"id,omitempty" xmlrpc:"id,omitempty"` - - // Monitoring agent status name - Name *string `json:"name,omitempty" xmlrpc:"name,omitempty"` -} - // The SoftLayer_Monitoring_Robot data type contains general information relating to a monitoring robot. type Monitoring_Robot struct { Entity diff --git a/datatypes/security.go b/datatypes/security.go index c359844..2a1dddb 100644 --- a/datatypes/security.go +++ b/datatypes/security.go @@ -130,7 +130,7 @@ type Security_Certificate_Entry struct { ValidityEnd *Time `json:"validityEnd,omitempty" xmlrpc:"validityEnd,omitempty"` } -// SoftLayer_Security_Certificate_Request data type is used to harness your SSL certificate order to a Certificate Authority. This contains data that is required by a Certificate Authority to place an SSL certificate order. +// The SoftLayer_Security_Certificate_Request data type is used to view details about your SSL certificate order. This contains data that is required by a Certificate Authority to place an SSL certificate order. type Security_Certificate_Request struct { Entity diff --git a/datatypes/virtual.go b/datatypes/virtual.go index 2af536c..ad6c783 100644 --- a/datatypes/virtual.go +++ b/datatypes/virtual.go @@ -118,6 +118,9 @@ type Virtual_Disk_Image struct { // A disk image's unique md5 checksum. Checksum *string `json:"checksum,omitempty" xmlrpc:"checksum,omitempty"` + // A column to save the Algorithm being used to store the checksum. + ChecksumAlgorithm *string `json:"checksumAlgorithm,omitempty" xmlrpc:"checksumAlgorithm,omitempty"` + // Check if cloud-init is enabled. CloudInitFlag *bool `json:"cloudInitFlag,omitempty" xmlrpc:"cloudInitFlag,omitempty"` diff --git a/services/hardware.go b/services/hardware.go index 79b23ca..08fa6a0 100644 --- a/services/hardware.go +++ b/services/hardware.go @@ -4298,7 +4298,7 @@ func (r Hardware_SecurityModule) GetBusinessContinuanceInsuranceFlag() (resp boo } // Retrieve Determine if the server is able to be image captured. If unable to image capture a reason will be provided. -func (r Hardware_SecurityModule) GetCaptureEnabledFlag() (resp string, err error) { +func (r Hardware_SecurityModule) GetCaptureEnabledFlag() (resp datatypes.Container_Hardware_CaptureEnabled, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule", "getCaptureEnabledFlag", nil, &r.Options, &resp) return } @@ -6662,7 +6662,7 @@ func (r Hardware_SecurityModule750) GetBusinessContinuanceInsuranceFlag() (resp } // Retrieve Determine if the server is able to be image captured. If unable to image capture a reason will be provided. -func (r Hardware_SecurityModule750) GetCaptureEnabledFlag() (resp string, err error) { +func (r Hardware_SecurityModule750) GetCaptureEnabledFlag() (resp datatypes.Container_Hardware_CaptureEnabled, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_SecurityModule750", "getCaptureEnabledFlag", nil, &r.Options, &resp) return } @@ -9026,7 +9026,7 @@ func (r Hardware_Server) GetBusinessContinuanceInsuranceFlag() (resp bool, err e } // Retrieve Determine if the server is able to be image captured. If unable to image capture a reason will be provided. -func (r Hardware_Server) GetCaptureEnabledFlag() (resp string, err error) { +func (r Hardware_Server) GetCaptureEnabledFlag() (resp datatypes.Container_Hardware_CaptureEnabled, err error) { err = r.Session.DoRequest("SoftLayer_Hardware_Server", "getCaptureEnabledFlag", nil, &r.Options, &resp) return } diff --git a/services/monitoring.go b/services/monitoring.go index 70df84a..61deb16 100644 --- a/services/monitoring.go +++ b/services/monitoring.go @@ -29,548 +29,6 @@ import ( "github.com/softlayer/softlayer-go/sl" ) -// A monitoring agent object contains information describing the agent. -type Monitoring_Agent struct { - Session *session.Session - Options sl.Options -} - -// GetMonitoringAgentService returns an instance of the Monitoring_Agent SoftLayer service -func GetMonitoringAgentService(sess *session.Session) Monitoring_Agent { - return Monitoring_Agent{Session: sess} -} - -func (r Monitoring_Agent) Id(id int) Monitoring_Agent { - r.Options.Id = &id - return r -} - -func (r Monitoring_Agent) Mask(mask string) Monitoring_Agent { - 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 Monitoring_Agent) Filter(filter string) Monitoring_Agent { - r.Options.Filter = filter - return r -} - -func (r Monitoring_Agent) Limit(limit int) Monitoring_Agent { - r.Options.Limit = &limit - return r -} - -func (r Monitoring_Agent) Offset(offset int) Monitoring_Agent { - r.Options.Offset = &offset - return r -} - -// This method activates a SoftLayer_Monitoring_Agent. -func (r Monitoring_Agent) Activate() (resp bool, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "activate", nil, &r.Options, &resp) - return -} - -// This method is used to apply changes to a monitoring agent's configuration for SoftLayer_Configuration_Template_Section with the property sectionType that has a keyName of 'TEMPLATE_SECTION'. Configuration values that are passed in can be new or updated objects but must have a definitionId and profileId defined for both. Existing SoftLayer_Monitoring_Agent_Configuration_Value values can be retrieved as a property of the SoftLayer_Configuration_Template_Section_Definition's from the monitoring agent's configurationTemplate property. New values will follow the structure of SoftLayer_Monitoring_Agent_Configuration_Value. It returns a SoftLayer_Provisioning_Version1_Transaction object to track the progress of the update being applied. Some configuration sections act as a template which helps to create additional monitoring configurations. For instance, Core Resource monitoring agent lets you create monitoring configurations for different disk volumes or disk path. -func (r Monitoring_Agent) AddConfigurationProfile(configurationValues []datatypes.Monitoring_Agent_Configuration_Value) (resp datatypes.Provisioning_Version1_Transaction, err error) { - params := []interface{}{ - configurationValues, - } - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "addConfigurationProfile", params, &r.Options, &resp) - return -} - -// This method creates a transaction used to apply changes to a monitoring agent's configuration for an array of SoftLayer_Configuration_Template_Section that have the property sectionType with a name of 'Fixed section'. Configuration values that are passed in can be new or updated objects but must have a configurationDefinitionId defined for both. Existing SoftLayer_Monitoring_Agent_Configuration_Value values can be retrieved as a property of the SoftLayer_Configuration_Template_Section_Definition from the monitoring agent's configurationTemplate property. New values will follow the structure of SoftLayer_Monitoring_Agent_Configuration_Value. This method returns a SoftLayer_Provisioning_Version1_Transaction object to track the progress of the update being applied. -func (r Monitoring_Agent) ApplyConfigurationValues(configurationValues []datatypes.Monitoring_Agent_Configuration_Value) (resp datatypes.Provisioning_Version1_Transaction, err error) { - params := []interface{}{ - configurationValues, - } - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "applyConfigurationValues", params, &r.Options, &resp) - return -} - -// This method will deactivate the monitoring agent, preventing it from generating any further alarms. -func (r Monitoring_Agent) Deactivate() (resp bool, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "deactivate", nil, &r.Options, &resp) - return -} - -// This method will remove a SoftLayer_Configuration_Template_Section_Profile from a SoftLayer_Configuration_Template_Section by passing in the sectionId of the profile object and identifier of the profile. This will execute the action immediately on the server and the SoftLayer_Configuration_Template_Section returning a boolean true if successful. -func (r Monitoring_Agent) DeleteConfigurationProfile(sectionId *int, profileId *int) (resp bool, err error) { - params := []interface{}{ - sectionId, - profileId, - } - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "deleteConfigurationProfile", params, &r.Options, &resp) - return -} - -// Initialize a monitoring agent and deploy it with the SoftLayer_Configuration_Template with the same identifier as the $configurationTemplateId parameter. If the configuration template ID is not provided, the current configuration template will be used. When executing this method, the existing configuration values will be lost. If no configuration template identifier is provided, the current configuration template will be used. '''Warning''' Reporting data may be lost as a result of executing this method. -func (r Monitoring_Agent) DeployMonitoringAgent(configurationTemplateId *int) (resp datatypes.Provisioning_Version1_Transaction, err error) { - params := []interface{}{ - configurationTemplateId, - } - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "deployMonitoringAgent", params, &r.Options, &resp) - return -} - -// This method retrieves an array of SoftLayer_Notification_User_Subscriber objects belonging to the SoftLayer_Monitoring_Agent which are able to receive alarm notifications. -func (r Monitoring_Agent) GetActiveAlarmSubscribers() (resp []datatypes.Notification_User_Subscriber, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getActiveAlarmSubscribers", nil, &r.Options, &resp) - return -} - -// Retrieve The current status of the corresponding agent -func (r Monitoring_Agent) GetAgentStatus() (resp datatypes.Monitoring_Agent_Status, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getAgentStatus", nil, &r.Options, &resp) - return -} - -// This method returns an array of available SoftLayer_Configuration_Template objects for this monitoring agent. -func (r Monitoring_Agent) GetAvailableConfigurationTemplates() (resp []datatypes.Configuration_Template, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getAvailableConfigurationTemplates", nil, &r.Options, &resp) - return -} - -// Returns an array of available configuration values that are specific to a server or a Virtual that this monitoring agent is running on. For example, invoking this method against "Network Traffic Monitoring Agent" will return all available network adapters on your system. -func (r Monitoring_Agent) GetAvailableConfigurationValues(configurationDefinitionId *int, configValues []datatypes.Monitoring_Agent_Configuration_Value) (resp []datatypes.Monitoring_Agent_Configuration_Value, err error) { - params := []interface{}{ - configurationDefinitionId, - configValues, - } - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getAvailableConfigurationValues", params, &r.Options, &resp) - return -} - -// Retrieve All custom configuration profiles associated with the corresponding agent -func (r Monitoring_Agent) GetConfigurationProfiles() (resp []datatypes.Configuration_Template_Section_Profile, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getConfigurationProfiles", nil, &r.Options, &resp) - return -} - -// Retrieve A template of an agent's current configuration which contains information about the structure of the configuration values. -func (r Monitoring_Agent) GetConfigurationTemplate() (resp datatypes.Configuration_Template, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getConfigurationTemplate", nil, &r.Options, &resp) - return -} - -// Retrieve The values associated with the corresponding Agent configuration. -func (r Monitoring_Agent) GetConfigurationValues() (resp []datatypes.Monitoring_Agent_Configuration_Value, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getConfigurationValues", nil, &r.Options, &resp) - return -} - -// This method returns an array of SoftLayer_User_Customer objects, representing those who are allowed to be used as alarm subscribers. -func (r Monitoring_Agent) GetEligibleAlarmSubscibers() (resp []datatypes.User_Customer, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getEligibleAlarmSubscibers", nil, &r.Options, &resp) - return -} - -// This method returns a SoftLayer_Container_Bandwidth_GraphOutputs object containing a base64 PNG string graph of the provided configuration values for the given begin and end dates. -func (r Monitoring_Agent) GetGraph(configurationValues []datatypes.Monitoring_Agent_Configuration_Value, beginDate *datatypes.Time, endDate *datatypes.Time) (resp datatypes.Container_Monitoring_Graph_Outputs, err error) { - params := []interface{}{ - configurationValues, - beginDate, - endDate, - } - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getGraph", params, &r.Options, &resp) - return -} - -// This method returns the metric data for each of the configuration values provided during the given time range. -func (r Monitoring_Agent) GetGraphData(metricDataTypes []datatypes.Container_Metric_Data_Type, startDate *datatypes.Time, endDate *datatypes.Time) (resp []datatypes.Metric_Tracking_Object_Data, err error) { - params := []interface{}{ - metricDataTypes, - startDate, - endDate, - } - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getGraphData", params, &r.Options, &resp) - return -} - -// Retrieve SoftLayer hardware related to the agent. -func (r Monitoring_Agent) GetHardware() (resp datatypes.Hardware, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getHardware", nil, &r.Options, &resp) - return -} - -// This method retrieves a monitoring agent whose identifier corresponds to the value provided in the initialization parameter passed to the SoftLayer_Monitoring_Agent service. -func (r Monitoring_Agent) GetObject() (resp datatypes.Monitoring_Agent, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getObject", nil, &r.Options, &resp) - return -} - -// Retrieve Contains general information relating to a single SoftLayer product. -func (r Monitoring_Agent) GetProductItem() (resp datatypes.Product_Item, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getProductItem", nil, &r.Options, &resp) - return -} - -// Retrieve A description for a specific installation of a Software Component -func (r Monitoring_Agent) GetSoftwareDescription() (resp datatypes.Software_Description, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getSoftwareDescription", nil, &r.Options, &resp) - return -} - -// Retrieve Monitoring agent status name. -func (r Monitoring_Agent) GetStatusName() (resp string, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getStatusName", nil, &r.Options, &resp) - return -} - -// Retrieve Softlayer_Virtual_Guest object related to the monitoring agent, which this virtual guest object and hardware is on the server of the running agent. -func (r Monitoring_Agent) GetVirtualGuest() (resp datatypes.Virtual_Guest, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "getVirtualGuest", nil, &r.Options, &resp) - return -} - -// Use of this method will allow removing active subscribers from the monitoring agent. The agent subscribers can be managed within the portal from the "Alarm Subscribers" tab of the monitoring agent configuration. -func (r Monitoring_Agent) RemoveActiveAlarmSubscriber(userRecordId *int) (resp bool, err error) { - params := []interface{}{ - userRecordId, - } - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "removeActiveAlarmSubscriber", params, &r.Options, &resp) - return -} - -// Use of this method will allow removing all subscribers from the monitoring agent. The agent subscribers can be managed within the portal from the "Alarm Subscribers" tab of the monitoring agent configuration. -func (r Monitoring_Agent) RemoveAllAlarmSubscribers() (resp bool, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "removeAllAlarmSubscribers", nil, &r.Options, &resp) - return -} - -// This method restarts a monitoring agent and sets the agent's status to 'ACTIVE'. -func (r Monitoring_Agent) RestartMonitoringAgent() (resp bool, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "restartMonitoringAgent", nil, &r.Options, &resp) - return -} - -// This method assigns a user to receive the alerts generated by this SoftLayer_Monitoring_Agent. -func (r Monitoring_Agent) SetActiveAlarmSubscriber(userRecordId *int) (resp bool, err error) { - params := []interface{}{ - userRecordId, - } - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent", "setActiveAlarmSubscriber", params, &r.Options, &resp) - return -} - -// The SoftLayer_Monitoring_Agent_Configuration_Template_Group class is consisted of configuration templates for agents in a monitoring package. -type Monitoring_Agent_Configuration_Template_Group struct { - Session *session.Session - Options sl.Options -} - -// GetMonitoringAgentConfigurationTemplateGroupService returns an instance of the Monitoring_Agent_Configuration_Template_Group SoftLayer service -func GetMonitoringAgentConfigurationTemplateGroupService(sess *session.Session) Monitoring_Agent_Configuration_Template_Group { - return Monitoring_Agent_Configuration_Template_Group{Session: sess} -} - -func (r Monitoring_Agent_Configuration_Template_Group) Id(id int) Monitoring_Agent_Configuration_Template_Group { - r.Options.Id = &id - return r -} - -func (r Monitoring_Agent_Configuration_Template_Group) Mask(mask string) Monitoring_Agent_Configuration_Template_Group { - 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 Monitoring_Agent_Configuration_Template_Group) Filter(filter string) Monitoring_Agent_Configuration_Template_Group { - r.Options.Filter = filter - return r -} - -func (r Monitoring_Agent_Configuration_Template_Group) Limit(limit int) Monitoring_Agent_Configuration_Template_Group { - r.Options.Limit = &limit - return r -} - -func (r Monitoring_Agent_Configuration_Template_Group) Offset(offset int) Monitoring_Agent_Configuration_Template_Group { - r.Options.Offset = &offset - return r -} - -// This method creates a SoftLayer_Monitoring_Agent_Configuration_Template_Group using the values provided in the template object. The template objects accountId will be overridden to use the active user's accountId as it shows on their associated SoftLayer_User_Customer object. -func (r Monitoring_Agent_Configuration_Template_Group) CreateObject(templateObject *datatypes.Monitoring_Agent_Configuration_Template_Group) (resp datatypes.Monitoring_Agent_Configuration_Template_Group, err error) { - params := []interface{}{ - templateObject, - } - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "createObject", params, &r.Options, &resp) - return -} - -// Deletes a customer configuration template group. -func (r Monitoring_Agent_Configuration_Template_Group) DeleteObject() (resp bool, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "deleteObject", nil, &r.Options, &resp) - return -} - -// This method edits an existing SoftLayer_Monitoring_Agent_Configuration_Template_Group using the values passed in the $object parameter. The $object parameter should use the same structure as a SoftLayer_Monitoring_Agent_Configuration_Template_Group object. -func (r Monitoring_Agent_Configuration_Template_Group) EditObject(templateObject *datatypes.Monitoring_Agent_Configuration_Template_Group) (resp bool, err error) { - params := []interface{}{ - templateObject, - } - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "editObject", params, &r.Options, &resp) - return -} - -// Retrieve -func (r Monitoring_Agent_Configuration_Template_Group) GetAccount() (resp datatypes.Account, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getAccount", nil, &r.Options, &resp) - return -} - -// no documentation yet -func (r Monitoring_Agent_Configuration_Template_Group) GetAllObjects() (resp []datatypes.Monitoring_Agent_Configuration_Template_Group, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getAllObjects", nil, &r.Options, &resp) - return -} - -// This method retrieves an array of SoftLayer_Monitoring_Agent_Configuration_Template_Group objects that are available to the active user's account. The packageId parameter is not currently used. -func (r Monitoring_Agent_Configuration_Template_Group) GetConfigurationGroups(packageId *int) (resp []datatypes.Monitoring_Agent_Configuration_Template_Group, err error) { - params := []interface{}{ - packageId, - } - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getConfigurationGroups", params, &r.Options, &resp) - return -} - -// Retrieve -func (r Monitoring_Agent_Configuration_Template_Group) GetItem() (resp datatypes.Product_Item, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getItem", nil, &r.Options, &resp) - return -} - -// This method retrieves a monitoring agent configuration template group whose identifier corresponds to the value provided in the initialization parameter passed to the SoftLayer_Monitoring_Agent_Configuration_Template_Group service. -func (r Monitoring_Agent_Configuration_Template_Group) GetObject() (resp datatypes.Monitoring_Agent_Configuration_Template_Group, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group", "getObject", nil, &r.Options, &resp) - return -} - -// SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference class holds the reference information, essentially a SQL join, between a monitoring configuration group and agent configuration templates. -type Monitoring_Agent_Configuration_Template_Group_Reference struct { - Session *session.Session - Options sl.Options -} - -// GetMonitoringAgentConfigurationTemplateGroupReferenceService returns an instance of the Monitoring_Agent_Configuration_Template_Group_Reference SoftLayer service -func GetMonitoringAgentConfigurationTemplateGroupReferenceService(sess *session.Session) Monitoring_Agent_Configuration_Template_Group_Reference { - return Monitoring_Agent_Configuration_Template_Group_Reference{Session: sess} -} - -func (r Monitoring_Agent_Configuration_Template_Group_Reference) Id(id int) Monitoring_Agent_Configuration_Template_Group_Reference { - r.Options.Id = &id - return r -} - -func (r Monitoring_Agent_Configuration_Template_Group_Reference) Mask(mask string) Monitoring_Agent_Configuration_Template_Group_Reference { - 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 Monitoring_Agent_Configuration_Template_Group_Reference) Filter(filter string) Monitoring_Agent_Configuration_Template_Group_Reference { - r.Options.Filter = filter - return r -} - -func (r Monitoring_Agent_Configuration_Template_Group_Reference) Limit(limit int) Monitoring_Agent_Configuration_Template_Group_Reference { - r.Options.Limit = &limit - return r -} - -func (r Monitoring_Agent_Configuration_Template_Group_Reference) Offset(offset int) Monitoring_Agent_Configuration_Template_Group_Reference { - r.Options.Offset = &offset - return r -} - -// This method creates a monitoring agent configuration template group reference by passing in an object with the SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference structure as the $templateObject parameter. -func (r Monitoring_Agent_Configuration_Template_Group_Reference) CreateObject(templateObject *datatypes.Monitoring_Agent_Configuration_Template_Group_Reference) (resp datatypes.Monitoring_Agent_Configuration_Template_Group_Reference, err error) { - params := []interface{}{ - templateObject, - } - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "createObject", params, &r.Options, &resp) - return -} - -// This method creates monitoring agent configuration template group references by passing in an array of objects with the SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference structure as the $templateObjects parameter. Setting the $bulkCommit parameter to true will commit the changes in one transaction, false will commit after each object is created. -func (r Monitoring_Agent_Configuration_Template_Group_Reference) CreateObjects(templateObjects []datatypes.Monitoring_Agent_Configuration_Template_Group_Reference) (resp bool, err error) { - params := []interface{}{ - templateObjects, - } - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "createObjects", params, &r.Options, &resp) - return -} - -// This method updates a SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference record by passing in a modified instance of the object. -func (r Monitoring_Agent_Configuration_Template_Group_Reference) EditObject(templateObject *datatypes.Monitoring_Agent_Configuration_Template_Group_Reference) (resp bool, err error) { - params := []interface{}{ - templateObject, - } - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "editObject", params, &r.Options, &resp) - return -} - -// This method updates a set of SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference records by passing in an array of modified instances of the objects. Setting the $bulkCommit parameter to true will commit the changes in one transaction, false will commit after each object is updated. -func (r Monitoring_Agent_Configuration_Template_Group_Reference) EditObjects(templateObjects []datatypes.Monitoring_Agent_Configuration_Template_Group_Reference) (resp bool, err error) { - params := []interface{}{ - templateObjects, - } - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "editObjects", params, &r.Options, &resp) - return -} - -// This method retrieves all SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference objects accessible to the active user. -func (r Monitoring_Agent_Configuration_Template_Group_Reference) GetAllObjects() (resp []datatypes.Monitoring_Agent_Configuration_Template_Group_Reference, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "getAllObjects", nil, &r.Options, &resp) - return -} - -// Retrieve -func (r Monitoring_Agent_Configuration_Template_Group_Reference) GetConfigurationTemplate() (resp datatypes.Configuration_Template, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "getConfigurationTemplate", nil, &r.Options, &resp) - return -} - -// This method retrieves a monitoring agent configuration template group reference whose identifier corresponds to the value provided in the initialization parameter passed to the SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference service. -func (r Monitoring_Agent_Configuration_Template_Group_Reference) GetObject() (resp datatypes.Monitoring_Agent_Configuration_Template_Group_Reference, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "getObject", nil, &r.Options, &resp) - return -} - -// Retrieve -func (r Monitoring_Agent_Configuration_Template_Group_Reference) GetTemplateGroup() (resp datatypes.Monitoring_Agent_Configuration_Template_Group, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Template_Group_Reference", "getTemplateGroup", nil, &r.Options, &resp) - return -} - -// Monitoring agent configuration value -type Monitoring_Agent_Configuration_Value struct { - Session *session.Session - Options sl.Options -} - -// GetMonitoringAgentConfigurationValueService returns an instance of the Monitoring_Agent_Configuration_Value SoftLayer service -func GetMonitoringAgentConfigurationValueService(sess *session.Session) Monitoring_Agent_Configuration_Value { - return Monitoring_Agent_Configuration_Value{Session: sess} -} - -func (r Monitoring_Agent_Configuration_Value) Id(id int) Monitoring_Agent_Configuration_Value { - r.Options.Id = &id - return r -} - -func (r Monitoring_Agent_Configuration_Value) Mask(mask string) Monitoring_Agent_Configuration_Value { - 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 Monitoring_Agent_Configuration_Value) Filter(filter string) Monitoring_Agent_Configuration_Value { - r.Options.Filter = filter - return r -} - -func (r Monitoring_Agent_Configuration_Value) Limit(limit int) Monitoring_Agent_Configuration_Value { - r.Options.Limit = &limit - return r -} - -func (r Monitoring_Agent_Configuration_Value) Offset(offset int) Monitoring_Agent_Configuration_Value { - r.Options.Offset = &offset - return r -} - -// Retrieve -func (r Monitoring_Agent_Configuration_Value) GetDefinition() (resp datatypes.Configuration_Template_Section_Definition, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Value", "getDefinition", nil, &r.Options, &resp) - return -} - -// Retrieve The metric data type used to retrieve metric data currently being tracked. -func (r Monitoring_Agent_Configuration_Value) GetMetricDataType() (resp datatypes.Container_Metric_Data_Type, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Value", "getMetricDataType", nil, &r.Options, &resp) - return -} - -// Retrieve -func (r Monitoring_Agent_Configuration_Value) GetMonitoringAgent() (resp datatypes.Monitoring_Agent, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Value", "getMonitoringAgent", nil, &r.Options, &resp) - return -} - -// no documentation yet -func (r Monitoring_Agent_Configuration_Value) GetObject() (resp datatypes.Monitoring_Agent_Configuration_Value, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Value", "getObject", nil, &r.Options, &resp) - return -} - -// Retrieve -func (r Monitoring_Agent_Configuration_Value) GetProfile() (resp datatypes.Configuration_Template_Section_Profile, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Configuration_Value", "getProfile", nil, &r.Options, &resp) - return -} - -// Monitoring agent status -type Monitoring_Agent_Status struct { - Session *session.Session - Options sl.Options -} - -// GetMonitoringAgentStatusService returns an instance of the Monitoring_Agent_Status SoftLayer service -func GetMonitoringAgentStatusService(sess *session.Session) Monitoring_Agent_Status { - return Monitoring_Agent_Status{Session: sess} -} - -func (r Monitoring_Agent_Status) Id(id int) Monitoring_Agent_Status { - r.Options.Id = &id - return r -} - -func (r Monitoring_Agent_Status) Mask(mask string) Monitoring_Agent_Status { - 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 Monitoring_Agent_Status) Filter(filter string) Monitoring_Agent_Status { - r.Options.Filter = filter - return r -} - -func (r Monitoring_Agent_Status) Limit(limit int) Monitoring_Agent_Status { - r.Options.Limit = &limit - return r -} - -func (r Monitoring_Agent_Status) Offset(offset int) Monitoring_Agent_Status { - r.Options.Offset = &offset - return r -} - -// no documentation yet -func (r Monitoring_Agent_Status) GetObject() (resp datatypes.Monitoring_Agent_Status, err error) { - err = r.Session.DoRequest("SoftLayer_Monitoring_Agent_Status", "getObject", nil, &r.Options, &resp) - return -} - // The SoftLayer_Monitoring_Robot data type contains general information relating to a monitoring robot. type Monitoring_Robot struct { Session *session.Session diff --git a/services/network.go b/services/network.go index fba3bca..cc7e50c 100644 --- a/services/network.go +++ b/services/network.go @@ -13739,6 +13739,18 @@ func (r Network_Subnet) AllowAccessToNetworkStorageList(networkStorageTemplateOb return } +// This interface allows you to remove the route of your Account Owned 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! +// +// 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) { + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "clearRoute", nil, &r.Options, &resp) + return +} + // Create the default PTR records for this subnet func (r Network_Subnet) CreateReverseDomainRecords() (resp datatypes.Dns_Domain_Reverse, err error) { err = r.Session.DoRequest("SoftLayer_Network_Subnet", "createReverseDomainRecords", nil, &r.Options, &resp) @@ -14065,6 +14077,46 @@ func (r Network_Subnet) RemoveAccessToNetworkStorageList(networkStorageTemplateO return } +// This interface allows you to change the route of your Account Owned subnets. It accommodates a number of ways to identify your desired routing destination through the use of a 'type' and 'identifier'. Subnets may be routed as either Static or Portable, and that designation is dictated by the routing destination specified. +// +// Static subnets have an ultimate routing destination of a single IP address but may not be routed to an existing subnet's IP address whose subnet is routed as a Static. Portable subnets have an ultimate routing destination of a VLAN. +// +// A subnet can be routed to any resource within the same "routing region" as the subnet itself. A subnet's routing region can be diverse but is usually limited to a single data center. +// +// The following identifier 'type' values will result in Static routing: +// +// The following identifier 'type' values will result in Portable routing: +// +// For each identifier type, one or more 'identifier' formats are possible. +// +// ''SoftLayer_Network_Subnet_IpAddress'' will accept the following identifier formats: +// +// ''SoftLayer_Network_Vlan'' will accept the following identifier formats: +// +// ''SoftLayer_Hardware_Server'' will accept the following identifier formats: +// +// ''SoftLayer_Virtual_Guest'' will accept the following identifier formats: +// +// 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. +// +// Subnets may only be routed to the IP version they themselves represent. That means an IPv4 subnet can only be routed to IPv4 addresses. Any type/identifier combination that resolves to an IP address must be able to locate an IP address of the same version as the subnet being routed. +// +// When routing to an IP address on a Primary subnet, only those addresses actively assigned to resources may be targeted. Additionally, the network, gateway, or broadcast address of any Portable subnet may not be a routing destination. For some VLANs utilizing the HSRP redundancy strategy, there are additional addresses which cannot be a route destination. +// +// When routing a subnet that is already routed, note that the subnet first has its route removed; this procedure is the same as what will occur when using SoftLayer_Network_Subnet::clearRoute. Special consideration should be made for subnets routed as Portable. Please refer to the documentation for SoftLayer_Network_Subnet::clearRoute for details. +// +// The behavior of this interface is such that either true or false is returned. A response of false indicates the route request would not result in the route of the subnet changing; attempts to route the subnet to the same destination, even if identified by differing means, will result in no changes. A result of false can be interpreted as the route request having already been completed. In contrast, a result of true means the requested destination is different from the current destination and the subnet's routing 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 route change 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 become the desired route destination. +// +// Use of this operation is limited to a single active request per subnet. If a previous route request is not yet complete, a "not ready" message will be returned upon subsequent requests. +func (r Network_Subnet) Route(typ *string, identifier *string) (resp bool, err error) { + params := []interface{}{ + typ, + identifier, + } + err = r.Session.DoRequest("SoftLayer_Network_Subnet", "route", params, &r.Options, &resp) + return +} + // Tag a subnet by passing in one or more tags separated by a comma. Any existing tags you wish to keep should be included in the set of tags, as any missing tags will be removed. To remove all tags from the subnet, send an empty string. func (r Network_Subnet) SetTags(tags *string) (resp bool, err error) { params := []interface{}{ diff --git a/services/security.go b/services/security.go index 1a36d92..821b1d1 100644 --- a/services/security.go +++ b/services/security.go @@ -134,7 +134,7 @@ func (r Security_Certificate) GetPemFormat() (resp string, err error) { return } -// SoftLayer_Security_Certificate_Request data type is used to harness your SSL certificate order to a Certificate Authority. This contains data that is required by a Certificate Authority to place an SSL certificate order. +// The SoftLayer_Security_Certificate_Request data type is used to view details about your SSL certificate order. This contains data that is required by a Certificate Authority to place an SSL certificate order. type Security_Certificate_Request struct { Session *session.Session Options sl.Options