Package org.jclouds.gogrid.domain

Examples of org.jclouds.gogrid.domain.Option


   @Override
   @SelectJson("list")
   @OnlyElement
   public Server expected() {
      Option dc = Option.createWithIdNameAndDescription(1l, "US-West-1", "US West 1 Datacenter");
      Option centOs = Option.createWithIdNameAndDescription(13L, "CentOS 5.2 (32-bit)", "CentOS 5.2 (32-bit)");
      Option webServer = Option.createWithIdNameAndDescription(1L, "Web Server", "Web or Application Server");
      return Server.builder().id(75245L).datacenter(dc).isSandbox(false).name("PowerServer").description("server to test the api. created by Alex")
            .state(ServerState.ON).type(webServer).ram(Option.createWithIdNameAndDescription(1L, "512MB", "Server with 512MB RAM"))
            .os(centOs).ip(Ip.builder().id(1313079L).ip("204.51.240.178").subnet("204.51.240.176/255.255.255.240").isPublic(true).state(IpState.ASSIGNED).datacenter(dc).build())
            .image(ServerImage.builder().id(1946L).name("GSI-f8979644-e646-4711-ad58-d98a5fa3612c").friendlyName("BitNami Gallery 2.3.1-0")
                  .description("http://bitnami.org/stack/gallery").os(centOs).type(ServerImageType.WEB_APPLICATION_SERVER)
View Full Code Here


   }

   @Override
   @SelectJson("list")
   public Set<Server> expected() {
      Option dc = Option.createWithIdNameAndDescription(1l, "US-West-1", "US West 1 Datacenter");
      Option centOs = Option.createWithIdNameAndDescription(13L, "CentOS 5.2 (32-bit)", "CentOS 5.2 (32-bit)");
      Option webServer = Option.createWithIdNameAndDescription(1L, "Web Server", "Web or Application Server");
      return ImmutableSet.of(Server.builder().id(75245L).datacenter(dc).name("PowerServer").description("server to test the api. created by Alex")
            .state(ServerState.ON).type(webServer).ram(Option.createWithIdNameAndDescription(1L, "512MB", "Server with 512MB RAM")).os(centOs)
            .ip(Ip.builder().id(1313079L).ip("204.51.240.178").subnet("204.51.240.176/255.255.255.240").isPublic(true).state(IpState.ASSIGNED).datacenter(dc).build())
            .image(ServerImage.builder().id(1946L).name("GSI-f8979644-e646-4711-ad58-d98a5fa3612c").friendlyName("BitNami Gallery 2.3.1-0")
                  .description("http://bitnami.org/stack/gallery").os(centOs).type(ServerImageType.WEB_APPLICATION_SERVER)
View Full Code Here

   @Test
   public void testApplySetsTagFromNameAndCredentialsFromName() {

      Map<ServerState, Status> serverStateToNodeStatus = createMock(Map.class);
      org.jclouds.compute.domain.Image jcImage = createMock(org.jclouds.compute.domain.Image.class);
      Option dc = Option.createWithIdNameAndDescription(1l, "US-West-1", "US West 1 Datacenter");
      Option ram = Option.createWithIdNameAndDescription(1l, "512MB", "Server with 512MB RAM");

      Set<? extends org.jclouds.compute.domain.Image> images = ImmutableSet.of(jcImage);
      Server server = createMock(Server.class);

      expect(server.getId()).andReturn(1000l).atLeastOnce();
View Full Code Here

      InputStream is = getClass().getResourceAsStream("/test_get_load_balancer_list.json");

      ParseLoadBalancerListFromJsonResponse parser = i.getInstance(ParseLoadBalancerListFromJsonResponse.class);
      SortedSet<LoadBalancer> response = parser.apply(HttpResponse.builder().statusCode(200).message("ok").payload(is).build());

      Option dc = Option.createWithIdNameAndDescription(1l, "US-West-1", "US West 1 Datacenter");

      LoadBalancer loadBalancer = LoadBalancer.builder().id(6372L).name("Balancer")
            .virtualIp(IpPortPair.builder().ip(Ip.builder().id(1313082L)
                  .ip("204.51.240.181").subnet("204.51.240.176/255.255.255.240").isPublic(true).state(IpState.ASSIGNED).datacenter(dc).build()).port(80).build())
            .realIpList(
View Full Code Here

   @Test
   public void testApplySetsTagFromNameAndCredentialsFromName() {

      Map<ServerState, Status> serverStateToNodeStatus = createMock(Map.class);
      org.jclouds.compute.domain.Image jcImage = createMock(org.jclouds.compute.domain.Image.class);
      Option dc = Option.createWithIdNameAndDescription(1l, "US-West-1", "US West 1 Datacenter");
      Option ram = Option.createWithIdNameAndDescription(1l, "512MB", "Server with 512MB RAM");

      Set<? extends org.jclouds.compute.domain.Image> images = ImmutableSet.of(jcImage);
      Server server = createMock(Server.class);

      expect(server.getId()).andReturn(1000l).atLeastOnce();
View Full Code Here

   @Override
   @SelectJson("list")
   @OnlyElement
   public Server expected() {
      Option dc = Option.createWithIdNameAndDescription(1l, "US-West-1", "US West 1 Datacenter");
      Option centOs = Option.createWithIdNameAndDescription(13L, "CentOS 5.2 (32-bit)", "CentOS 5.2 (32-bit)");
      Option webServer = Option.createWithIdNameAndDescription(1L, "Web Server", "Web or Application Server");
      return Server.builder().id(75245L).datacenter(dc).isSandbox(false).name("PowerServer").description("server to test the api. created by Alex")
            .state(ServerState.ON).type(webServer).ram(Option.createWithIdNameAndDescription(1L, "512MB", "Server with 512MB RAM"))
            .os(centOs).ip(Ip.builder().id(1313079L).ip("204.51.240.178").subnet("204.51.240.176/255.255.255.240").isPublic(true).state(IpState.ASSIGNED).datacenter(dc).build())
            .image(ServerImage.builder().id(1946L).name("GSI-f8979644-e646-4711-ad58-d98a5fa3612c").friendlyName("BitNami Gallery 2.3.1-0")
                  .description("http://bitnami.org/stack/gallery").os(centOs).type(ServerImageType.WEB_APPLICATION_SERVER)
View Full Code Here

   }

   @Override
   @SelectJson("list")
   public Set<Server> expected() {
      Option dc = Option.createWithIdNameAndDescription(1l, "US-West-1", "US West 1 Datacenter");
      Option centOs = Option.createWithIdNameAndDescription(13L, "CentOS 5.2 (32-bit)", "CentOS 5.2 (32-bit)");
      Option webServer = Option.createWithIdNameAndDescription(1L, "Web Server", "Web or Application Server");
      return ImmutableSet.of(Server.builder().id(75245L).datacenter(dc).name("PowerServer").description("server to test the api. created by Alex")
            .state(ServerState.ON).type(webServer).ram(Option.createWithIdNameAndDescription(1L, "512MB", "Server with 512MB RAM")).os(centOs)
            .ip(Ip.builder().id(1313079L).ip("204.51.240.178").subnet("204.51.240.176/255.255.255.240").isPublic(true).state(IpState.ASSIGNED).datacenter(dc).build())
            .image(ServerImage.builder().id(1946L).name("GSI-f8979644-e646-4711-ad58-d98a5fa3612c").friendlyName("BitNami Gallery 2.3.1-0")
                  .description("http://bitnami.org/stack/gallery").os(centOs).type(ServerImageType.WEB_APPLICATION_SERVER)
View Full Code Here

      InputStream is = getClass().getResourceAsStream("/test_get_load_balancer_list.json");

      ParseLoadBalancerListFromJsonResponse parser = i.getInstance(ParseLoadBalancerListFromJsonResponse.class);
      SortedSet<LoadBalancer> response = parser.apply(HttpResponse.builder().statusCode(200).message("ok").payload(is).build());

      Option dc = Option.createWithIdNameAndDescription(1l, "US-West-1", "US West 1 Datacenter");

      LoadBalancer loadBalancer = LoadBalancer.builder().id(6372L).name("Balancer")
            .virtualIp(IpPortPair.builder().ip(Ip.builder().id(1313082L)
                  .ip("204.51.240.181").subnet("204.51.240.176/255.255.255.240").isPublic(true).state(IpState.ASSIGNED).datacenter(dc).build()).port(80).build())
            .realIpList(
View Full Code Here

      InputStream is = getClass().getResourceAsStream("/test_get_load_balancer_list.json");

      ParseLoadBalancerListFromJsonResponse parser = i.getInstance(ParseLoadBalancerListFromJsonResponse.class);
      SortedSet<LoadBalancer> response = parser.apply(HttpResponse.builder().statusCode(200).message("ok").payload(is).build());

      Option dc = Option.createWithIdNameAndDescription(1l, "US-West-1", "US West 1 Datacenter");

      LoadBalancer loadBalancer = LoadBalancer.builder().id(6372L).name("Balancer")
            .virtualIp(IpPortPair.builder().ip(Ip.builder().id(1313082L)
                  .ip("204.51.240.181").subnet("204.51.240.176/255.255.255.240").isPublic(true).state(IpState.ASSIGNED).datacenter(dc).build()).port(80).build())
            .realIpList(
View Full Code Here

   @Test
   public void testApplySetsTagFromNameAndCredentialsFromName() {

      Map<ServerState, Status> serverStateToNodeStatus = createMock(Map.class);
      org.jclouds.compute.domain.Image jcImage = createMock(org.jclouds.compute.domain.Image.class);
      Option dc = Option.createWithIdNameAndDescription(1l, "US-West-1", "US West 1 Datacenter");
      Option ram = Option.createWithIdNameAndDescription(1l, "512MB", "Server with 512MB RAM");

      Set<? extends org.jclouds.compute.domain.Image> images = ImmutableSet.of(jcImage);
      Server server = createMock(Server.class);

      expect(server.getId()).andReturn(1000l).atLeastOnce();
View Full Code Here

TOP

Related Classes of org.jclouds.gogrid.domain.Option

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.