You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by ha...@apache.org on 2015/10/15 18:16:47 UTC

[6/7] incubator-brooklyn git commit: [BROOKLYN-182] Fix dependencies post winrm separation

[BROOKLYN-182] Fix dependencies post winrm separation


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/a3ff3d6b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/a3ff3d6b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/a3ff3d6b

Branch: refs/heads/master
Commit: a3ff3d6bfe3b717893067861679d5f37626b9194
Parents: 0ded95c
Author: Hadrian Zbarcea <ha...@apache.org>
Authored: Wed Oct 14 16:13:22 2015 -0400
Committer: Ciprian Ciubotariu <ch...@gmx.net>
Committed: Wed Oct 14 23:36:41 2015 +0300

----------------------------------------------------------------------
 .../location/byon/ByonLocationResolverTest.java |  2 +-
 locations/jclouds/pom.xml                       |  5 +++++
 software/base/pom.xml                           | 10 ++++++++++
 .../entity/chef/ChefLifecycleEffectorTasks.java |  1 +
 software/winrm/pom.xml                          | 20 ++++++++++++++++++++
 .../windows/WindowsPerformanceCounterFeed.java  |  4 ++--
 6 files changed, 39 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/a3ff3d6b/core/src/test/java/org/apache/brooklyn/location/byon/ByonLocationResolverTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/location/byon/ByonLocationResolverTest.java b/core/src/test/java/org/apache/brooklyn/location/byon/ByonLocationResolverTest.java
index 8a46a64..edc374d 100644
--- a/core/src/test/java/org/apache/brooklyn/location/byon/ByonLocationResolverTest.java
+++ b/core/src/test/java/org/apache/brooklyn/location/byon/ByonLocationResolverTest.java
@@ -294,7 +294,7 @@ public class ByonLocationResolverTest {
         Assert.assertEquals("/tmp/x", l.config().getBag().get(LocationConfigKeys.PRIVATE_KEY_FILE));
     }
 
-    @Test
+    // FIXME: move @Test to the brooklyn-software-winrm module
     public void testResolvesLocalTempDir() throws Exception {
         String localTempDir = Os.mergePaths(Os.tmp(), "testResolvesUsernameAtHost");
         brooklynProperties.put("brooklyn.location.byon.localTempDir", localTempDir);

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/a3ff3d6b/locations/jclouds/pom.xml
----------------------------------------------------------------------
diff --git a/locations/jclouds/pom.xml b/locations/jclouds/pom.xml
index 6582079..ed10132 100644
--- a/locations/jclouds/pom.xml
+++ b/locations/jclouds/pom.xml
@@ -41,6 +41,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.brooklyn</groupId>
+            <artifactId>brooklyn-software-winrm</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.brooklyn</groupId>
             <artifactId>brooklyn-api</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/a3ff3d6b/software/base/pom.xml
----------------------------------------------------------------------
diff --git a/software/base/pom.xml b/software/base/pom.xml
index f79d777..32bb09b 100644
--- a/software/base/pom.xml
+++ b/software/base/pom.xml
@@ -42,6 +42,16 @@
         </dependency>
         <dependency>
             <groupId>org.apache.brooklyn</groupId>
+            <artifactId>brooklyn-software-winrm</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.cloudsoft.windows</groupId>
+            <artifactId>winrm4j</artifactId>
+            <version>${winrm4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.brooklyn</groupId>
             <artifactId>brooklyn-jmxmp-agent</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/a3ff3d6b/software/base/src/main/java/org/apache/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/org/apache/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java b/software/base/src/main/java/org/apache/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java
index e58c4ab..304648c 100644
--- a/software/base/src/main/java/org/apache/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java
+++ b/software/base/src/main/java/org/apache/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java
@@ -29,6 +29,7 @@ import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
 import org.apache.brooklyn.core.location.Machines;
 import org.apache.brooklyn.entity.software.base.SoftwareProcess;
 import org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks;
+import org.apache.brooklyn.location.ssh.SshMachineLocation;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.brooklyn.util.collections.Jsonya;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/a3ff3d6b/software/winrm/pom.xml
----------------------------------------------------------------------
diff --git a/software/winrm/pom.xml b/software/winrm/pom.xml
index 77d2fa6..5bde35e 100644
--- a/software/winrm/pom.xml
+++ b/software/winrm/pom.xml
@@ -1,5 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
     <modelVersion>4.0.0</modelVersion>
 
     <parent>

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/a3ff3d6b/software/winrm/src/main/java/org/apache/brooklyn/feed/windows/WindowsPerformanceCounterFeed.java
----------------------------------------------------------------------
diff --git a/software/winrm/src/main/java/org/apache/brooklyn/feed/windows/WindowsPerformanceCounterFeed.java b/software/winrm/src/main/java/org/apache/brooklyn/feed/windows/WindowsPerformanceCounterFeed.java
index ff659b1..73a76cb 100644
--- a/software/winrm/src/main/java/org/apache/brooklyn/feed/windows/WindowsPerformanceCounterFeed.java
+++ b/software/winrm/src/main/java/org/apache/brooklyn/feed/windows/WindowsPerformanceCounterFeed.java
@@ -51,7 +51,6 @@ import org.apache.brooklyn.location.winrm.WinRmMachineLocation;
 import org.apache.brooklyn.util.core.flags.TypeCoercions;
 import org.apache.brooklyn.util.exceptions.Exceptions;
 import org.apache.brooklyn.util.time.Duration;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -228,8 +227,9 @@ public class WindowsPerformanceCounterFeed extends AbstractFeed {
         }
 
         @Override
+        @SuppressWarnings("unchecked")
         public T call() throws Exception {
-            WinRmMachineLocation machine = EffectorTasks.getWinRmMachine(entity);
+            WinRmMachineLocation machine = EffectorTasks.getMachine(entity, WinRmMachineLocation.class);
             WinRmToolResponse response = machine.executePsScript(command);
             return (T)response;
         }