File tree 2 files changed +13
-7
lines changed
src/cloudforet/cost_analysis
2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,13 @@ class DataSourceManager(BaseManager):
14
14
def init_response (options ):
15
15
plugin_metadata = PluginMetadata ()
16
16
17
- plugin_metadata .additional_info = [
18
- "Unit Price" ,
19
- "Resource Id" ,
20
- "Subscription Id" ,
21
- "Charge Type" ,
22
- ]
17
+ plugin_metadata .additional_info = {
18
+ "Subscription Name" : {"name" : "Subscription Name" , "visible" : True },
19
+ "Unit Price" : {"name" : "Unit Price" , "visible" : False },
20
+ "Resource Id" : {"name" : "Resource Id" , "visible" : False },
21
+ "Subscription Id" : {"name" : "Subscription Id" , "visible" : False },
22
+ "Charge Type" : {"name" : "Charge Type" , "visible" : False },
23
+ }
23
24
24
25
if currency := options .get ("currency" ):
25
26
plugin_metadata .currency = currency
Original file line number Diff line number Diff line change @@ -59,6 +59,11 @@ class MetadataDataInfo(Model):
59
59
unit = StringType (required = True )
60
60
61
61
62
+ class MetadataAdditionalInfo (Model ):
63
+ name = StringType (required = True )
64
+ visible = BooleanType (default = False )
65
+
66
+
62
67
class PluginMetadata (Model ):
63
68
data_source_rules = ListType (
64
69
ModelType (DataSourceRule ), default = _DEFAULT_DATA_SOURCE_RULES
@@ -71,4 +76,4 @@ class PluginMetadata(Model):
71
76
exclude_license_cost = BooleanType (default = False )
72
77
cost_info = DictType (StringType , default = {})
73
78
data_info = DictType (ModelType (MetadataDataInfo ), default = {})
74
- additional_info = ListType ( StringType , default = [] )
79
+ additional_info = DictType ( ModelType ( MetadataAdditionalInfo ) , default = {} )
You can’t perform that action at this time.
0 commit comments