src/test/java/nl/uva/qcdis/sdia/commons/utils/ToscaHelperTest.java
/**
     * Test of getKeyPairsFromVM method, of class ToscaHelper.
     * @throws java.lang.Exception
     */
Test of getKeyPairsFromVM method, of class ToscaHelper.
Test of getKeyPairsFromVM method of class ToscaHelper .
@Test
    public void testGetKeyPairsFromVM() throws Exception {
        if (serviceUp) {
            System.out.println("getKeyPairsFromVM");
            instance.uploadToscaTemplate(provisionedToscaTemplate);
            KeyPair keyPair;
            List<NodeTemplateMap> vmTopologyTemplatesMap = instance.getVMTopologyTemplates();
            assertNotNull(vmTopologyTemplatesMap);
            for (NodeTemplateMap nodeTemplateMap : vmTopologyTemplatesMap) {
                assertNotNull(nodeTemplateMap);
                List<NodeTemplateMap> vmTemplatesMap = instance.getTemplateVMsForVMTopology(nodeTemplateMap);
                assertNotNull(vmTemplatesMap);
                for (NodeTemplateMap vmMap : vmTemplatesMap) {
                    assertNotNull(vmMap);
                    assertNotNull(vmMap.getNodeTemplate());
                    keyPair = instance.getKeyPairsFromVM(vmMap.getNodeTemplate());
                    assertNotNull(keyPair);
                }
            }
        }
    }
@ Test public void testGetKeyPairsFromVM ( ) throws Exception { if ( serviceUp ) { System . out . println ( "getKeyPairsFromVM" ) ; instance . uploadToscaTemplate ( provisionedToscaTemplate ) ; KeyPair keyPair ; List < NodeTemplateMap > vmTopologyTemplatesMap = instance . getVMTopologyTemplates ( ) ; assertNotNull ( vmTopologyTemplatesMap ) ; for ( NodeTemplateMap nodeTemplateMap : vmTopologyTemplatesMap ) { assertNotNull ( nodeTemplateMap ) ; List < NodeTemplateMap > vmTemplatesMap = instance . getTemplateVMsForVMTopology ( nodeTemplateMap ) ; assertNotNull ( vmTemplatesMap ) ; for ( NodeTemplateMap vmMap : vmTemplatesMap ) { assertNotNull ( vmMap ) ; assertNotNull ( vmMap . getNodeTemplate ( ) ) ; keyPair = instance . getKeyPairsFromVM ( vmMap . getNodeTemplate ( ) ) ; assertNotNull ( keyPair ) ; } } } }
Test of getKeyPairsFromVM method, of class ToscaHelper.
Test of getKeyPairsFromVM method of class ToscaHelper .