Skip to content

Commit

Permalink
Merge pull request #196 from stat-kwon/master
Browse files Browse the repository at this point in the history
fix: change variables for SpaceONE 2.0 in Inventory service
  • Loading branch information
stat-kwon authored Dec 16, 2023
2 parents 9a30c67 + 16f6bcb commit 75d21a1
Show file tree
Hide file tree
Showing 12 changed files with 170 additions and 222 deletions.
12 changes: 8 additions & 4 deletions proto/spaceone/api/inventory/v1/change_history.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ message ChangeHistoryQuery {
string job_id = 6;
// +optional
string updated_by = 7;
string domain_id = 8;
// +optional
string project_id = 8;
}

//message RecordDiff {
Expand Down Expand Up @@ -80,8 +81,12 @@ message RecordInfo {
string collector_id = 7;
string job_id = 8;
string updated_by = 9;
string domain_id = 10;
string created_at = 11;

string project_id = 19;
string workspace_id = 20;
string domain_id = 21;

string created_at = 31;
}

message ChangeHistoryInfo {
Expand All @@ -91,6 +96,5 @@ message ChangeHistoryInfo {

message ChangeHistoryStatQuery {
spaceone.api.core.v1.StatisticsQuery query = 1;
string domain_id = 2;
string cloud_service_id = 3;
}
29 changes: 5 additions & 24 deletions proto/spaceone/api/inventory/v1/cloud_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ service CloudService {
}

// Gets a specific CloudService. Prints detailed information about the CloudService, including its state, classification information, and attribute values.
rpc get (GetCloudServiceRequest) returns (CloudServiceInfo) {
rpc get (CloudServiceRequest) returns (CloudServiceInfo) {
option (google.api.http) = {
post: "/inventory/v1/cloud-service/get"
body: "*"
Expand Down Expand Up @@ -161,7 +161,6 @@ message CreateServiceRequest {
string region_code = 21;
// +optional
string project_id = 22;
string domain_id = 23;
}

//{
Expand Down Expand Up @@ -200,35 +199,18 @@ message UpdateCloudServiceRequest {
string region_code = 20;
// +optional
string project_id = 21;
string domain_id = 22;
// +optional
bool release_project = 30;
// +optional
bool release_region = 31;
}

message PinCloudServiceDataRequest {
string cloud_service_id = 1;
repeated string keys = 2;
string domain_id = 3;
}

//{
// "cloud_service_id": "cloud-svc-fea2b0d32141"
//}
message CloudServiceRequest {
string cloud_service_id = 1;
string domain_id = 2;
}

//{
// "cloud_service_id": "cloud-svc-fea2b0d32141"
//}
message GetCloudServiceRequest {
string cloud_service_id = 1;
string domain_id = 2;
// +optional
repeated string only = 3;
}

//{
Expand Down Expand Up @@ -269,7 +251,6 @@ message CloudServiceQuery {
string project_id = 21;
// +optional
string project_group_id = 22;
string domain_id = 24;
}

//{
Expand Down Expand Up @@ -326,6 +307,7 @@ message CloudServiceQuery {
// },
// "ip_addresses": [],
// "region_code": "ap-northeast-1",
// "workspace_id": "workspace-58010aa2e451",
// "domain_id": "domain-58010aa2e451",
// "created_at": "2022-06-22T06:38:48.989Z",
// "updated_at": "2022-06-22T06:38:48.989Z",
Expand All @@ -352,7 +334,8 @@ message CloudServiceInfo {

string region_code = 21;
string project_id = 22;
string domain_id = 23;
string workspace_id = 23;
string domain_id = 24;

string created_at = 31;
string updated_at = 32;
Expand Down Expand Up @@ -417,6 +400,7 @@ message CloudServiceInfo {
// "2.2.2.2"
// ],
// "region_code": "ap-northeast-1",
// "workspace_id": "workspace-58010aa2e451",
// "domain_id": "domain-58010aa2e451",
// "created_at": "2022-06-22T06:38:48.989Z",
// "updated_at": "2022-06-22T06:38:48.989Z",
Expand All @@ -443,15 +427,12 @@ message CloudServiceExportRequest {
string file_name = 3;
// +optional
string timezone = 4;
string domain_id = 21;
}

message CloudServiceAnalyzeQuery {
spaceone.api.core.v1.AnalyzeQuery query = 1;
string domain_id = 2;
}

message CloudServiceStatQuery {
spaceone.api.core.v1.StatisticsQuery query = 1;
string domain_id = 2;
}
38 changes: 23 additions & 15 deletions proto/spaceone/api/inventory/v1/cloud_service_query_set.proto
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ service CloudServiceQuerySet {
// }
//}
message CreateCloudServiceQuerySetRequest {

enum ResourceGroup {
RESOURCE_GROUP_NONE = 0;
DOMAIN = 1;
WORKSPACE = 2;
}
string name = 1;
spaceone.api.core.v1.AnalyzeQuery query_options = 2;
// +optional
Expand All @@ -120,7 +126,7 @@ message CreateCloudServiceQuerySetRequest {
string cloud_service_type = 6;
// +optional
google.protobuf.Struct tags = 11;
string domain_id = 21;
ResourceGroup resource_group = 12;
}

//{
Expand All @@ -146,25 +152,13 @@ message UpdateCloudServiceQuerySetRequest {
google.protobuf.Struct unit = 4;
// +optional
google.protobuf.Struct tags = 11;
string domain_id = 21;
}

//{
// "query_set_id": "query-set-abcd1234"
//}
message CloudServiceQuerySetRequest {
string query_set_id = 1;
string domain_id = 2;
}

//{
// "query_set_id": "query-set-abcd1234"
//}
message GetCloudServiceQuerySetRequest {
string query_set_id = 1;
string domain_id = 2;
// +optional
repeated string only = 3;
}

//{
Expand All @@ -176,6 +170,7 @@ message GetCloudServiceQuerySetRequest {
// "provider": "aws",
// "cloud_service_group": "EC2",
// "cloud_service_type": "Instance",
// "resource_group": "DOMAIN",
//}
message CloudServiceQuerySetQuery {
enum State {
Expand All @@ -190,6 +185,12 @@ message CloudServiceQuerySetQuery {
CUSTOM = 2;
}

enum ResourceGroup {
RESOURCE_GROUP_NONE = 0;
DOMAIN = 1;
WORKSPACE = 2;
}

// +optional
spaceone.api.core.v1.Query query = 1;
// +optional
Expand All @@ -206,7 +207,7 @@ message CloudServiceQuerySetQuery {
string cloud_service_group = 7;
// +optional
string cloud_service_type = 8;
string domain_id = 11;
ResourceGroup resource_group = 9;
}

//{
Expand Down Expand Up @@ -251,6 +252,12 @@ message CloudServiceQuerySetInfo {
CUSTOM = 2;
}

enum ResourceGroup {
RESOURCE_GROUP_NONE = 0;
DOMAIN = 1;
WORKSPACE = 2;
}

string query_set_id = 1;
string name = 2;
State state = 3;
Expand All @@ -264,7 +271,9 @@ message CloudServiceQuerySetInfo {
string cloud_service_type = 11;

google.protobuf.Struct tags = 21;
ResourceGroup resource_group = 22;

string workspace_id = 30;
string domain_id = 31;

string created_at = 41;
Expand Down Expand Up @@ -313,5 +322,4 @@ message CloudServiceQuerySetsInfo {

message CloudServiceQuerySetStatQuery {
spaceone.api.core.v1.StatisticsQuery query = 1;
string domain_id = 2;
}
29 changes: 16 additions & 13 deletions proto/spaceone/api/inventory/v1/cloud_service_report.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ service CloudServiceReport {
};
}

rpc get (GetCloudServiceReportRequest) returns (CloudServiceReportInfo) {
rpc get (CloudServiceReportRequest) returns (CloudServiceReportInfo) {
option (google.api.http) = {
post: "/inventory/v1/cloud-service-report/get"
body: "*"
Expand Down Expand Up @@ -92,6 +92,12 @@ message CreateCloudServiceReportRequest {
CSV = 2;
}

enum ResourceGroup {
RESOURCE_GROUP_NONE = 0;
DOMAIN = 1;
WORKSPACE = 2;
}

string name = 1;
repeated spaceone.api.core.v1.ExportOption options = 2;
// +optional
Expand All @@ -104,7 +110,7 @@ message CreateCloudServiceReportRequest {
string language = 7;
// +optional
google.protobuf.Struct tags = 11;
string domain_id = 21;
ResourceGroup resource_group = 12;
}


Expand Down Expand Up @@ -132,19 +138,10 @@ message UpdateCloudServiceReportRequest {
string language = 8;
// +optional
google.protobuf.Struct tags = 11;
string domain_id = 21;
}

message CloudServiceReportRequest {
string report_id = 1;
string domain_id = 2;
}

message GetCloudServiceReportRequest {
string report_id = 1;
string domain_id = 2;
// +optional
repeated string only = 3;
}

message CloudServiceReportQuery {
Expand All @@ -154,7 +151,6 @@ message CloudServiceReportQuery {
string report_id = 2;
// +optional
string name = 3;
string domain_id = 11;
}

message CloudServiceReportInfo {
Expand All @@ -164,6 +160,12 @@ message CloudServiceReportInfo {
CSV = 2;
}

enum ResourceGroup {
RESOURCE_GROUP_NONE = 0;
DOMAIN = 1;
WORKSPACE = 2;
}

string report_id = 1;
string name = 2;
repeated spaceone.api.core.v1.ExportOption options = 3;
Expand All @@ -174,7 +176,9 @@ message CloudServiceReportInfo {
string language = 8;

google.protobuf.Struct tags = 11;
ResourceGroup resource_group = 12;

string workspace_id = 20;
string domain_id = 21;

string created_at = 31;
Expand All @@ -188,5 +192,4 @@ message CloudServiceReportsInfo {

message CloudServiceReportStatQuery {
spaceone.api.core.v1.StatisticsQuery query = 1;
string domain_id = 2;
}
6 changes: 2 additions & 4 deletions proto/spaceone/api/inventory/v1/cloud_service_stats.proto
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ message CloudServiceStatsQuery {
string account = 7;
// +optional
string project_id = 11;
string domain_id = 12;
}

//{
Expand Down Expand Up @@ -102,7 +101,8 @@ message CloudServiceStatInfo {
google.protobuf.Struct additional_info = 11;

string project_id = 21;
string domain_id = 22;
string workspace_id = 22;
string domain_id = 23;

string created_date = 31;
}
Expand Down Expand Up @@ -146,12 +146,10 @@ message CloudServiceStatsInfo {
message CloudServiceStatsAnalyzeQuery {
spaceone.api.core.v1.TimeSeriesAnalyzeQuery query = 1;
string query_set_id = 2;
string domain_id = 3;
}

message CloudServiceStatsStatQuery {
spaceone.api.core.v1.StatisticsQuery query = 1;
// +optional
string query_set_id = 2;
string domain_id = 3;
}
Loading

0 comments on commit 75d21a1

Please sign in to comment.