From 06ecdb8d7ac22bff2e1249b9afb6d66ee94a2e49 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Sun, 25 Jul 2010 17:42:39 -0700 Subject: [PATCH] Issue 191: added ohai for java --- chef/pom.xml | 2 +- .../org/jclouds/chef/ChefAsyncClient.java | 2 +- .../java/org/jclouds/chef/ChefClient.java | 4 +- .../chef/config/BaseChefRestClientModule.java | 29 +---- .../jclouds/chef/config/ChefParserModule.java | 5 +- .../chef/config/ChefRestClientModule.java | 4 +- .../chef/functions/ParseKeySetFromJson.java | 4 +- .../handlers/ChefClientErrorRetryHandler.java | 2 +- .../chef/handlers/ChefErrorHandler.java | 2 +- .../jclouds/chef/reference/ChefConstants.java | 4 +- chef/src/main/java/org/jclouds/ohai/JMX.java | 62 +++++++++++ .../java/org/jclouds/ohai/UpdateNode.java | 65 +++++++++++ .../jclouds/ohai/WhiteListCompliantJVM.java | 103 ++++++++++++++++++ .../jclouds/ohai/config/BaseOhaiModule.java | 89 +++++++++++++++ .../org/jclouds/ohai/config/OhaiModule.java | 54 +++++++++ .../config/WhiteListCompliantOhaiModule.java | 28 +++++ .../ohai/functions/ByteArrayToMacAddress.java | 65 +++++++++++ .../org/jclouds/chef/ChefAsyncClientTest.java | 42 +++---- .../chef/ProvidersInPropertiesTest.java | 2 +- .../BindHexEncodedMD5sToJsonPayloadTest.java | 12 +- .../functions/ParseClientFromJsonTest.java | 5 +- .../ParseCookbookVersionFromJsonTest.java | 21 ++-- .../ParseDataBagItemFromJsonTest.java | 4 +- .../chef/functions/ParseKeyFromJsonTest.java | 25 +++-- .../functions/ParseKeySetFromJsonTest.java | 5 +- .../chef/functions/ParseNodeFromJsonTest.java | 11 +- .../ParseOrganizationFromJsonTest.java | 5 +- .../functions/ParseSandboxFromJsonTest.java | 32 ++---- .../ParseUploadSandboxFromJsonTest.java | 34 ++---- .../chef/functions/ParseUserFromJsonTest.java | 13 +-- .../test/java/org/jclouds/ohai/JMXTest.java | 74 +++++++++++++ .../java/org/jclouds/ohai/UpdateNodeTest.java | 76 +++++++++++++ .../ohai/WhiteListCompliantJVMTest.java | 82 ++++++++++++++ .../functions/ByteArrayToMacAddressTest.java | 58 ++++++++++ chef/src/test/resources/log4j.xml | 2 +- 35 files changed, 872 insertions(+), 155 deletions(-) create mode 100644 chef/src/main/java/org/jclouds/ohai/JMX.java create mode 100644 chef/src/main/java/org/jclouds/ohai/UpdateNode.java create mode 100644 chef/src/main/java/org/jclouds/ohai/WhiteListCompliantJVM.java create mode 100644 chef/src/main/java/org/jclouds/ohai/config/BaseOhaiModule.java create mode 100644 chef/src/main/java/org/jclouds/ohai/config/OhaiModule.java create mode 100644 chef/src/main/java/org/jclouds/ohai/config/WhiteListCompliantOhaiModule.java create mode 100644 chef/src/main/java/org/jclouds/ohai/functions/ByteArrayToMacAddress.java create mode 100644 chef/src/test/java/org/jclouds/ohai/JMXTest.java create mode 100644 chef/src/test/java/org/jclouds/ohai/UpdateNodeTest.java create mode 100644 chef/src/test/java/org/jclouds/ohai/WhiteListCompliantJVMTest.java create mode 100644 chef/src/test/java/org/jclouds/ohai/functions/ByteArrayToMacAddressTest.java diff --git a/chef/pom.xml b/chef/pom.xml index 628b0ad566..1d18f86898 100644 --- a/chef/pom.xml +++ b/chef/pom.xml @@ -1,6 +1,6 @@