Package com.abiquo.server.core.infrastructure

Examples of com.abiquo.server.core.infrastructure.LogicServerDto


   }

   @Test(expectedExceptions = NullPointerException.class)
   public void testBindLogicServerWithEmptyName() {
      BindLogicServerParameters binder = new BindLogicServerParameters();
      LogicServerDto dto = new LogicServerDto();
      HttpRequest request = HttpRequest.builder().method("GET").endpoint(URI.create("http://localhost")).build();
      binder.bindToRequest(request, dto);
   }
View Full Code Here


      binder.bindToRequest(request, dto);
   }

   public void testBindLogicServer() {
      BindLogicServerParameters binder = new BindLogicServerParameters();
      LogicServerDto dto = new LogicServerDto();
      dto.setName("name");
      HttpRequest request = HttpRequest.builder().method("GET").endpoint(URI.create("http://localhost")).build();
      HttpRequest newRequest = binder.bindToRequest(request, dto);
      assertEquals(newRequest.getRequestLine(), "GET http://localhost?lsName=name HTTP/1.1");
   }
View Full Code Here

            "http://localhost/api/admin/datacenters/1/racks/1/logicservers/dissociate"));
      return rack;
   }

   public static LogicServerDto logicServerPut() {
      LogicServerDto logicServer = new LogicServerDto();
      logicServer.setName("server");
      logicServer.setAssociated("associated");
      logicServer.setType("instance");

      return logicServer;
   }
View Full Code Here

   @Override
   public <R extends HttpRequest> R bindToRequest(final R request, final Object input) {
      checkArgument(checkNotNull(input, "input") instanceof LogicServerDto,
            "this binder is only valid for LogicServerDto objects");

      LogicServerDto server = (LogicServerDto) input;

      return (R) request.toBuilder().addQueryParam("lsName", checkNotNull(server.getName(), "server.name")).build();
   }
View Full Code Here

    *      > http://community.abiquo.com/display/ABI20/MachineResource#
    *      MachineResource-
    *      RetrieveslogicserverassociatedwithamachineinaCiscoUCS</a>
    */
   public LogicServer getLogicServer() {
      LogicServerDto server = context.getApi().getInfrastructureApi().getLogicServer(target);

      return wrap(context, LogicServer.class, server);
   }
View Full Code Here

TOP

Related Classes of com.abiquo.server.core.infrastructure.LogicServerDto

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.