Changed to use proper resource type in url on create list input
api call to avoid component type mismatch error.
Issue-ID: SDC-3336
Signed-off-by: Satoshi Fujii <fujii-satoshi@jp.fujitsu.com>
Change-Id: I31f4c6641df9fc067797c4a88d43789df0cf367e
console.log("save button clicked. input=", input);
this.topologyTemplateService
console.log("save button clicked. input=", input);
this.topologyTemplateService
- .createListInput(this.component.uniqueId, input, this.isSelf())
+ .createListInput(this.component, input, this.isSelf())
.subscribe(response => {
this.setInputTabIndication(response.length);
this.checkedPropertiesCount = 0;
.subscribe(response => {
this.setInputTabIndication(response.length);
this.checkedPropertiesCount = 0;
return this.http.put<PolicyInstance>(this.baseUrl + component.getTypeUrl() + component.uniqueId + '/policies/' + policy.uniqueId + '/undeclare', policy)
}
return this.http.put<PolicyInstance>(this.baseUrl + component.getTypeUrl() + component.uniqueId + '/policies/' + policy.uniqueId + '/undeclare', policy)
}
- createListInput(componentId: string, input: any, isSelf: boolean): Observable<any> {
+ createListInput(component: Component, input: any, isSelf: boolean): Observable<any> {
let inputs: any;
if (isSelf) {
// change componentInstanceProperties -> serviceProperties
let inputs: any;
if (isSelf) {
// change componentInstanceProperties -> serviceProperties
} else {
inputs = input;
}
} else {
inputs = input;
}
- return this.http.post<any>(this.baseUrl + 'services/' + componentId + '/create/listInput', inputs);
+ return this.http.post<any>(this.baseUrl + component.getTypeUrl() + component.uniqueId + '/create/listInput', inputs);
}
createPolicy(component: Component, policiesToCreate: InstancePropertiesAPIMap, isSelf: boolean): Observable<any> {
}
createPolicy(component: Component, policiesToCreate: InstancePropertiesAPIMap, isSelf: boolean): Observable<any> {