Skip to content

Commit

Permalink
Merge pull request #200 from softlayer/20241025
Browse files Browse the repository at this point in the history
20241025 Updates
  • Loading branch information
allmightyspiff authored Oct 25, 2024
2 parents 7cfa57e + 39a61c0 commit 80a745b
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 4 deletions.
6 changes: 6 additions & 0 deletions datatypes/product.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@ type Product_Item struct {
// A product item's prices.
Prices []Product_Item_Price `json:"prices,omitempty" xmlrpc:"prices,omitempty"`

// The number of private network interfaces provided by a port_speed product.
PrivateInterfaceCount *uint `json:"privateInterfaceCount,omitempty" xmlrpc:"privateInterfaceCount,omitempty"`

// The number of public network interfaces provided by a port_speed product.
PublicInterfaceCount *uint `json:"publicInterfaceCount,omitempty" xmlrpc:"publicInterfaceCount,omitempty"`

// If an item must be ordered with another item, it will have a requirement item here.
Requirements []Product_Item_Requirement `json:"requirements,omitempty" xmlrpc:"requirements,omitempty"`

Expand Down
6 changes: 4 additions & 2 deletions datatypes/virtual.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,12 @@ type Virtual_Guest struct {
// A container for a guest's console data
ConsoleData *Container_Virtual_ConsoleData `json:"consoleData,omitempty" xmlrpc:"consoleData,omitempty"`

// A flag indicating a computing instance's console IP address is assigned.
// [DEPRECATED] A flag indicating a computing instance's console IP address is assigned.
// Deprecated: This function has been marked as deprecated.
ConsoleIpAddressFlag *bool `json:"consoleIpAddressFlag,omitempty" xmlrpc:"consoleIpAddressFlag,omitempty"`

// A record containing information about a computing instance's console IP and port number.
// [DEPRECATED] A record containing information about a computing instance's console IP and port number.
// Deprecated: This function has been marked as deprecated.
ConsoleIpAddressRecord *Virtual_Guest_Network_Component_IpAddress `json:"consoleIpAddressRecord,omitempty" xmlrpc:"consoleIpAddressRecord,omitempty"`

// A continuous data protection software component object.
Expand Down
3 changes: 3 additions & 0 deletions services/marketplace.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func (r Marketplace_Partner) GetAllObjects() (resp []datatypes.Marketplace_Partn
}

// no documentation yet
// Deprecated: This function has been marked as deprecated.
func (r Marketplace_Partner) GetAllPublishedPartners(searchTerm *string) (resp []datatypes.Marketplace_Partner, err error) {
params := []interface{}{
searchTerm,
Expand All @@ -84,6 +85,7 @@ func (r Marketplace_Partner) GetAttachments() (resp []datatypes.Marketplace_Part
}

// no documentation yet
// Deprecated: This function has been marked as deprecated.
func (r Marketplace_Partner) GetFeaturedPartners(non *bool) (resp []datatypes.Marketplace_Partner, err error) {
params := []interface{}{
non,
Expand All @@ -93,6 +95,7 @@ func (r Marketplace_Partner) GetFeaturedPartners(non *bool) (resp []datatypes.Ma
}

// no documentation yet
// Deprecated: This function has been marked as deprecated.
func (r Marketplace_Partner) GetFile(name *string) (resp datatypes.Marketplace_Partner_File, err error) {
params := []interface{}{
name,
Expand Down
12 changes: 12 additions & 0 deletions services/product.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,18 @@ func (r Product_Item) GetPrices() (resp []datatypes.Product_Item_Price, err erro
return
}

// Retrieve The number of private network interfaces provided by a port_speed product.
func (r Product_Item) GetPrivateInterfaceCount() (resp uint, err error) {
err = r.Session.DoRequest("SoftLayer_Product_Item", "getPrivateInterfaceCount", nil, &r.Options, &resp)
return
}

// Retrieve The number of public network interfaces provided by a port_speed product.
func (r Product_Item) GetPublicInterfaceCount() (resp uint, err error) {
err = r.Session.DoRequest("SoftLayer_Product_Item", "getPublicInterfaceCount", nil, &r.Options, &resp)
return
}

// Retrieve If an item must be ordered with another item, it will have a requirement item here.
func (r Product_Item) GetRequirements() (resp []datatypes.Product_Item_Requirement, err error) {
err = r.Session.DoRequest("SoftLayer_Product_Item", "getRequirements", nil, &r.Options, &resp)
Expand Down
14 changes: 14 additions & 0 deletions services/product_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,20 @@ var _ = Describe("Product Tests", func() {
Expect(slsession.DoRequestCallCount()).To(Equal(1))
})
})
Context("SoftLayer_Product_Item::getPrivateInterfaceCount", func() {
It("API Call Test", func() {
_, err := sl_service.GetPrivateInterfaceCount()
Expect(err).To(Succeed())
Expect(slsession.DoRequestCallCount()).To(Equal(1))
})
})
Context("SoftLayer_Product_Item::getPublicInterfaceCount", func() {
It("API Call Test", func() {
_, err := sl_service.GetPublicInterfaceCount()
Expect(err).To(Succeed())
Expect(slsession.DoRequestCallCount()).To(Equal(1))
})
})
Context("SoftLayer_Product_Item::getRequirements", func() {
It("API Call Test", func() {
_, err := sl_service.GetRequirements()
Expand Down
5 changes: 3 additions & 2 deletions services/virtual.go
Original file line number Diff line number Diff line change
Expand Up @@ -1164,13 +1164,13 @@ func (r Virtual_Guest) GetConsoleData() (resp datatypes.Container_Virtual_Consol
return
}

// Retrieve A flag indicating a computing instance's console IP address is assigned.
// Retrieve [DEPRECATED] A flag indicating a computing instance's console IP address is assigned.
func (r Virtual_Guest) GetConsoleIpAddressFlag() (resp bool, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getConsoleIpAddressFlag", nil, &r.Options, &resp)
return
}

// Retrieve A record containing information about a computing instance's console IP and port number.
// Retrieve [DEPRECATED] A record containing information about a computing instance's console IP and port number.
func (r Virtual_Guest) GetConsoleIpAddressRecord() (resp datatypes.Virtual_Guest_Network_Component_IpAddress, err error) {
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getConsoleIpAddressRecord", nil, &r.Options, &resp)
return
Expand Down Expand Up @@ -1929,6 +1929,7 @@ func (r Virtual_Guest) RebootSoft() (resp bool, err error) {
}

// no documentation yet
// Deprecated: This function has been marked as deprecated.
func (r Virtual_Guest) ReconfigureConsole() (err error) {
var resp datatypes.Void
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "reconfigureConsole", nil, &r.Options, &resp)
Expand Down
78 changes: 78 additions & 0 deletions session/sessionfakes/fake_iamupdater.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 80a745b

Please sign in to comment.