You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Noorul Islam K M <no...@github.com> on 2013/09/03 12:54:24 UTC

[jclouds-chef] JCLOUDS-256: Add missing API to list environment recipes (#12)

* core/src/main/java/org/jclouds/chef/ChefApi.java:
   Add /environments/{environment}/recipes.

* core/src/main/java/org/jclouds/chef/test/TransientChefApi.java
   Add skeleton implementation to make compiler happy.

* core/src/test/java/org/jclouds/chef/ChefApiExpectTest.java:
   Expect test for listEnvironmentRecipes.

* core/src/test/resources/environment_recipes.json:
   Expect test data.

* core/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java:
   Add live test for listEnvironmentRecipes.
You can merge this Pull Request by running:

  git pull https://github.com/noorul/jclouds-chef jclouds-256

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds-chef/pull/12

-- Commit Summary --

  * JCLOUDS-256: Add missing API to list environment recipes

-- File Changes --

    M core/src/main/java/org/jclouds/chef/ChefApi.java (15)
    M core/src/main/java/org/jclouds/chef/test/TransientChefApi.java (5)
    A core/src/test/java/org/jclouds/chef/ChefApiExpectTest.java (95)
    M core/src/test/java/org/jclouds/chef/internal/BaseChefApiLiveTest.java (6)
    A core/src/test/resources/environment_recipes.json (6)

-- Patch Links --

https://github.com/jclouds/jclouds-chef/pull/12.patch
https://github.com/jclouds/jclouds-chef/pull/12.diff


Re: [jclouds-chef] JCLOUDS-256: Add missing API to list environment recipes (#12)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-chef #329](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-chef/329/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-chef/pull/12#issuecomment-23773488

Re: [jclouds-chef] JCLOUDS-256: Add missing API to list environment recipes (#12)

Posted by Noorul Islam K M <no...@github.com>.
Can that be another PR?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-chef/pull/12#issuecomment-23773373

Re: [jclouds-chef] JCLOUDS-256: Add missing API to list environment recipes (#12)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-chef-pull-requests #23](https://jclouds.ci.cloudbees.com/job/jclouds-chef-pull-requests/23/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-chef/pull/12#issuecomment-23704114

Re: [jclouds-chef] JCLOUDS-256: Add missing API to list environment recipes (#12)

Posted by Ignasi Barrera <no...@github.com>.
> Can that be another PR?

Sure!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-chef/pull/12#issuecomment-23773496

Re: [jclouds-chef] JCLOUDS-256: Add missing API to list environment recipes (#12)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-chef-pull-requests #25](https://jclouds.ci.cloudbees.com/job/jclouds-chef-pull-requests/25/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-chef/pull/12#issuecomment-23773621

Re: [jclouds-chef] JCLOUDS-256: Add missing API to list environment recipes (#12)

Posted by Ignasi Barrera <no...@github.com>.
> @@ -464,12 +465,29 @@ public boolean apply(SearchOptions input) {
>        assertTrue(waitForIndex.apply(options));
>     }
>  
> +   @Test(dependsOnMethods = "testCreateEnvironment")
> +   public void testListEnvironmentRecipes() {
> +      Set<String> recipeList = api.listEnvironmentRecipes(PREFIX);
> +      assertTrue(!recipeList.isEmpty());
> +   }
> +
> +   @Test(dependsOnMethods = "testCreateEnvironment")
> +   public void testListEnvironmentNodes() {
> +      api.deleteNode(ENV_NODE);
> +      api.createNode(Node.builder().name(ENV_NODE).runListElement("role[" + PREFIX + "]").environment(PREFIX).build());
> +      node = api.getNode(PREFIX);

Should this be `ENV_NODE`?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-chef/pull/12/files#r6147273

Re: [jclouds-chef] JCLOUDS-256: Add missing API to list environment recipes (#12)

Posted by Ignasi Barrera <no...@github.com>.
Closed #12.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-chef/pull/12

Re: [jclouds-chef] JCLOUDS-256: Add missing API to list environment recipes (#12)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-chef-pull-requests #24](https://jclouds.ci.cloudbees.com/job/jclouds-chef-pull-requests/24/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-chef/pull/12#issuecomment-23770603

Re: [jclouds-chef] JCLOUDS-256: Add missing API to list environment recipes (#12)

Posted by Ignasi Barrera <no...@github.com>.
This looks good (once the `listEnvironmentNodes`) test is fixed.

Also, would it make sense to add `listEnvironmentNodes` a method to the [ChefService](https://github.com/jclouds/jclouds-chef/blob/master/core/src/main/java/org/jclouds/chef/ChefService.java) to get the entire node objects (not only the name) for a given environment? Something similar to what the [ChefService#listNodes](https://github.com/jclouds/jclouds-chef/blob/master/core/src/main/java/org/jclouds/chef/ChefService.java#L150-L154) methods do.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-chef/pull/12#issuecomment-23772619

Re: [jclouds-chef] JCLOUDS-256: Add missing API to list environment recipes (#12)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-chef #328](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-chef/328/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-chef/pull/12#issuecomment-23770576

Re: [jclouds-chef] JCLOUDS-256: Add missing API to list environment recipes (#12)

Posted by Ignasi Barrera <no...@github.com>.
Run live tests against Chef 10, 11, and Enterprise Chef and all succeeded. Great!
Cleaned up the commit messages, squashed the fix commit and merged.

Thanks @noorul !

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-chef/pull/12#issuecomment-23774235