Package org.jclouds.openstack.neutron.v2_0.domain

Examples of org.jclouds.openstack.neutron.v2_0.domain.Reference$ConcreteBuilder


   @Test(description = "PUT /vApp/{id}/networkConnectionSection", dependsOnMethods = { "testEditGuestCustomizationSection" })
  public void testEditNetworkConnectionSection() {

    // Look up a network in the Vdc
    Set<Reference> networks = vdc.getAvailableNetworks();
    Reference network = Iterables.getLast(networks);

    // Copy existing section and edit fields
    NetworkConnectionSection oldSection = vmApi
        .getNetworkConnectionSection(vmUrn);
    NetworkConnection newNetworkConnection = NetworkConnection.builder()
        .network(network.getName()).networkConnectionIndex(1)
        .ipAddressAllocationMode(IpAddressAllocationMode.DHCP).build();
    NetworkConnectionSection newSection = oldSection.toBuilder()
        .networkConnection(newNetworkConnection).build();

    // The method under test
View Full Code Here


      }
   }

   @Test(description = "GET /org/{id}", dependsOnMethods = { "testGetOrgList" })
   public void testGetOrg() {
      Reference orgRef = Iterables.getFirst(orgList, null);
      assertNotNull(orgRef);

      // Call the method being tested
      org = orgApi.get(orgUrn);
View Full Code Here

   }

   @Test(description = "GET /tasksList/{id}")
   public void testGetTaskList() {
      orgList = orgApi.list();
      Reference orgRef = Iterables.getFirst(orgList, null);
      assertNotNull(orgRef);
      orgURI = orgRef.getHref();
     
      Org org = orgApi.get(orgURI);
     
      URI taskListHref = Iterables.find(org.getLinks(), LinkPredicates.typeEquals(VCloudDirectorMediaType.TASKS_LIST)).getHref();
View Full Code Here

   @Test(description = "PUT /vApp/{id}/networkConnectionSection", dependsOnMethods = { "testEditGuestCustomizationSection" })
  public void testEditNetworkConnectionSection() {

    // Look up a network in the Vdc
    Set<Reference> networks = vdc.getAvailableNetworks();
    Reference network = Iterables.getLast(networks);

    // Copy existing section and edit fields
    NetworkConnectionSection oldSection = vmApi
        .getNetworkConnectionSection(vmUrn);
    NetworkConnection newNetworkConnection = NetworkConnection.builder()
        .network(network.getName()).networkConnectionIndex(1)
        .ipAddressAllocationMode(IpAddressAllocationMode.DHCP).build();
    NetworkConnectionSection newSection = oldSection.toBuilder()
        .networkConnection(newNetworkConnection).build();

    // The method under test
View Full Code Here

  
   @Override
   @BeforeClass(alwaysRun = true)
   public void setupRequiredApis() {
      groupApi = adminContext.getApi().getGroupApi();
      Reference orgRef = null;
     
      // TODO: requisite LDAP settings
//      oldLdapSettings = adminContext.getApi().getAdminOrgApi().getLdapSettings(orgRef.getId());
//      OrgLdapSettings newLdapSettings = oldLdapSettings.toBuilder()
//         .ldapMode(OrgLdapSettings.LdapMode.SYSTEM) 
View Full Code Here

      }
   }

   @Test(description = "GET /org/{id}", dependsOnMethods = { "testGetOrgList" })
   public void testGetOrg() {
      Reference orgRef = Iterables.getFirst(orgList, null);
      assertNotNull(orgRef);

      // Call the method being tested
      org = orgApi.get(orgUrn);
View Full Code Here

   }

   @Test(description = "GET /tasksList/{id}")
   public void testGetTaskList() {
      orgList = orgApi.list();
      Reference orgRef = Iterables.getFirst(orgList, null);
      assertNotNull(orgRef);
      orgURI = orgRef.getHref();
     
      Org org = orgApi.get(orgURI);
     
      URI taskListHref = Iterables.find(org.getLinks(), LinkPredicates.typeEquals(VCloudDirectorMediaType.TASKS_LIST)).getHref();
View Full Code Here

    * @throws VCloudException
    */
   public RecomposeVAppParams addRecomposeParams(VApp vApp, Vm vm) {

      // creating an item element. this item will contain the vm which should be added to the vapp.
      Reference reference = Reference.builder().name(name("vm-")).href(vm.getHref()).type(vm.getType()).build();
      SourcedCompositionItemParam vmItem = SourcedCompositionItemParam.builder().source(reference).build();

      InstantiationParams vmInstantiationParams = null;

      Set<NetworkAssignment> networkAssignments = Sets.newLinkedHashSet();
View Full Code Here

  
   @Override
   @BeforeClass(alwaysRun = true)
   public void setupRequiredApis() {
      groupApi = adminContext.getApi().getGroupApi();
      Reference orgRef = null;
     
      // TODO: requisite LDAP settings
//      oldLdapSettings = adminContext.getApi().getAdminOrgApi().getLdapSettings(orgRef.getId());
//      OrgLdapSettings newLdapSettings = oldLdapSettings.toBuilder()
//         .ldapMode(OrgLdapSettings.LdapMode.SYSTEM) 
View Full Code Here

    * @throws VCloudException
    */
   public RecomposeVAppParams addRecomposeParams(VApp vApp, Vm vm) {

      // creating an item element. this item will contain the vm which should be added to the vapp.
      Reference reference = Reference.builder().name(name("vm-")).href(vm.getHref()).type(vm.getType()).build();
      SourcedCompositionItemParam vmItem = SourcedCompositionItemParam.builder().source(reference).build();

      InstantiationParams vmInstantiationParams = null;

      Set<NetworkAssignment> networkAssignments = Sets.newLinkedHashSet();
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.neutron.v2_0.domain.Reference$ConcreteBuilder

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.