diff --git a/cmd/list/service.go b/cmd/list/service.go index b6f1045f..605940ec 100644 --- a/cmd/list/service.go +++ b/cmd/list/service.go @@ -30,8 +30,7 @@ var serviceName, version, team, label string func init() { serviceCmd.Flags().StringVar(&serviceName, "name", "", "name of the service") serviceCmd.Flags().StringVar(&version, "version", "", "version of services to be listed") - serviceCmd.Flags().StringVar(&team, "team", "", "name of team") - serviceCmd.Flags().StringVar(&label, "label", "", "name of label") + serviceCmd.Flags().StringVar(&label, "tags", "", "list of tags") listCmd.AddCommand(serviceCmd) } @@ -40,8 +39,7 @@ func listService(cmd *cobra.Command) { response, err := serviceClient.ListService(&ctx, &serviceProto.ListServiceRequest{ Name: serviceName, Version: version, - Team: team, - Label: label, + Tags: tags, }) if err != nil { @@ -67,14 +65,13 @@ func writeListService(response *serviceProto.ListServiceResponse, format string) } func writeListServiceAsText(response *serviceProto.ListServiceResponse) { - var tableHeaders = []string{"Name", "Version", "Label", "Description"} + var tableHeaders = []string{"Name", "Version", "Tags"} var tableData [][]interface{} for _, serviceEntity := range response.Services { tableData = append(tableData, []interface{}{ serviceEntity.Name, serviceEntity.Version, - serviceEntity.Labels, - serviceEntity.Description, + serviceEntity.Tags, }) } table.Write(tableHeaders, tableData) @@ -86,8 +83,7 @@ func writeListServiceAsJSON(response *serviceProto.ListServiceResponse) { services = append(services, map[string]interface{}{ "name": serviceEntity.Name, "version": serviceEntity.Version, - "labels": serviceEntity.Labels, - "description": serviceEntity.Description, + "tags": serviceEntity.Tags, }) } output, _ := json.MarshalIndent(services, "", " ") diff --git a/proto/dream11/od/dto/v1/service.proto b/proto/dream11/od/dto/v1/service.proto index 92dd307f..f7ee0ba9 100644 --- a/proto/dream11/od/dto/v1/service.proto +++ b/proto/dream11/od/dto/v1/service.proto @@ -43,16 +43,9 @@ message ProvisioningConfig { } message ServiceMetadata { - int32 id = 1; - string name = 2; - string version = 3; - string description = 4; - string created_by = 5; - string updated_by = 6; - string created_at = 7; - string updated_at = 8; - string tags = 9; // JSON encoded string - string labels = 10; // comma seperated string + string name = 1; + string version = 2; + string tags = 3; } message AddComponentRequestOptions { diff --git a/proto/dream11/od/service/v1/service.proto b/proto/dream11/od/service/v1/service.proto index fb9257bd..8e07c206 100644 --- a/proto/dream11/od/service/v1/service.proto +++ b/proto/dream11/od/service/v1/service.proto @@ -115,6 +115,5 @@ message ListServiceResponse { message ListServiceRequest { string name = 1; string version = 2; - string team = 3; - string label = 4; + string tags = 3; }