Skip to content

Commit ea010fe

Browse files
authored
Merge pull request #38 from stat-kwon/master
Modify description of changed cost specifications
2 parents a2a5a7d + a59c7a8 commit ea010fe

3 files changed

Lines changed: 35 additions & 31 deletions

File tree

README.md

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
---
66

77
## 1) Overview
8-
8+
99
This plugin is a plugin that collects cost data from a CSV file.
1010
The CSV file must be in the format specified in the [2) CSV format](#2-csv-format) section.
1111

@@ -19,20 +19,26 @@ you can check the actual usage in [4) How to use](#4-how-to-use).
1919

2020
![img.png](examples/img.png)
2121

22-
* The above is an example of a csv file, and the fields that exist in the csv must exist.
23-
* Here is a list of available fields.
24-
Of these, `cost`, `currency`, `year`, `month`, and `day` fields are required fields.
25-
* **cost (required)**
26-
* **currency (required)**
27-
* **year (required)**
28-
* **month (required)**
29-
* **day (required)**
30-
* usage_quantity
31-
* usage_type
32-
* provider
33-
* region_code
34-
* product
35-
* account
22+
* The above is an example of a csv file, and the fields that exist in the csv must exist.
23+
* Here is a list of available fields. Of these, `cost` fields are required field.
24+
* The required date fields are:
25+
* If there is a `billed_date` (ex. "2023-09-01") field, it works even if there are no `year` and `month` fields.
26+
* This works if there is no `billed_date` field and there are `year`, `month`, and `day` fields.
27+
* If there is no `billed_date` field and there are `year` and `month`, `day` is applied as 1 day.
28+
* Does not work except for the above cases.
29+
30+
<br>
31+
32+
* **cost (required)**
33+
* **billed_date (required)**
34+
* **year (required)**
35+
* **month (required)**
36+
* **day (optional)**
37+
* usage_quantity
38+
* usage_type
39+
* provider
40+
* region_code
41+
* product
3642

3743
## 3) Options of plugin
3844

@@ -113,20 +119,7 @@ options:
113119
currency: KRW
114120
```
115121
116-
**billed_at (optional)**
117-
118-
* If you want to set the billing date, you can use this option.
119-
* If you do not specify this option, The `year` / `month` / `day` columns must exist.
120-
* As you can see in [example_with_billed_at.csv](examples/example_with_billed_at.csv), Can be used if billed_at column
121-
exists. In our example, this is the `UsageStartDate` column.
122-
123-
```yaml
124-
---
125-
options:
126-
billed_at: UsageStartDate
127-
```
128-
129-
## 4) How to use
122+
## 4) How to use (Deprecated)
130123
131124
In order to use the plugin, how to use [spacectl CLI tools](https://github.com/cloudforet-io/spacectl) must be preceded.
132125
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
---
2-
name: HTTP File Data Source
2+
name: CSV File
33
data_source_type: EXTERNAL
44
plugin_info:
5+
secret_data:
6+
status: NOT IMPLEMENTED
57
plugin_id: plugin-http-file-cost-datasource
8+
options:
9+
base_url:
10+
- https://raw.githubusercontent.com/cloudforet-io/plugin-http-file-cost-datasource/master/examples/cost_example.csv
11+
field_mapper:
12+
additional_info:
13+
Account: account

test/spacectl/register_plugin.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ name: HTTP file Cost Analysis Data Source
22
service_type: cost_analysis.DataSource
33
image: pyengine/plugin-http-file-cost-datasource
44
capability: {}
5-
tags: {}
5+
tags:
6+
description: HTTP File Data Source
7+
icon: https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/csv_icon.png
8+
long_description: This plugin can collect predefined CSV format data through http(s) and use it as cost data. Easily integrate data into Cost Analysis from CSV file regardless of any data as possible like API usage.
69
template: {}

0 commit comments

Comments
 (0)