diff --git a/selvpcclient/resell/v2/capabilities/schemas.go b/selvpcclient/resell/v2/capabilities/schemas.go index 62f8c89..a4c8061 100644 --- a/selvpcclient/resell/v2/capabilities/schemas.go +++ b/selvpcclient/resell/v2/capabilities/schemas.go @@ -2,9 +2,6 @@ package capabilities // Capabilities contains possible availability values of different domain resources. type Capabilities struct { - // Licenses contains licenses information. - Licenses []License `json:"licenses"` - // Logo contains project logo information. Logo Logo `json:"logo"` @@ -13,21 +10,6 @@ type Capabilities struct { // Resources contains billing resources information. Resources []Resource `json:"resources"` - - // Subnets contains public subnets information. - Subnets []Subnet `json:"subnets"` - - // Traffic contains domain traffic information. - Traffic Traffic `json:"traffic"` -} - -// License contains single license information. -type License struct { - // Availability contains availability between locations. - Availability []string `json:"availability"` - - // Type represents license type. - Type string `json:"type"` } // Logo contains project logo information. @@ -86,30 +68,3 @@ type Resource struct { // Unbillable shows if resource is not should be billed. Unbillable bool `json:"unbillable"` } - -// Subnet contains information about single public subnet. -type Subnet struct { - // Availability contains availability between locations. - Availability []string `json:"availability"` - - // Type represents subnet type. - Type string `json:"type"` - - // PrefixLength represents subnet prefix length. - PrefixLength string `json:"prefix_length"` -} - -// Traffic contains information about domain traffic. -type Traffic struct { - // Granularities represents traffic granularities. - Granularities []Granularity `json:"granularities"` -} - -// Granularity contains information about domain traffic granularity. -type Granularity struct { - // Granularity represents granularity in seconds. - Granularity int `json:"granularity"` - - // Timespan represents period of time in days. - Timespan int `json:"timespan"` -} diff --git a/selvpcclient/resell/v2/capabilities/testing/requests_test.go b/selvpcclient/resell/v2/capabilities/testing/requests_test.go index 348c98e..30ad7e3 100644 --- a/selvpcclient/resell/v2/capabilities/testing/requests_test.go +++ b/selvpcclient/resell/v2/capabilities/testing/requests_test.go @@ -34,21 +34,12 @@ func TestGetCapabilities(t *testing.T) { if c == nil { t.Fatal("didn't get capabilities") } - if len(c.Licenses) != 2 { - t.Errorf("expected 2 licenses, but got %d", len(c.Licenses)) - } if len(c.Regions) != 3 { t.Errorf("expected 3 regions, but got %d", len(c.Regions)) } if len(c.Resources) != 16 { t.Errorf("expected 16 resources, but got %d", len(c.Resources)) } - if len(c.Subnets) != 1 { - t.Errorf("expected 1 subnets, but got %d", len(c.Subnets)) - } - if len(c.Traffic.Granularities) != 3 { - t.Errorf("expected 3 traffic granularities, but got %d", len(c.Traffic.Granularities)) - } } func TestGetCapabilitiesHTTPError(t *testing.T) {