コード例 #1
0
 @BeforeMethod(alwaysRun = true)
 @Override
 public void setUp() throws Exception {
   super.setUp();
   jcloudsLocation =
       (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC);
 }
コード例 #2
0
 @AfterMethod(alwaysRun = true)
 @Override
 public void tearDown() throws Exception {
   try {
     super.tearDown();
   } finally {
     if (context != null) context.close();
   }
 }
コード例 #3
0
  @BeforeMethod(alwaysRun = true)
  @Override
  public void setUp() throws Exception {
    super.setUp();

    jcloudsLocation =
        (JcloudsLocation) managementContext.getLocationRegistry().resolve(LOCATION_SPEC);

    context =
        ContextBuilder.newBuilder(PROVIDER)
            .modules(Arrays.asList(new SshjSshClientModule(), new SLF4JLoggingModule()))
            .credentials(jcloudsLocation.getIdentity(), jcloudsLocation.getCredential())
            .build(ComputeServiceContext.class);
  }