11---
22swagger : ' 2.0'
33info :
4- version : ' 0.0.1 '
4+ version : ' 0.0.2 '
55 title : Cost, Energy and Resource Consumption Modeling Engines API specification
66 description : RESTful API specification for the ElasTest Cost Modeling service
7- termsOfService : http://www.piyush-harsh.info/tos.txt
87 contact :
98 name : Manu Perez
109@@ -54,14 +53,14 @@ paths:
5453 $ref : " #/definitions/CostModelDefinition"
5554 responses :
5655 201 :
57- description : Created
58- schema :
59- $ref : " #/definitions/CreateCostModelOutput"
56+ description : OK
57+ # description: Created
58+ # schema:
59+ # $ref: "#/definitions/CreateCostModelOutput"
6060 default :
6161 description : Unexpexted error
6262 schema :
6363 $ref : " #/definitions/UnexpectedError"
64- /costmodel/{id} :
6564 get :
6665 description : Get details about a given Cost Model.
6766 produces :
@@ -70,152 +69,165 @@ paths:
7069 200 :
7170 description : OK
7271 schema :
73- $ref : " #/definitions/CostModelDetail "
72+ $ref : " #/definitions/CostModelDefinition "
7473 default :
7574 description : Unexpected Error
7675 schema :
7776 $ref : " #/definitions/UnexpectedError"
78- delete :
77+ /deletecostModel :
78+ post :
7979 description : Deletes a given Cost Model.
8080 produces :
8181 - application/json
8282 parameters :
8383 -
8484 in : body
8585 name : body
86- description : Cost model to be deleted
86+ description : Cost Model Id to be deleted
8787 schema :
88- $ref : " #/definitions/UnexpectedError "
88+ $ref : " #/definitions/DeleteCostModel "
8989 responses :
9090 200 :
9191 description : OK
92- schema :
93- $ref : " #/definitions/DeleteCostModelOutput "
92+ # schema:
93+ # $ref: "#/definitions/DeleteCostModel "
9494 default :
9595 description : Unexpected Error
9696 schema :
9797 $ref : " #/definitions/UnexpectedError"
98- /estimate/{testId}/costmodel/{costModelId} :
99- get :
98+ /estimate :
99+ post :
100100 description : Get a cost estimate of a Test Job running on a given Cost Model.
101101 produces :
102102 - application/json
103- responses :
104- 200 :
105- description : OK
106- schema :
107- $ref : " #/definitions/EstimateCostModelOutput"
108- default :
109- description : Unexpected Error
110- schema :
111- $ref : " #/definitions/UnexpectedError"
112- /status/{SuTId} :
113- get :
114- description : Get the current status of a running System under Test.
115- produces :
116- - application/json
117- responses :
118- 200 :
119- description : OK
120- schema :
121- $ref : " #/definitions/Status"
122- default :
123- description : Unexpected Error
103+ parameters :
104+ -
105+ in : body
106+ name : body
107+ description : Test Id and Cost Model Id
124108 schema :
125- $ref : " #/definitions/UnexpectedError"
126- /cost/{SuTId} :
127- get :
128- description : Get the final cost of a finished Test on a System under Test.
129- produces :
130- - application/json
109+ $ref : " #/definitions/EstimateBody"
131110 responses :
132111 200 :
133112 description : OK
134113 schema :
135- $ref : " #/definitions/Cost "
114+ $ref : " #/definitions/EstimateCostModelOutput "
136115 default :
137116 description : Unexpected Error
138117 schema :
139118 $ref : " #/definitions/UnexpectedError"
119+ # /status/{SuTId}:
120+ # get:
121+ # description: Get the current status of a running System under Test.
122+ # produces:
123+ # - application/json
124+ # responses:
125+ # 200:
126+ # description: OK
127+ # schema:
128+ # $ref: "#/definitions/Status"
129+ # default:
130+ # description: Unexpected Error
131+ # schema:
132+ # $ref: "#/definitions/UnexpectedError"
133+ # /cost/{SuTId}:
134+ # get:
135+ # description: Get the final cost of a finished Test on a System under Test.
136+ # produces:
137+ # - application/json
138+ # responses:
139+ # 200:
140+ # description: OK
141+ # schema:
142+ # $ref: "#/definitions/Cost"
143+ # default:
144+ # description: Unexpected Error
145+ # schema:
146+ # $ref: "#/definitions/UnexpectedError"
140147
141148definitions :
142149 UnexpectedError :
143150 type : object
144151 properties :
145152 Error :
146153 type : string
147- Cost :
154+ EstimateCostModelOutput :
148155 type : object
149156 properties :
150- SuT :
157+ testId :
158+ type : string
159+ costModelId :
151160 type : string
152- startTime :
153- type : int64
154- endTime :
155- type : int64
156- cost :
161+ estimatedCost :
157162 type : double
158163 unit :
159164 type : string
160- CostModelDetail :
165+ CostModelDefinition :
161166 type : object
162167 properties :
163- ModelId :
168+ name :
164169 type : string
165- CreateCostModel :
166- type : object
167- properties :
168- ModelId :
170+ type :
169171 type : string
170- EstimateCostModelOutput :
172+ fix_cost :
173+ type : array
174+ items :
175+ $ref : " #/definitions/FixCost"
176+ var_rate :
177+ type : array
178+ items :
179+ $ref : " #/definitions/VarRate"
180+ components :
181+ type : array
182+ items :
183+ $ref : " #/definitions/Component"
184+ description :
185+ type : string
186+ EstimateBody :
171187 type : object
172188 properties :
173189 testId :
174190 type : string
175191 costModelId :
176192 type : string
177- estimatedCost :
178- type : double
179- unit :
180- type : string
181- CreateCostModelOutput :
193+ FixCost :
182194 type : object
183195 properties :
184- ModelId :
185- type : string
186- DeleteCostModelOutput :
196+ fix_costX :
197+ type : double
198+ VarRate :
187199 type : object
188200 properties :
189- costModelId :
190- type : string
191- status :
192- type : string
193- Status :
201+ var_rateX :
202+ type : double
203+ Component :
194204 type : object
195205 properties :
196- SuT :
197- type : string
198- startTime :
199- type : int64
200- Cost :
201- type : double
202- Unit :
203- type : string
204- Status :
206+ componentX :
205207 type : string
206- CostModelDefinition :
208+ DeleteCostModel :
207209 type : object
208210 properties :
209- name :
211+ costModelId :
212+ type : string
213+ status :
210214 type : string
211- definiton :
212- - expressionName : string
213- expression : string
214- expressionDefinition :
215- fieldX : string
216- fieldY : string
217- - expressionName : PAYG
218- expression : (usedSeconds * pricePerSecond)
219- expressionDefinition :
220- usedSeconds : int64
221- pricePerSecond : double
215+
216+ # CreateCostModelOutput:
217+ # type: object
218+ # properties:
219+ # ModelId:
220+ # type: string
221+ # Status:
222+ # type: object
223+ # properties:
224+ # SuT:
225+ # type: string
226+ # startTime:
227+ # type: int64
228+ # Cost:
229+ # type: double
230+ # Unit:
231+ # type: string
232+ # Status:
233+ # type: string
0 commit comments