Commit 2a282261 authored by Spiros Koulouzis's avatar Spiros Koulouzis

added MissingVMTopologyException

parent db7c4550
...@@ -119,8 +119,16 @@ public class ToscaHelper { ...@@ -119,8 +119,16 @@ public class ToscaHelper {
} }
public List<NodeTemplateMap> getVMTopologyTemplates() throws ApiException { public List<NodeTemplateMap> getVMTopologyTemplates() throws ApiException {
try {
List<NodeTemplateMap> vmTopologyTemplates = api.getNodeTemplates(String.valueOf(id), "tosca.nodes.ARTICONF.VM.topology", null, null, null, null, null, null, null); List<NodeTemplateMap> vmTopologyTemplates = api.getNodeTemplates(String.valueOf(id), "tosca.nodes.ARTICONF.VM.topology", null, null, null, null, null, null, null);
return vmTopologyTemplates; return vmTopologyTemplates;
} catch (ApiException ex) {
if (ex.getCode() == 404) {
return null;
}
throw ex;
}
} }
public List<NodeTemplateMap> getTemplateVMsForVMTopology(NodeTemplateMap nodeTemplateMap) throws ApiException { public List<NodeTemplateMap> getTemplateVMsForVMTopology(NodeTemplateMap nodeTemplateMap) throws ApiException {
......
/*
* Copyright 2020 S. Koulouzis
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package nl.uva.sne.drip.model.Exceptions;
/**
*
* @author S. Koulouzis
*/
public class MissingVMTopologyException extends Exception {
public MissingVMTopologyException(String string) {
super(string);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment