cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaya...@apache.org
Subject [9/9] git commit: updated refs/heads/master to b616522
Date Thu, 28 May 2015 11:59:26 GMT
 CLOUDSTACK-8324: Corrected the file paths for xenserver command files
This closes #315


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

Branch: refs/heads/master
Commit: b616522088b9589fb50cf3858b806d99aae87213
Parents: 6e96fc6
Author: Jayapal <jayapal@apache.org>
Authored: Thu May 28 17:01:07 2015 +0530
Committer: Jayapal <jayapal@apache.org>
Committed: Thu May 28 17:02:09 2015 +0530

----------------------------------------------------------------------
 .../CitrixGetVmIpAddressCommandWrapper.java     | 81 -------------------
 .../CitrixGetVmIpAddressCommandWrapper.java     | 82 ++++++++++++++++++++
 2 files changed, 82 insertions(+), 81 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b6165220/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/citrix/CitrixGetVmIpAddressCommandWrapper.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/citrix/CitrixGetVmIpAddressCommandWrapper.java
b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/citrix/CitrixGetVmIpAddressCommandWrapper.java
deleted file mode 100644
index bbfec2c..0000000
--- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/citrix/CitrixGetVmIpAddressCommandWrapper.java
+++ /dev/null
@@ -1,81 +0,0 @@
-//
-// 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.
-//
-
-package com.cloud.hypervisor.xenserver.resource.wrapper.citrix;
-import java.util.Map;
-import com.cloud.agent.api.GetVmIpAddressCommand;
-import com.cloud.resource.ResourceWrapper;
-import com.cloud.utils.net.NetUtils;
-import com.xensource.xenapi.Connection;
-import com.xensource.xenapi.VM;
-import com.xensource.xenapi.VMGuestMetrics;
-import com.xensource.xenapi.Types;
-import org.apache.log4j.Logger;
-
-import com.cloud.agent.api.Answer;
-import com.cloud.hypervisor.xenserver.resource.CitrixResourceBase;
-import com.cloud.resource.CommandWrapper;
-import org.apache.xmlrpc.XmlRpcException;
-
-@ResourceWrapper(handles =  GetVmIpAddressCommand.class)
-public final class CitrixGetVmIpAddressCommandWrapper extends CommandWrapper<GetVmIpAddressCommand,
Answer, CitrixResourceBase> {
-
-    private static final Logger s_logger = Logger.getLogger(CitrixGetVmIpAddressCommandWrapper.class);
-
-    @Override
-    public Answer execute(final GetVmIpAddressCommand command, final CitrixResourceBase citrixResourceBase)
{
-        final Connection conn = citrixResourceBase.getConnection();
-
-        String vmName = command.getVmName();
-        String networkCidr = command.getVmNetworkCidr();
-        boolean result = false;
-        String errorMsg = null;
-        String vmIp = null;
-
-        try {
-            VM vm = citrixResourceBase.getVM(conn, vmName);
-            VMGuestMetrics mtr = vm.getGuestMetrics(conn);
-            VMGuestMetrics.Record rec = mtr.getRecord(conn);
-            Map<String, String> vmIpsMap = rec.networks;
-
-            for (String ipAddr: vmIpsMap.values()) {
-                if (NetUtils.isIpWithtInCidrRange(ipAddr, networkCidr)) {
-                    vmIp = ipAddr;
-                    break;
-                }
-            }
-
-            if (vmIp != null) {
-                s_logger.debug("VM " +vmName + " ip address got retrieved "+vmIp);
-                result = true;
-                return new Answer(command, result, vmIp);
-            }
-
-        }catch (Types.XenAPIException e) {
-            s_logger.debug("Got exception in GetVmIpAddressCommand "+ e.getMessage());
-            errorMsg = "Failed to retrived vm ip addr, exception: "+e.getMessage();
-        }catch (XmlRpcException e) {
-            s_logger.debug("Got exception in GetVmIpAddressCommand "+ e.getMessage());
-            errorMsg = "Failed to retrived vm ip addr, exception: "+e.getMessage();
-        }
-
-        return new Answer(command, result, errorMsg);
-
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b6165220/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixGetVmIpAddressCommandWrapper.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixGetVmIpAddressCommandWrapper.java
b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixGetVmIpAddressCommandWrapper.java
new file mode 100644
index 0000000..dd1ee28
--- /dev/null
+++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixGetVmIpAddressCommandWrapper.java
@@ -0,0 +1,82 @@
+//
+// 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.
+//
+
+package com.cloud.hypervisor.xenserver.resource.wrapper.xenbase;
+
+import java.util.Map;
+import com.cloud.agent.api.GetVmIpAddressCommand;
+import com.cloud.resource.ResourceWrapper;
+import com.cloud.utils.net.NetUtils;
+import com.xensource.xenapi.Connection;
+import com.xensource.xenapi.VM;
+import com.xensource.xenapi.VMGuestMetrics;
+import com.xensource.xenapi.Types;
+import org.apache.log4j.Logger;
+
+import com.cloud.agent.api.Answer;
+import com.cloud.hypervisor.xenserver.resource.CitrixResourceBase;
+import com.cloud.resource.CommandWrapper;
+import org.apache.xmlrpc.XmlRpcException;
+
+@ResourceWrapper(handles =  GetVmIpAddressCommand.class)
+public final class CitrixGetVmIpAddressCommandWrapper extends CommandWrapper<GetVmIpAddressCommand,
Answer, CitrixResourceBase> {
+
+    private static final Logger s_logger = Logger.getLogger(CitrixGetVmIpAddressCommandWrapper.class);
+
+    @Override
+    public Answer execute(final GetVmIpAddressCommand command, final CitrixResourceBase citrixResourceBase)
{
+        final Connection conn = citrixResourceBase.getConnection();
+
+        String vmName = command.getVmName();
+        String networkCidr = command.getVmNetworkCidr();
+        boolean result = false;
+        String errorMsg = null;
+        String vmIp = null;
+
+        try {
+            VM vm = citrixResourceBase.getVM(conn, vmName);
+            VMGuestMetrics mtr = vm.getGuestMetrics(conn);
+            VMGuestMetrics.Record rec = mtr.getRecord(conn);
+            Map<String, String> vmIpsMap = rec.networks;
+
+            for (String ipAddr: vmIpsMap.values()) {
+                if (NetUtils.isIpWithtInCidrRange(ipAddr, networkCidr)) {
+                    vmIp = ipAddr;
+                    break;
+                }
+            }
+
+            if (vmIp != null) {
+                s_logger.debug("VM " +vmName + " ip address got retrieved "+vmIp);
+                result = true;
+                return new Answer(command, result, vmIp);
+            }
+
+        }catch (Types.XenAPIException e) {
+            s_logger.debug("Got exception in GetVmIpAddressCommand "+ e.getMessage());
+            errorMsg = "Failed to retrived vm ip addr, exception: "+e.getMessage();
+        }catch (XmlRpcException e) {
+            s_logger.debug("Got exception in GetVmIpAddressCommand "+ e.getMessage());
+            errorMsg = "Failed to retrived vm ip addr, exception: "+e.getMessage();
+        }
+
+        return new Answer(command, result, errorMsg);
+
+    }
+}
\ No newline at end of file


Mime
View raw message