diff --git a/datatypes/product.go b/datatypes/product.go index 1c44a73..4f4268e 100644 --- a/datatypes/product.go +++ b/datatypes/product.go @@ -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"` diff --git a/datatypes/virtual.go b/datatypes/virtual.go index 8c8074f..d5e8ee2 100644 --- a/datatypes/virtual.go +++ b/datatypes/virtual.go @@ -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. diff --git a/services/marketplace.go b/services/marketplace.go index 75d98b3..7aefcef 100644 --- a/services/marketplace.go +++ b/services/marketplace.go @@ -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, @@ -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, @@ -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, diff --git a/services/product.go b/services/product.go index b7e7ea6..ca15b0c 100644 --- a/services/product.go +++ b/services/product.go @@ -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) diff --git a/services/product_test.go b/services/product_test.go index ccc0841..e19b0cf 100644 --- a/services/product_test.go +++ b/services/product_test.go @@ -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() diff --git a/services/virtual.go b/services/virtual.go index 11cd1fd..45f75ce 100644 --- a/services/virtual.go +++ b/services/virtual.go @@ -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 @@ -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) diff --git a/session/sessionfakes/fake_iamupdater.go b/session/sessionfakes/fake_iamupdater.go new file mode 100644 index 0000000..cb21d03 --- /dev/null +++ b/session/sessionfakes/fake_iamupdater.go @@ -0,0 +1,78 @@ +// Code generated by counterfeiter. DO NOT EDIT. +package sessionfakes + +import ( + "sync" + + "github.com/softlayer/softlayer-go/session" +) + +type FakeIAMUpdater struct { + UpdateStub func(string, string) + updateMutex sync.RWMutex + updateArgsForCall []struct { + arg1 string + arg2 string + } + invocations map[string][][]interface{} + invocationsMutex sync.RWMutex +} + +func (fake *FakeIAMUpdater) Update(arg1 string, arg2 string) { + fake.updateMutex.Lock() + fake.updateArgsForCall = append(fake.updateArgsForCall, struct { + arg1 string + arg2 string + }{arg1, arg2}) + stub := fake.UpdateStub + fake.recordInvocation("Update", []interface{}{arg1, arg2}) + fake.updateMutex.Unlock() + if stub != nil { + fake.UpdateStub(arg1, arg2) + } +} + +func (fake *FakeIAMUpdater) UpdateCallCount() int { + fake.updateMutex.RLock() + defer fake.updateMutex.RUnlock() + return len(fake.updateArgsForCall) +} + +func (fake *FakeIAMUpdater) UpdateCalls(stub func(string, string)) { + fake.updateMutex.Lock() + defer fake.updateMutex.Unlock() + fake.UpdateStub = stub +} + +func (fake *FakeIAMUpdater) UpdateArgsForCall(i int) (string, string) { + fake.updateMutex.RLock() + defer fake.updateMutex.RUnlock() + argsForCall := fake.updateArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 +} + +func (fake *FakeIAMUpdater) Invocations() map[string][][]interface{} { + fake.invocationsMutex.RLock() + defer fake.invocationsMutex.RUnlock() + fake.updateMutex.RLock() + defer fake.updateMutex.RUnlock() + copiedInvocations := map[string][][]interface{}{} + for key, value := range fake.invocations { + copiedInvocations[key] = value + } + return copiedInvocations +} + +func (fake *FakeIAMUpdater) 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.IAMUpdater = new(FakeIAMUpdater)