Package org.jclouds.chef.domain

Examples of org.jclouds.chef.domain.CookbookVersion


      assertEquals(cookbook,
            handler.apply(HttpResponse.builder().statusCode(200).message("ok").payload(json.toJson(cookbook)).build()));
   }

   public void testTomcat() {
      CookbookVersion cookbook = handler.apply(HttpResponse.builder().statusCode(200).message("ok")
            .payload(ParseCookbookVersionFromJsonTest.class.getResourceAsStream("/tomcat-cookbook.json")).build());

      assertEquals(cookbook,
            handler.apply(HttpResponse.builder().statusCode(200).message("ok").payload(json.toJson(cookbook)).build()));
   }
View Full Code Here


      assertEquals(cookbook,
            handler.apply(HttpResponse.builder().statusCode(200).message("ok").payload(json.toJson(cookbook)).build()));
   }

   public void testMysql() throws IOException {
      CookbookVersion cookbook = handler.apply(HttpResponse.builder().statusCode(200).message("ok")
            .payload(ParseCookbookVersionFromJsonTest.class.getResourceAsStream("/mysql-cookbook.json")).build());

      assertEquals(cookbook,
            handler.apply(HttpResponse.builder().statusCode(200).message("ok").payload(json.toJson(cookbook)).build()));
   }
View Full Code Here

      assertEquals(cookbook,
            handler.apply(HttpResponse.builder().statusCode(200).message("ok").payload(json.toJson(cookbook)).build()));
   }

   public void testApache() {
      CookbookVersion fromJson = handler.apply(HttpResponse.builder().statusCode(200).message("ok")
            .payload(ParseCookbookVersionFromJsonTest.class.getResourceAsStream("/apache-chef-demo-cookbook.json"))
            .build());

      CookbookVersion expected = CookbookVersion
            .builder("apache-chef-demo", "0.0.0")
            .metadata(Metadata.builder() //
                  .license("Apache v2.0") //
                  .maintainer("Your Name") //
                  .maintainerEmail("youremail@example.com") //
View Full Code Here

            .maintainerEmail("someone@jclouds.org") //
            .license("Apache 2.0") //
            .build();

      // Create a new cookbook
      CookbookVersion cookbook = CookbookVersion.builder(PREFIX, "0.0.0") //
            .metadata(metadata) //
            .rootFile(Resource.builder().fromPayload(content).build()) //
            .build();

      // upload the cookbook to the remote server
View Full Code Here

      for (String cookbookName : cookbookNames) {
         Set<String> versions = api.listVersionsOfCookbook(cookbookName);
         assertFalse(versions.isEmpty(), "There are no versions of the cookbook: " + cookbookName);

         for (String version : api.listVersionsOfCookbook(cookbookName)) {
            CookbookVersion cookbook = api.getCookbook(cookbookName, version);
            assertNotNull(cookbook, "Could not get cookbook: " + cookbookName);
         }
      }
   }
View Full Code Here

      }
   }

   @Test(dependsOnMethods = "testCreateNewCookbook")
   public void testUpdateCookbook() throws Exception {
      CookbookVersion cookbook = api.getCookbook(PREFIX, "0.0.0");
      assertNotNull(cookbook, "Cookbook not found: " + PREFIX);
      assertNotNull(api.updateCookbook(PREFIX, "0.0.0", cookbook), "Updated cookbook was null");
   }
View Full Code Here

            .maintainerEmail("someone@jclouds.org") //
            .license("Apache 2.0") //
            .build();

      // Create new cookbook version
      CookbookVersion cookbook = CookbookVersion.builder(cookbookName, "0.0.0") //
            .metadata(metadata) //
            .rootFile(Resource.builder().fromPayload(v0content).build()) //
            .build();

      // upload the cookbook to the remote server
View Full Code Here

TOP

Related Classes of org.jclouds.chef.domain.CookbookVersion

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.