Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
nithyatsu committed Jan 24, 2025
1 parent ac1821a commit d18246c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/ucpd/ucp-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ initialization:
Microsoft.Resources: "http://localhost:5017"
kind: "UCPNative"
# This is the directory location which contains manifests to be registered.
manifestDirectory: "/Users/nithya/external/radius/radius/deploy/manifest/built-in-providers/dev"
manifestDirectory: "manifest/built-in-providers/"

identity:
authMethod: default
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/clients/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ type ApplicationsManagementClient interface {
DeleteResourceType(ctx context.Context, planeName string, providerNamespace string, resourceTypeName string) (bool, error)

// ListResourceTypesNames lists the names of all resource types in the configured scope.
ListAllResourceTypesNames(ctx context.Context) ([]string, error)
ListAllResourceTypesNames(ctx context.Context, planeName string) ([]string, error)

// CreateOrUpdateAPIVersion creates or updates an API version in the configured scope.
CreateOrUpdateAPIVersion(ctx context.Context, planeName string, providerNamespace string, resourceTypeName string, apiVersionName string, resource *ucp_v20231001preview.APIVersionResource) (ucp_v20231001preview.APIVersionResource, error)
Expand Down
8 changes: 4 additions & 4 deletions pkg/cli/clients/management.go
Original file line number Diff line number Diff line change
Expand Up @@ -774,8 +774,8 @@ func (amc *UCPApplicationsManagementClient) GetResourceProviderSummary(ctx conte
}

// ListAllResourceTypes lists all resource types in all resource providers in the configured scope.
func (amc *UCPApplicationsManagementClient) ListAllResourceTypesNames(ctx context.Context) ([]string, error) {
resourceProviderSummaries, err := amc.ListResourceProviderSummaries(ctx, "local")
func (amc *UCPApplicationsManagementClient) ListAllResourceTypesNames(ctx context.Context, planeName string) ([]string, error) {
resourceProviderSummaries, err := amc.ListResourceProviderSummaries(ctx, planeName)
if err != nil {
return []string{}, err
}
Expand All @@ -801,7 +801,7 @@ func (amc *UCPApplicationsManagementClient) ListResourcesInApplication(ctx conte
return nil, err
}

ResourceTypesList, err := amc.ListAllResourceTypesNames(ctx)
ResourceTypesList, err := amc.ListAllResourceTypesNames(ctx, "local")
if err != nil {
return nil, err
}
Expand All @@ -827,7 +827,7 @@ func (amc *UCPApplicationsManagementClient) ListResourcesInEnvironment(ctx conte
}

results := []generated.GenericResource{}
ResourceTypesList, err := amc.ListAllResourceTypesNames(ctx)
ResourceTypesList, err := amc.ListAllResourceTypesNames(ctx, "local")
for _, resourceType := range ResourceTypesList {
resources, err := amc.ListResourcesOfTypeInEnvironment(ctx, environmentID, resourceType)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion test/functional-portable/corerp/noncloud/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func Test_ResourceList(t *testing.T) {

resourceGroupScope := parsed.String()

resourceTypesList, err := options.ManagementClient.(*clients.UCPApplicationsManagementClient).ListAllResourceTypesNames(context.Background())
resourceTypesList, err := options.ManagementClient.(*clients.UCPApplicationsManagementClient).ListAllResourceTypesNames(context.Background(), "local")
require.NoError(t, err)
resourceTypes := []string{"Applications.Core/applications", "Applications.Core/environments"}
resourceTypes = append(resourceTypes, resourceTypesList...)
Expand Down

0 comments on commit d18246c

Please sign in to comment.