summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/services
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/ng2/services')
-rw-r--r--catalog-ui/src/app/ng2/services/component-services/topology-template.service.ts16
-rw-r--r--catalog-ui/src/app/ng2/services/responses/component-generic-response.ts4
2 files changed, 20 insertions, 0 deletions
diff --git a/catalog-ui/src/app/ng2/services/component-services/topology-template.service.ts b/catalog-ui/src/app/ng2/services/component-services/topology-template.service.ts
index 095c8d6e76..cf30ea8a75 100644
--- a/catalog-ui/src/app/ng2/services/component-services/topology-template.service.ts
+++ b/catalog-ui/src/app/ng2/services/component-services/topology-template.service.ts
@@ -380,6 +380,10 @@ export class TopologyTemplateService {
return this.getComponentDataByFieldsName(componentType, componentId, [SERVICE_FIELDS.NODE_FILTER]);
}
+ getSubstitutionFilterConstraints(componentType: string, componentId: string): Observable<ComponentGenericResponse> {
+ return this.getComponentDataByFieldsName(componentType, componentId, [SERVICE_FIELDS.SUBSTITUTION_FILTER]);
+ }
+
getComponentInstanceProperties(componentType: string, componentId: string): Observable<ComponentGenericResponse> {
return this.getComponentDataByFieldsName(componentType, componentId, [COMPONENT_FIELDS.COMPONENT_INSTANCES_PROPERTIES]);
}
@@ -396,6 +400,18 @@ export class TopologyTemplateService {
return this.http.delete<any>(this.baseUrl + this.getServerTypeUrl(componentType) + componentMetaDataId + '/resourceInstances/' + componentInstanceId + '/nodeFilter/' + constraintIndex)
}
+ createSubstitutionFilterConstraints(componentMetaDataId: string, componentInstanceId: string, constraint: ConstraintObject, componentType: string): Observable<any> {
+ return this.http.post<any>(this.baseUrl + this.getServerTypeUrl(componentType) + componentMetaDataId + '/resourceInstances/' + componentInstanceId + '/substitutionFilter', constraint);
+ }
+
+ updateSubstitutionFilterConstraints(componentMetaDataId: string, componentInstanceId: string, constraint: ConstraintObject, componentType: string): Observable<any> {
+ return this.http.put<any>(this.baseUrl + this.getServerTypeUrl(componentType) + componentMetaDataId + '/resourceInstances/' + componentInstanceId + '/substitutionFilter', constraint);
+ }
+
+ deleteSubstitutionFilterConstraints(componentMetaDataId: string, componentInstanceId: string, constraintIndex: number, componentType: string): Observable<any>{
+ return this.http.delete<any>(this.baseUrl + this.getServerTypeUrl(componentType) + componentMetaDataId + '/resourceInstances/' + componentInstanceId + '/substitutionFilter/' + constraintIndex)
+ }
+
deletePolicy(component: Component, policy: PolicyInstance): Observable<PolicyInstance> {
return this.http.put<PolicyInstance>(this.baseUrl + component.getTypeUrl() + component.uniqueId + '/policies/' + policy.uniqueId + '/undeclare', policy)
}
diff --git a/catalog-ui/src/app/ng2/services/responses/component-generic-response.ts b/catalog-ui/src/app/ng2/services/responses/component-generic-response.ts
index 301b3a4c9b..2c502d9fd5 100644
--- a/catalog-ui/src/app/ng2/services/responses/component-generic-response.ts
+++ b/catalog-ui/src/app/ng2/services/responses/component-generic-response.ts
@@ -57,6 +57,7 @@ export class ComponentGenericResponse implements Serializable<ComponentGenericR
public additionalInformation:any;
public derivedList:Array<any>;
public nodeFilterData: Array<any>;
+ public substitutionFilterForTopologyTemplate: Array<any>;
deserialize (response): ComponentGenericResponse {
@@ -122,6 +123,9 @@ export class ComponentGenericResponse implements Serializable<ComponentGenericR
if(response.nodeFilterData) {
this.nodeFilterData = response.nodeFilterData;
}
+ if(response.substitutionFilterForTopologyTemplate) {
+ this.substitutionFilterForTopologyTemplate = response.substitutionFilterForTopologyTemplate;
+ }
return this;
}
}