cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yas...@apache.org
Subject git commit: updated refs/heads/4.2 to 1b82ca2
Date Mon, 01 Jul 2013 22:19:22 GMT
Updated Branches:
  refs/heads/4.2 de767327b -> 1b82ca2a7


Baremetal: Move list APIs to the correct location


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

Branch: refs/heads/4.2
Commit: 1b82ca2a7a78522a677919e1adc1169d5a9cadfa
Parents: de76732
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Mon Jul 1 15:18:38 2013 -0700
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Mon Jul 1 15:19:13 2013 -0700

----------------------------------------------------------------------
 client/tomcatconf/commands.properties.in        |   2 +
 .../BareMetalPingServiceImpl.java               |   1 +
 .../networkservice/BaremetalDhcpManager.java    |   1 +
 .../BaremetalDhcpManagerImpl.java               |   1 +
 .../BaremetalKickStartServiceImpl.java          |   1 +
 .../networkservice/BaremetalPxeManager.java     |   1 +
 .../networkservice/BaremetalPxeManagerImpl.java |   1 +
 .../networkservice/BaremetalPxeService.java     |   1 +
 .../networkservice/ListBaremetalDhcpCmd.java    | 104 ------------------
 .../ListBaremetalPxePingServersCmd.java         |  94 ----------------
 .../cloudstack/api/ListBaremetalDhcpCmd.java    | 106 +++++++++++++++++++
 .../api/ListBaremetalPxePingServersCmd.java     |  97 +++++++++++++++++
 12 files changed, 212 insertions(+), 198 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b82ca2a/client/tomcatconf/commands.properties.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in
index 6a38795..f4b41a7 100644
--- a/client/tomcatconf/commands.properties.in
+++ b/client/tomcatconf/commands.properties.in
@@ -605,6 +605,8 @@ addBaremetalHost=1
 addBaremetalPxeKickStartServer=1
 addBaremetalPxePingServer=1
 addBaremetalDhcp=1
+listBaremetalDhcp=1
+listBaremetalPxePingServer=1
 
 #### UCS commands
 addUcsManager=1

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b82ca2a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java
b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java
index 74cd6a9..77958ae 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java
@@ -33,6 +33,7 @@ import javax.inject.Inject;
 
 import org.apache.cloudstack.api.AddBaremetalPxeCmd;
 import org.apache.cloudstack.api.AddBaremetalPxePingServerCmd;
+import org.apache.cloudstack.api.ListBaremetalPxePingServersCmd;
 import org.apache.log4j.Logger;
 
 import com.cloud.agent.api.Answer;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b82ca2a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManager.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManager.java
b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManager.java
index 0a62387..9c00731 100644
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManager.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManager.java
@@ -25,6 +25,7 @@ package com.cloud.baremetal.networkservice;
 import java.util.List;
 
 import org.apache.cloudstack.api.AddBaremetalDhcpCmd;
+import org.apache.cloudstack.api.ListBaremetalDhcpCmd;
 
 import com.cloud.baremetal.database.BaremetalDhcpVO;
 import com.cloud.deploy.DeployDestination;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b82ca2a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java
b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java
index 7007692..17e4481 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java
@@ -33,6 +33,7 @@ import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
 import org.apache.cloudstack.api.AddBaremetalDhcpCmd;
+import org.apache.cloudstack.api.ListBaremetalDhcpCmd;
 import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b82ca2a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
index 2714f48..5858e7e 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
@@ -29,6 +29,7 @@ import javax.inject.Inject;
 
 import org.apache.cloudstack.api.AddBaremetalKickStartPxeCmd;
 import org.apache.cloudstack.api.AddBaremetalPxeCmd;
+import org.apache.cloudstack.api.ListBaremetalPxePingServersCmd;
 import org.apache.log4j.Logger;
 
 import com.cloud.agent.api.Answer;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b82ca2a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManager.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManager.java
b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManager.java
index 4fe5c0d..7984ddd 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManager.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManager.java
@@ -25,6 +25,7 @@ package com.cloud.baremetal.networkservice;
 import java.util.List;
 
 import org.apache.cloudstack.api.AddBaremetalPxeCmd;
+import org.apache.cloudstack.api.ListBaremetalPxePingServersCmd;
 
 import com.cloud.baremetal.database.BaremetalPxeVO;
 import com.cloud.deploy.DeployDestination;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b82ca2a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java
b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java
index 3190ef5..555adf7 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java
@@ -34,6 +34,7 @@ import javax.naming.ConfigurationException;
 import org.apache.cloudstack.api.AddBaremetalKickStartPxeCmd;
 import org.apache.cloudstack.api.AddBaremetalPxeCmd;
 import org.apache.cloudstack.api.AddBaremetalPxePingServerCmd;
+import org.apache.cloudstack.api.ListBaremetalPxePingServersCmd;
 import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b82ca2a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeService.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeService.java
b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeService.java
index efdd221..af6a6c8 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeService.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeService.java
@@ -25,6 +25,7 @@ package com.cloud.baremetal.networkservice;
 import java.util.List;
 
 import org.apache.cloudstack.api.AddBaremetalPxeCmd;
+import org.apache.cloudstack.api.ListBaremetalPxePingServersCmd;
 
 import com.cloud.baremetal.database.BaremetalPxeVO;
 import com.cloud.deploy.DeployDestination;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b82ca2a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/ListBaremetalDhcpCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/ListBaremetalDhcpCmd.java
b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/ListBaremetalDhcpCmd.java
deleted file mode 100755
index 1dc46a8..0000000
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/ListBaremetalDhcpCmd.java
+++ /dev/null
@@ -1,104 +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.
-// 
-// Automatically generated by addcopyright.py at 01/29/2013
-package com.cloud.baremetal.networkservice;
-
-import java.util.List;
-
-import javax.inject.Inject;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.ApiErrorCode;
-import org.apache.cloudstack.api.BaseCmd;
-import org.apache.cloudstack.api.BaseCmd.CommandType;
-import org.apache.cloudstack.api.BaseListCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.ListResponse;
-import org.apache.log4j.Logger;
-
-import com.cloud.exception.ConcurrentOperationException;
-import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.NetworkRuleConflictException;
-import com.cloud.exception.ResourceAllocationException;
-import com.cloud.exception.ResourceUnavailableException;
-@APICommand(name="listBaremetalDhcp", description="list baremetal dhcp servers", responseObject
= BaremetalDhcpResponse.class)
-public class ListBaremetalDhcpCmd extends BaseListCmd {
-    private static final Logger s_logger = Logger.getLogger(ListBaremetalDhcpCmd.class);
-    private static final String s_name = "listexternaldhcpresponse";
-    @Inject BaremetalDhcpManager _dhcpMgr;
-    
-    // ///////////////////////////////////////////////////
-    // ////////////// API parameters /////////////////////
-    // ///////////////////////////////////////////////////
-    @Parameter(name = ApiConstants.ID, type = CommandType.LONG, description = "DHCP server
device ID")
-    private Long id;
-    
-    @Parameter(name = ApiConstants.POD_ID, type = CommandType.LONG, description = "Pod ID
where pxe server is in")
-    private Long podId;
-    
-    @Parameter(name = ApiConstants.DHCP_SERVER_TYPE, type = CommandType.STRING, description
= "Type of DHCP device")
-    private String deviceType;
-    
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public Long getPodId() {
-        return podId;
-    }
-
-    public void setPodId(Long podId) {
-        this.podId = podId;
-    }
-    
-    public String getDeviceType() {
-        return deviceType;
-    }
-
-    public void setDeviceType(String deviceType) {
-        this.deviceType = deviceType;
-    }
-
-    @Override
-    public void execute() throws ResourceUnavailableException, InsufficientCapacityException,
ServerApiException, ConcurrentOperationException,
-            ResourceAllocationException, NetworkRuleConflictException {
-    	try {
-            ListResponse<BaremetalDhcpResponse> response = new ListResponse<BaremetalDhcpResponse>();
-            List<BaremetalDhcpResponse> dhcpResponses = _dhcpMgr.listBaremetalDhcps(this);
-            response.setResponses(dhcpResponses);
-            response.setResponseName(getCommandName());
-            this.setResponseObject(response);
-    	} catch (Exception e) {
-    		s_logger.debug("Exception happend while executing ListBaremetalDhcpCmd");
-            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
-    	}
-
-    }
-
-    @Override
-    public String getCommandName() {
-        return s_name;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b82ca2a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/ListBaremetalPxePingServersCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/ListBaremetalPxePingServersCmd.java
b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/ListBaremetalPxePingServersCmd.java
deleted file mode 100755
index 0b418f0..0000000
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/ListBaremetalPxePingServersCmd.java
+++ /dev/null
@@ -1,94 +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.
-// 
-// Automatically generated by addcopyright.py at 01/29/2013
-package com.cloud.baremetal.networkservice;
-
-import java.util.List;
-
-import javax.inject.Inject;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.ApiErrorCode;
-import org.apache.cloudstack.api.BaseCmd;
-import org.apache.cloudstack.api.BaseCmd.CommandType;
-import org.apache.cloudstack.api.BaseListCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.ListResponse;
-import org.apache.log4j.Logger;
-
-import com.cloud.exception.ConcurrentOperationException;
-import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.NetworkRuleConflictException;
-import com.cloud.exception.ResourceAllocationException;
-import com.cloud.exception.ResourceUnavailableException;
-@APICommand(name="listBaremetalPxePingServer", description="list baremetal ping pxe server",
responseObject = BaremetalPxePingResponse.class)
-public class ListBaremetalPxePingServersCmd extends BaseListCmd {
-    private static final Logger s_logger = Logger.getLogger(ListBaremetalPxePingServersCmd.class);
-    private static final String s_name = "listpingpxeserverresponse";
-
-    @Inject
-    BaremetalPxeManager _pxeMgr;
-    // ///////////////////////////////////////////////////
-    // ////////////// API parameters /////////////////////
-    // ///////////////////////////////////////////////////
-
-    @Parameter(name = ApiConstants.ID, type = CommandType.LONG, description = "Ping pxe server
device ID")
-    private Long id;
-    
-    @Parameter(name = ApiConstants.POD_ID, type = CommandType.LONG, description = "Pod ID
where pxe server is in")
-    private Long podId;
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public Long getPodId() {
-        return podId;
-    }
-
-    public void setPodId(Long podId) {
-        this.podId = podId;
-    }
-
-    @Override
-    public void execute() throws ResourceUnavailableException, InsufficientCapacityException,
ServerApiException, ConcurrentOperationException,
-            ResourceAllocationException, NetworkRuleConflictException {
-        try {
-            ListResponse<BaremetalPxeResponse> response = new ListResponse<BaremetalPxeResponse>();
-            List<BaremetalPxeResponse> pxeResponses = _pxeMgr.listPxeServers(this);
-            response.setResponses(pxeResponses);
-            response.setResponseName(getCommandName());
-            this.setResponseObject(response);
-        } catch (Exception e) {
-            s_logger.debug("Exception happend while executing ListPingPxeServersCmd" ,e);
-            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
-        }
-    }
-
-    @Override
-    public String getCommandName() {
-        return s_name;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b82ca2a/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/ListBaremetalDhcpCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/ListBaremetalDhcpCmd.java
b/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/ListBaremetalDhcpCmd.java
new file mode 100755
index 0000000..a147ca2
--- /dev/null
+++ b/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/ListBaremetalDhcpCmd.java
@@ -0,0 +1,106 @@
+// 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.
+// 
+// Automatically generated by addcopyright.py at 01/29/2013
+package org.apache.cloudstack.api;
+
+import java.util.List;
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.BaseCmd.CommandType;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.log4j.Logger;
+
+import com.cloud.baremetal.networkservice.BaremetalDhcpManager;
+import com.cloud.baremetal.networkservice.BaremetalDhcpResponse;
+import com.cloud.exception.ConcurrentOperationException;
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.NetworkRuleConflictException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.exception.ResourceUnavailableException;
+@APICommand(name="listBaremetalDhcp", description="list baremetal dhcp servers", responseObject
= BaremetalDhcpResponse.class)
+public class ListBaremetalDhcpCmd extends BaseListCmd {
+    private static final Logger s_logger = Logger.getLogger(ListBaremetalDhcpCmd.class);
+    private static final String s_name = "listexternaldhcpresponse";
+    @Inject BaremetalDhcpManager _dhcpMgr;
+    
+    // ///////////////////////////////////////////////////
+    // ////////////// API parameters /////////////////////
+    // ///////////////////////////////////////////////////
+    @Parameter(name = ApiConstants.ID, type = CommandType.LONG, description = "DHCP server
device ID")
+    private Long id;
+    
+    @Parameter(name = ApiConstants.POD_ID, type = CommandType.LONG, description = "Pod ID
where pxe server is in")
+    private Long podId;
+    
+    @Parameter(name = ApiConstants.DHCP_SERVER_TYPE, type = CommandType.STRING, description
= "Type of DHCP device")
+    private String deviceType;
+    
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getPodId() {
+        return podId;
+    }
+
+    public void setPodId(Long podId) {
+        this.podId = podId;
+    }
+    
+    public String getDeviceType() {
+        return deviceType;
+    }
+
+    public void setDeviceType(String deviceType) {
+        this.deviceType = deviceType;
+    }
+
+    @Override
+    public void execute() throws ResourceUnavailableException, InsufficientCapacityException,
ServerApiException, ConcurrentOperationException,
+            ResourceAllocationException, NetworkRuleConflictException {
+    	try {
+            ListResponse<BaremetalDhcpResponse> response = new ListResponse<BaremetalDhcpResponse>();
+            List<BaremetalDhcpResponse> dhcpResponses = _dhcpMgr.listBaremetalDhcps(this);
+            response.setResponses(dhcpResponses);
+            response.setResponseName(getCommandName());
+            this.setResponseObject(response);
+    	} catch (Exception e) {
+    		s_logger.debug("Exception happend while executing ListBaremetalDhcpCmd");
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
+    	}
+
+    }
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b82ca2a/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/ListBaremetalPxePingServersCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/ListBaremetalPxePingServersCmd.java
b/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/ListBaremetalPxePingServersCmd.java
new file mode 100755
index 0000000..926ad1d
--- /dev/null
+++ b/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/ListBaremetalPxePingServersCmd.java
@@ -0,0 +1,97 @@
+// 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.
+// 
+// Automatically generated by addcopyright.py at 01/29/2013
+package org.apache.cloudstack.api;
+
+import java.util.List;
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.BaseCmd.CommandType;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.log4j.Logger;
+
+import com.cloud.baremetal.networkservice.BaremetalPxeManager;
+import com.cloud.baremetal.networkservice.BaremetalPxePingResponse;
+import com.cloud.baremetal.networkservice.BaremetalPxeResponse;
+import com.cloud.exception.ConcurrentOperationException;
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.NetworkRuleConflictException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.exception.ResourceUnavailableException;
+@APICommand(name="listBaremetalPxePingServer", description="list baremetal ping pxe server",
responseObject = BaremetalPxePingResponse.class)
+public class ListBaremetalPxePingServersCmd extends BaseListCmd {
+    private static final Logger s_logger = Logger.getLogger(ListBaremetalPxePingServersCmd.class);
+    private static final String s_name = "listpingpxeserverresponse";
+
+    @Inject
+    BaremetalPxeManager _pxeMgr;
+    // ///////////////////////////////////////////////////
+    // ////////////// API parameters /////////////////////
+    // ///////////////////////////////////////////////////
+
+    @Parameter(name = ApiConstants.ID, type = CommandType.LONG, description = "Ping pxe server
device ID")
+    private Long id;
+    
+    @Parameter(name = ApiConstants.POD_ID, type = CommandType.LONG, description = "Pod ID
where pxe server is in")
+    private Long podId;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getPodId() {
+        return podId;
+    }
+
+    public void setPodId(Long podId) {
+        this.podId = podId;
+    }
+
+    @Override
+    public void execute() throws ResourceUnavailableException, InsufficientCapacityException,
ServerApiException, ConcurrentOperationException,
+            ResourceAllocationException, NetworkRuleConflictException {
+        try {
+            ListResponse<BaremetalPxeResponse> response = new ListResponse<BaremetalPxeResponse>();
+            List<BaremetalPxeResponse> pxeResponses = _pxeMgr.listPxeServers(this);
+            response.setResponses(pxeResponses);
+            response.setResponseName(getCommandName());
+            this.setResponseObject(response);
+        } catch (Exception e) {
+            s_logger.debug("Exception happend while executing ListPingPxeServersCmd" ,e);
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
+        }
+    }
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+}


Mime
View raw message