Skip to content

Commit

Permalink
vmware: updating the embedded sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Nov 12, 2021
1 parent 9664e19 commit 37514b7
Show file tree
Hide file tree
Showing 20 changed files with 195 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ func (id AuthorizationId) ID() string {
// Segments returns a slice of Resource ID Segments which comprise this Authorization ID
func (id AuthorizationId) Segments() []resourceids.Segment {
return []resourceids.Segment{
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"),
resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"),
resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"),
resourceids.StaticSegment("providers", "providers", "providers"),
resourceids.ResourceProviderSegment("microsoftAVS", "Microsoft.AVS", "Microsoft.AVS"),
resourceids.StaticSegment("privateClouds", "privateClouds", "privateClouds"),
resourceids.StaticSegment("staticProviders", "providers", "providers"),
resourceids.ResourceProviderSegment("staticMicrosoftAVS", "Microsoft.AVS", "Microsoft.AVS"),
resourceids.StaticSegment("staticPrivateClouds", "privateClouds", "privateClouds"),
resourceids.UserSpecifiedSegment("privateCloudName", "privateCloudValue"),
resourceids.StaticSegment("authorizations", "authorizations", "authorizations"),
resourceids.StaticSegment("staticAuthorizations", "authorizations", "authorizations"),
resourceids.UserSpecifiedSegment("authorizationName", "authorizationValue"),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,3 +307,18 @@ func TestParseAuthorizationIDInsensitively(t *testing.T) {

}
}

func TestSegmentsForAuthorizationId(t *testing.T) {
segments := AuthorizationId{}.Segments()
if len(segments) == 0 {
t.Fatalf("AuthorizationId has no segments")
}

uniqueNames := make(map[string]struct{}, 0)
for _, segment := range segments {
uniqueNames[segment.Name] = struct{}{}
}
if len(uniqueNames) != len(segments) {
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ func (id PrivateCloudId) ID() string {
// Segments returns a slice of Resource ID Segments which comprise this Private Cloud ID
func (id PrivateCloudId) Segments() []resourceids.Segment {
return []resourceids.Segment{
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"),
resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"),
resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"),
resourceids.StaticSegment("providers", "providers", "providers"),
resourceids.ResourceProviderSegment("microsoftAVS", "Microsoft.AVS", "Microsoft.AVS"),
resourceids.StaticSegment("privateClouds", "privateClouds", "privateClouds"),
resourceids.StaticSegment("staticProviders", "providers", "providers"),
resourceids.ResourceProviderSegment("staticMicrosoftAVS", "Microsoft.AVS", "Microsoft.AVS"),
resourceids.StaticSegment("staticPrivateClouds", "privateClouds", "privateClouds"),
resourceids.UserSpecifiedSegment("privateCloudName", "privateCloudValue"),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,18 @@ func TestParsePrivateCloudIDInsensitively(t *testing.T) {

}
}

func TestSegmentsForPrivateCloudId(t *testing.T) {
segments := PrivateCloudId{}.Segments()
if len(segments) == 0 {
t.Fatalf("PrivateCloudId has no segments")
}

uniqueNames := make(map[string]struct{}, 0)
for _, segment := range segments {
uniqueNames[segment.Name] = struct{}{}
}
if len(uniqueNames) != len(segments) {
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
}
}
12 changes: 6 additions & 6 deletions internal/services/vmware/sdk/2020-03-20/clusters/id_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ func (id ClusterId) ID() string {
// Segments returns a slice of Resource ID Segments which comprise this Cluster ID
func (id ClusterId) Segments() []resourceids.Segment {
return []resourceids.Segment{
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"),
resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"),
resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"),
resourceids.StaticSegment("providers", "providers", "providers"),
resourceids.ResourceProviderSegment("microsoftAVS", "Microsoft.AVS", "Microsoft.AVS"),
resourceids.StaticSegment("privateClouds", "privateClouds", "privateClouds"),
resourceids.StaticSegment("staticProviders", "providers", "providers"),
resourceids.ResourceProviderSegment("staticMicrosoftAVS", "Microsoft.AVS", "Microsoft.AVS"),
resourceids.StaticSegment("staticPrivateClouds", "privateClouds", "privateClouds"),
resourceids.UserSpecifiedSegment("privateCloudName", "privateCloudValue"),
resourceids.StaticSegment("clusters", "clusters", "clusters"),
resourceids.StaticSegment("staticClusters", "clusters", "clusters"),
resourceids.UserSpecifiedSegment("clusterName", "clusterValue"),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,3 +307,18 @@ func TestParseClusterIDInsensitively(t *testing.T) {

}
}

func TestSegmentsForClusterId(t *testing.T) {
segments := ClusterId{}.Segments()
if len(segments) == 0 {
t.Fatalf("ClusterId has no segments")
}

uniqueNames := make(map[string]struct{}, 0)
for _, segment := range segments {
uniqueNames[segment.Name] = struct{}{}
}
if len(uniqueNames) != len(segments) {
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ func (id PrivateCloudId) ID() string {
// Segments returns a slice of Resource ID Segments which comprise this Private Cloud ID
func (id PrivateCloudId) Segments() []resourceids.Segment {
return []resourceids.Segment{
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"),
resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"),
resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"),
resourceids.StaticSegment("providers", "providers", "providers"),
resourceids.ResourceProviderSegment("microsoftAVS", "Microsoft.AVS", "Microsoft.AVS"),
resourceids.StaticSegment("privateClouds", "privateClouds", "privateClouds"),
resourceids.StaticSegment("staticProviders", "providers", "providers"),
resourceids.ResourceProviderSegment("staticMicrosoftAVS", "Microsoft.AVS", "Microsoft.AVS"),
resourceids.StaticSegment("staticPrivateClouds", "privateClouds", "privateClouds"),
resourceids.UserSpecifiedSegment("privateCloudName", "privateCloudValue"),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,18 @@ func TestParsePrivateCloudIDInsensitively(t *testing.T) {

}
}

func TestSegmentsForPrivateCloudId(t *testing.T) {
segments := PrivateCloudId{}.Segments()
if len(segments) == 0 {
t.Fatalf("PrivateCloudId has no segments")
}

uniqueNames := make(map[string]struct{}, 0)
for _, segment := range segments {
uniqueNames[segment.Name] = struct{}{}
}
if len(uniqueNames) != len(segments) {
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ func (id HcxEnterpriseSiteId) ID() string {
// Segments returns a slice of Resource ID Segments which comprise this Hcx Enterprise Site ID
func (id HcxEnterpriseSiteId) Segments() []resourceids.Segment {
return []resourceids.Segment{
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"),
resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"),
resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"),
resourceids.StaticSegment("providers", "providers", "providers"),
resourceids.ResourceProviderSegment("microsoftAVS", "Microsoft.AVS", "Microsoft.AVS"),
resourceids.StaticSegment("privateClouds", "privateClouds", "privateClouds"),
resourceids.StaticSegment("staticProviders", "providers", "providers"),
resourceids.ResourceProviderSegment("staticMicrosoftAVS", "Microsoft.AVS", "Microsoft.AVS"),
resourceids.StaticSegment("staticPrivateClouds", "privateClouds", "privateClouds"),
resourceids.UserSpecifiedSegment("privateCloudName", "privateCloudValue"),
resourceids.StaticSegment("hcxEnterpriseSites", "hcxEnterpriseSites", "hcxEnterpriseSites"),
resourceids.StaticSegment("staticHcxEnterpriseSites", "hcxEnterpriseSites", "hcxEnterpriseSites"),
resourceids.UserSpecifiedSegment("hcxEnterpriseSiteName", "hcxEnterpriseSiteValue"),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,3 +307,18 @@ func TestParseHcxEnterpriseSiteIDInsensitively(t *testing.T) {

}
}

func TestSegmentsForHcxEnterpriseSiteId(t *testing.T) {
segments := HcxEnterpriseSiteId{}.Segments()
if len(segments) == 0 {
t.Fatalf("HcxEnterpriseSiteId has no segments")
}

uniqueNames := make(map[string]struct{}, 0)
for _, segment := range segments {
uniqueNames[segment.Name] = struct{}{}
}
if len(uniqueNames) != len(segments) {
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ func (id PrivateCloudId) ID() string {
// Segments returns a slice of Resource ID Segments which comprise this Private Cloud ID
func (id PrivateCloudId) Segments() []resourceids.Segment {
return []resourceids.Segment{
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"),
resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"),
resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"),
resourceids.StaticSegment("providers", "providers", "providers"),
resourceids.ResourceProviderSegment("microsoftAVS", "Microsoft.AVS", "Microsoft.AVS"),
resourceids.StaticSegment("privateClouds", "privateClouds", "privateClouds"),
resourceids.StaticSegment("staticProviders", "providers", "providers"),
resourceids.ResourceProviderSegment("staticMicrosoftAVS", "Microsoft.AVS", "Microsoft.AVS"),
resourceids.StaticSegment("staticPrivateClouds", "privateClouds", "privateClouds"),
resourceids.UserSpecifiedSegment("privateCloudName", "privateCloudValue"),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,18 @@ func TestParsePrivateCloudIDInsensitively(t *testing.T) {

}
}

func TestSegmentsForPrivateCloudId(t *testing.T) {
segments := PrivateCloudId{}.Segments()
if len(segments) == 0 {
t.Fatalf("PrivateCloudId has no segments")
}

uniqueNames := make(map[string]struct{}, 0)
for _, segment := range segments {
uniqueNames[segment.Name] = struct{}{}
}
if len(uniqueNames) != len(segments) {
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ func (id LocationId) ID() string {
// Segments returns a slice of Resource ID Segments which comprise this Location ID
func (id LocationId) Segments() []resourceids.Segment {
return []resourceids.Segment{
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
resourceids.StaticSegment("providers", "providers", "providers"),
resourceids.ResourceProviderSegment("microsoftAVS", "Microsoft.AVS", "Microsoft.AVS"),
resourceids.StaticSegment("locations", "locations", "locations"),
resourceids.StaticSegment("staticProviders", "providers", "providers"),
resourceids.ResourceProviderSegment("staticMicrosoftAVS", "Microsoft.AVS", "Microsoft.AVS"),
resourceids.StaticSegment("staticLocations", "locations", "locations"),
resourceids.UserSpecifiedSegment("location", "locationValue"),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,18 @@ func TestParseLocationIDInsensitively(t *testing.T) {

}
}

func TestSegmentsForLocationId(t *testing.T) {
segments := LocationId{}.Segments()
if len(segments) == 0 {
t.Fatalf("LocationId has no segments")
}

uniqueNames := make(map[string]struct{}, 0)
for _, segment := range segments {
uniqueNames[segment.Name] = struct{}{}
}
if len(uniqueNames) != len(segments) {
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ func (id PrivateCloudId) ID() string {
// Segments returns a slice of Resource ID Segments which comprise this Private Cloud ID
func (id PrivateCloudId) Segments() []resourceids.Segment {
return []resourceids.Segment{
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"),
resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"),
resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"),
resourceids.StaticSegment("providers", "providers", "providers"),
resourceids.ResourceProviderSegment("microsoftAVS", "Microsoft.AVS", "Microsoft.AVS"),
resourceids.StaticSegment("privateClouds", "privateClouds", "privateClouds"),
resourceids.StaticSegment("staticProviders", "providers", "providers"),
resourceids.ResourceProviderSegment("staticMicrosoftAVS", "Microsoft.AVS", "Microsoft.AVS"),
resourceids.StaticSegment("staticPrivateClouds", "privateClouds", "privateClouds"),
resourceids.UserSpecifiedSegment("privateCloudName", "privateCloudValue"),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,18 @@ func TestParsePrivateCloudIDInsensitively(t *testing.T) {

}
}

func TestSegmentsForPrivateCloudId(t *testing.T) {
segments := PrivateCloudId{}.Segments()
if len(segments) == 0 {
t.Fatalf("PrivateCloudId has no segments")
}

uniqueNames := make(map[string]struct{}, 0)
for _, segment := range segments {
uniqueNames[segment.Name] = struct{}{}
}
if len(uniqueNames) != len(segments) {
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ func (id ResourceGroupId) ID() string {
// Segments returns a slice of Resource ID Segments which comprise this Resource Group ID
func (id ResourceGroupId) Segments() []resourceids.Segment {
return []resourceids.Segment{
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
resourceids.StaticSegment("resourceGroups", "resourceGroups", "resourceGroups"),
resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"),
resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,18 @@ func TestParseResourceGroupIDInsensitively(t *testing.T) {

}
}

func TestSegmentsForResourceGroupId(t *testing.T) {
segments := ResourceGroupId{}.Segments()
if len(segments) == 0 {
t.Fatalf("ResourceGroupId has no segments")
}

uniqueNames := make(map[string]struct{}, 0)
for _, segment := range segments {
uniqueNames[segment.Name] = struct{}{}
}
if len(uniqueNames) != len(segments) {
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (id SubscriptionId) ID() string {
// Segments returns a slice of Resource ID Segments which comprise this Subscription ID
func (id SubscriptionId) Segments() []resourceids.Segment {
return []resourceids.Segment{
resourceids.StaticSegment("subscriptions", "subscriptions", "subscriptions"),
resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"),
resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,18 @@ func TestParseSubscriptionIDInsensitively(t *testing.T) {

}
}

func TestSegmentsForSubscriptionId(t *testing.T) {
segments := SubscriptionId{}.Segments()
if len(segments) == 0 {
t.Fatalf("SubscriptionId has no segments")
}

uniqueNames := make(map[string]struct{}, 0)
for _, segment := range segments {
uniqueNames[segment.Name] = struct{}{}
}
if len(uniqueNames) != len(segments) {
t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments))
}
}

0 comments on commit 37514b7

Please sign in to comment.