Package org.fusesource.ide.fabric8.ui.actions.jclouds

Examples of org.fusesource.ide.fabric8.ui.actions.jclouds.CloudDetails


  @Test
  public void testDeleteProfile() throws Exception {
      if (!this.doTests) return;
    Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);

      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      VersionDTO version = fabric8.getDefaultVersion();
      assertNotNull("Default version is null", version);
     
      ProfileDTO profile = fabric8.createProfile(version.getId(), "unitTestProfileIDE");
      assertNotNull("createProfile returns null when created profile", profile);
     
      ProfileDTO profile2 = fabric8.getProfile(version.getId(), "unitTestProfileIDE");
      assertNotNull("getProfile returns null for created profile", profile2);
     
      fabric8.deleteProfile(version.getId(), profile2.getId());
     
      profile2 = fabric8.getProfile(version.getId(), "unitTestProfileIDE");
      assertNull("The profile hasn't been deleted from backstore", profile2);     
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
  }
View Full Code Here


   
  @Test
  public void testGetContainers() throws Exception {
      if (!this.doTests) return;
    Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);

      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      List<ContainerDTO> containers = fabric8.getContainers();
      assertNotNull("getContainers() returned not allowed value NULL!", containers);
     
      System.out.println("Found containers: " + containers.size());
      for (ContainerDTO container : containers) {
         System.out.println("Found container: " + container.getId());
      }
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
  } 
View Full Code Here

 
  @Test
  public void testGetRootContainer() throws Exception {
      if (!this.doTests) return;
    Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);

      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      ContainerDTO container = fabric8.getContainer("root");
      assertNotNull("getContainer('root') returned NULL!", container);
     
      assertTrue("Root container is not root!", container.isRoot());     
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
  }
View Full Code Here

 
  @Test
  public void testRootContainerProvisionStatus() throws Exception {
      if (!this.doTests) return;
    Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);

      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      ContainerDTO container = fabric8.getContainer("root");
      assertNotNull("getContainer('root') returned NULL!", container);
     
      assertNotNull("Root container has no provision status!", container.getProvisionStatus());   
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
  }
View Full Code Here

 
  @Test
  public void testRootContainerParentId() throws Exception {
      if (!this.doTests) return;
    Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);

      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      ContainerDTO container = fabric8.getContainer("root");
      assertNotNull("getContainer('root') returned NULL!", container);
     
      assertNull("Root container has a parent ?!", container.getParentId());   
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
  }
View Full Code Here

 
  @Test
  public void testRootContainerChildrenIds() throws Exception {
      if (!this.doTests) return;
    Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);

      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      ContainerDTO container = fabric8.getContainer("root");
      assertNotNull("getContainer('root') returned NULL!", container);
     
      assertNotNull("Root container children ids returned null?!", container.getChildrenIds());   
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
  }
View Full Code Here

 
  @Test
  public void testRootContainerProcessId() throws Exception {
      if (!this.doTests) return;
    Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);

      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      ContainerDTO container = fabric8.getContainer("root");
      assertNotNull("getContainer('root') returned NULL!", container);
     
      assertTrue("Root container process id  is null?!", container.getProcessId()>=0);   
      System.out.println("Container 'root' is running with PID: " + container.getProcessId());
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
  }
View Full Code Here

 
  @Test
  public void testRootContainerVersionId() throws Exception {
      if (!this.doTests) return;
    Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);

      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      ContainerDTO container = fabric8.getContainer("root");
      assertNotNull("getContainer('root') returned NULL!", container);
     
      assertNotNull("Root container version id  is null?!", container.getVersionId());   
      System.out.println("Container 'root' is running with version: " + container.getVersionId());
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
  }
View Full Code Here

 
  @Test
  public void testRootContainerProfileIds() throws Exception {
      if (!this.doTests) return;
      Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);

      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      ContainerDTO container = fabric8.getContainer("root");
      assertNotNull("getContainer('root') returned NULL!", container);
     
      assertNotNull("Root container profile ids is null?!", container.getProfileIDs());   
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
  }
View Full Code Here

 
  @Test
  public void testRootContainerEnsembleServer() throws Exception {
      if (!this.doTests) return;
    Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);

      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      ContainerDTO container = fabric8.getContainer("root");
      assertNotNull("getContainer('root') returned NULL!", container);
     
      assertNotNull("Root container ensemble server is null?!", container.isEnsembleServer());   
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
  }
View Full Code Here

TOP

Related Classes of org.fusesource.ide.fabric8.ui.actions.jclouds.CloudDetails

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.