Skip to content

Commit ca3b64a

Browse files
authored
Merge pull request #580 from ImMin5/master
Add sync_currency api to report_adjustment_policy.proto for currency
2 parents 58c2d44 + bb8cb69 commit ca3b64a

File tree

3 files changed

+33
-24
lines changed

3 files changed

+33
-24
lines changed

proto/spaceone/api/cost_analysis/v1/cost_report_config.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ message CreateCostReportConfigRequest {
9393
SCOPE_NONE = 0;
9494
WORKSPACE = 1;
9595
PROJECT = 2;
96+
SERVICE_ACCOUNT = 3;
9697
}
9798
Scope scope = 1;
9899
// +optional
@@ -175,6 +176,7 @@ message CostReportConfigInfo {
175176
SCOPE_NONE = 0;
176177
WORKSPACE = 1;
177178
PROJECT = 2;
179+
SERVICE_ACCOUNT = 3;
178180
}
179181

180182
// The ID of cost report in the Protocol.

proto/spaceone/api/cost_analysis/v1/report_adjustment.proto

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ service ReportAdjustment {
5555

5656
}
5757

58-
enum AdjustmentMethod {
59-
METHOD_NONE = 0;
58+
enum AdjustmentUnit {
59+
UNIT_NONE = 0;
6060
FIXED = 1;
6161
PERCENTAGE = 2;
6262
}
6363

6464
message CreateReportAdjustmentRequest {
6565
string name = 1;
66-
AdjustmentMethod method = 2;
66+
AdjustmentUnit unit = 2;
6767
float value = 3;
6868
// +optional
6969
string description = 4;
@@ -83,7 +83,7 @@ message UpdateReportAdjustmentRequest {
8383
// +optional
8484
string name = 2;
8585
// +optional
86-
AdjustmentMethod method = 3;
86+
AdjustmentUnit unit = 3;
8787
// +optional
8888
float value = 4;
8989
// +optional
@@ -117,7 +117,7 @@ message ReportAdjustmentQuery {
117117
message ReportAdjustmentInfo {
118118
string report_adjustment_id = 1;
119119
string name = 2;
120-
AdjustmentMethod method = 3;
120+
AdjustmentUnit unit = 3;
121121
float value = 4;
122122
string description = 5;
123123
string provider = 6;

proto/spaceone/api/cost_analysis/v1/report_adjustment_policy.proto

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ service ReportAdjustmentPolicy {
3939
};
4040
}
4141

42+
rpc sync_currency (ReportAdjustmentPolicyRequest) returns (ReportAdjustmentPolicyInfo) {
43+
option (google.api.http) = {
44+
post: "/cost-analysis/v1/report-adjustment-policy/sync-currency"
45+
body: "*"
46+
};
47+
}
48+
4249
rpc get (ReportAdjustmentPolicyRequest) returns (ReportAdjustmentPolicyInfo) {
4350
option (google.api.http) = {
4451
post: "/cost-analysis/v1/report-adjustment-policy/get",
@@ -65,26 +72,27 @@ message CreateReportAdjustmentPolicyRequest {
6572
SCOPE_NONE = 0;
6673
WORKSPACE = 1;
6774
PROJECT = 2;
75+
SERVICE_ACCOUNT = 3;
6876
}
69-
string name = 1;
70-
Scope scope = 2;
71-
string cost_report_config_id = 3;
77+
Scope scope = 1;
78+
string cost_report_config_id = 2;
7279
// +optional
73-
int32 order = 4;
80+
int32 order = 3;
7481
// +optional
75-
google.protobuf.Struct tags = 6;
82+
string description = 4;
7683
// +optional
77-
AdjustmentPolicyFilter policy_filter = 7;
84+
google.protobuf.Struct tags = 5;
85+
// +optional
86+
AdjustmentPolicyFilter policy_filter = 6;
7887
}
7988

8089
message UpdateReportAdjustmentPolicyRequest {
8190
string report_adjustment_policy_id = 1;
8291
// +optional
83-
string name = 2;
92+
string description = 2;
93+
google.protobuf.Struct tags = 3;
8494
// +optional
85-
google.protobuf.Struct tags = 6;
86-
// +optional
87-
AdjustmentPolicyFilter policy_filter = 7;
95+
AdjustmentPolicyFilter policy_filter = 4;
8896
}
8997

9098
message ChangeOrderReportAdjustmentPolicyRequest {
@@ -100,25 +108,24 @@ message ReportAdjustmentPolicyQuery {
100108
// +optional
101109
spaceone.api.core.v2.Query query = 1;
102110
// +optional
103-
string name = 2;
104-
// +optional
105-
AdjustmentPolicyFilter policy_filter = 4;
111+
AdjustmentPolicyFilter policy_filter = 2;
106112
}
107113

108114
message ReportAdjustmentPolicyInfo {
109115
enum Scope {
110116
SCOPE_NONE = 0;
111117
WORKSPACE = 1;
112118
PROJECT = 2;
119+
SERVICE_ACCOUNT = 3;
113120
}
114121

115122
string report_adjustment_policy_id = 1;
116-
string name = 2;
117-
repeated string adjustments = 4;
118-
Scope scope = 5;
119-
int32 order = 6;
120-
google.protobuf.Struct tags = 7;
121-
AdjustmentPolicyFilter policy_filter = 8;
123+
repeated string adjustments = 2;
124+
Scope scope = 3;
125+
int32 order = 4;
126+
string description = 5;
127+
google.protobuf.Struct tags = 6;
128+
AdjustmentPolicyFilter policy_filter = 7;
122129
string domain_id = 21;
123130
string cost_report_config_id = 22;
124131

0 commit comments

Comments
 (0)