You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ya...@apache.org on 2013/06/21 03:48:01 UTC
[2/3] git commit: updated refs/heads/baremetal-4.2 to f5e67e7
Baremetal: Fix API's packages and categories
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b047a9b6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b047a9b6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b047a9b6
Branch: refs/heads/baremetal-4.2
Commit: b047a9b68fb5609e9279fe69e38e54ddb9fed274
Parents: 83c9565
Author: Sheng Yang <sh...@citrix.com>
Authored: Wed Jun 19 15:00:42 2013 -0700
Committer: Sheng Yang <sh...@citrix.com>
Committed: Thu Jun 20 17:42:13 2013 -0700
----------------------------------------------------------------------
client/tomcatconf/commands.properties.in | 3 +
.../baremetal/manager/AddBaremetalHostCmd.java | 48 ------
.../baremetal/manager/BaremetalManagerImpl.java | 1 +
.../networkservice/AddBaremetalDhcpCmd.java | 153 ------------------
.../AddBaremetalKickStartPxeCmd.java | 37 -----
.../networkservice/AddBaremetalPxeCmd.java | 147 ------------------
.../AddBaremetalPxePingServerCmd.java | 82 ----------
.../BareMetalPingServiceImpl.java | 2 +
.../networkservice/BaremetalDhcpManager.java | 2 +
.../BaremetalDhcpManagerImpl.java | 1 +
.../BaremetalKickStartServiceImpl.java | 2 +
.../networkservice/BaremetalPxeManager.java | 2 +
.../networkservice/BaremetalPxeManagerImpl.java | 3 +
.../networkservice/BaremetalPxeService.java | 2 +
.../cloudstack/api/AddBaremetalDhcpCmd.java | 155 +++++++++++++++++++
.../cloudstack/api/AddBaremetalHostCmd.java | 50 ++++++
.../api/AddBaremetalKickStartPxeCmd.java | 39 +++++
.../cloudstack/api/AddBaremetalPxeCmd.java | 148 ++++++++++++++++++
.../api/AddBaremetalPxePingServerCmd.java | 84 ++++++++++
tools/apidoc/gen_toc.py | 3 +-
20 files changed, 496 insertions(+), 468 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/client/tomcatconf/commands.properties.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in
index 5eccf36..172dc22 100644
--- a/client/tomcatconf/commands.properties.in
+++ b/client/tomcatconf/commands.properties.in
@@ -595,6 +595,9 @@ revertToVMSnapshot=15
#### Baremetal commands
addBaremetalHost=1
+addBaremetalPxeKickStartServer=1
+addBaremetalPxePingServer=1
+addBaremetalDhcp=1
#### New Load Balancer commands
createLoadBalancer=15
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/AddBaremetalHostCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/AddBaremetalHostCmd.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/AddBaremetalHostCmd.java
deleted file mode 100755
index 8d45902..0000000
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/AddBaremetalHostCmd.java
+++ /dev/null
@@ -1,48 +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.manager;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.command.admin.host.AddHostCmd;
-import org.apache.cloudstack.api.response.HostResponse;
-@APICommand(name="addBaremetalHost", description="add a baremetal host", responseObject = HostResponse.class)
-public class AddBaremetalHostCmd extends AddHostCmd {
-
- @Parameter(name=ApiConstants.IP_ADDRESS, type=CommandType.STRING, description="ip address intentionally allocated to this host after provisioning")
- private String vmIpAddress;
-
- public AddBaremetalHostCmd() {
- }
-
- @Override
- public void execute(){
- this.getFullUrlParams().put(ApiConstants.BAREMETAL_DISCOVER_NAME, BareMetalDiscoverer.class.getName());
- super.execute();
- }
-
- public String getVmIpAddress() {
- return vmIpAddress;
- }
-
- public void setVmIpAddress(String vmIpAddress) {
- this.vmIpAddress = vmIpAddress;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalManagerImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalManagerImpl.java
index b41d6ca..f4c290c 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalManagerImpl.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalManagerImpl.java
@@ -26,6 +26,7 @@ import javax.ejb.Local;
import javax.inject.Inject;
import javax.naming.ConfigurationException;
+import org.apache.cloudstack.api.AddBaremetalHostCmd;
import org.apache.log4j.Logger;
import com.cloud.agent.api.StopAnswer;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalDhcpCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalDhcpCmd.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalDhcpCmd.java
deleted file mode 100755
index c749832..0000000
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalDhcpCmd.java
+++ /dev/null
@@ -1,153 +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 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.BaseAsyncCmd;
-import org.apache.cloudstack.api.BaseCmd;
-import org.apache.cloudstack.api.BaseCmd.CommandType;
-import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
-import org.apache.cloudstack.api.response.PodResponse;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.log4j.Logger;
-
-import com.cloud.baremetal.database.BaremetalDhcpVO;
-import com.cloud.event.EventTypes;
-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;
-import com.cloud.user.UserContext;
-@APICommand(name="addBaremetalDhcp", description="adds a baremetal dhcp server", responseObject = BaremetalDhcpResponse.class)
-public class AddBaremetalDhcpCmd extends BaseAsyncCmd {
- private static final String s_name = "addexternaldhcpresponse";
- public static final Logger s_logger = Logger.getLogger(AddBaremetalDhcpCmd.class);
-
- @Inject BaremetalDhcpManager mgr;
-
- /////////////////////////////////////////////////////
- //////////////// API parameters /////////////////////
- /////////////////////////////////////////////////////
- @Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.UUID, entityType=PhysicalNetworkResponse.class, required=true, description="the Physical Network ID")
- private Long physicalNetworkId;
-
- @Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType=PodResponse.class, required = true, description="Pod Id")
- private Long podId;
-
- @Parameter(name=ApiConstants.DHCP_SERVER_TYPE, type=CommandType.STRING, required = true, description="Type of dhcp device")
- private String dhcpType;
-
- @Parameter(name=ApiConstants.URL, type=CommandType.STRING, required = true, description="URL of the external dhcp appliance.")
- private String url;
-
- @Parameter(name=ApiConstants.USERNAME, type=CommandType.STRING, required = true, description="Credentials to reach external dhcp device")
- private String username;
-
- @Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, required = true, description="Credentials to reach external dhcp device")
- private String password;
-
- @Override
- public String getEventType() {
- return EventTypes.EVENT_BAREMETAL_DHCP_SERVER_ADD;
- }
-
- @Override
- public String getEventDescription() {
- return "Adding an external DHCP server";
- }
-
- @Override
- public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
- ResourceAllocationException, NetworkRuleConflictException {
- try {
- BaremetalDhcpVO vo = mgr.addDchpServer(this);
- BaremetalDhcpResponse response = mgr.generateApiResponse(vo);
- response.setObjectName(s_name);
- response.setResponseName(getCommandName());
- this.setResponseObject(response);
- } catch (Exception e) {
- s_logger.warn("Unable to add external dhcp server with url: " + getUrl(), e);
- throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
- }
- }
-
- @Override
- public String getCommandName() {
- return s_name;
- }
-
- @Override
- public long getEntityOwnerId() {
- return UserContext.current().getCaller().getId();
- }
-
- public Long getPodId() {
- return podId;
- }
-
- public void setPodId(Long podId) {
- this.podId = podId;
- }
-
- public String getDhcpType() {
- return dhcpType;
- }
-
- public void setDhcpType(String dhcpType) {
- this.dhcpType = dhcpType;
- }
-
- public String getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- public String getUsername() {
- return username;
- }
-
- public void setUsername(String username) {
- this.username = username;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-
- public Long getPhysicalNetworkId() {
- return physicalNetworkId;
- }
-
- public void setPhysicalNetworkId(Long physicalNetworkId) {
- this.physicalNetworkId = physicalNetworkId;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalKickStartPxeCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalKickStartPxeCmd.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalKickStartPxeCmd.java
deleted file mode 100755
index 8bcc7c1..0000000
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalKickStartPxeCmd.java
+++ /dev/null
@@ -1,37 +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 org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseCmd.CommandType;
-import org.apache.cloudstack.api.Parameter;
-@APICommand(name="addBaremetalPxeKickStartServer", description="add a baremetal pxe server", responseObject = BaremetalPxeKickStartResponse.class)
-public class AddBaremetalKickStartPxeCmd extends AddBaremetalPxeCmd {
- @Parameter(name=ApiConstants.TFTP_DIR, type=CommandType.STRING, required = true, description="Tftp root directory of PXE server")
- private String tftpDir;
-
- public String getTftpDir() {
- return tftpDir;
- }
-
- public void setTftpDir(String tftpDir) {
- this.tftpDir = tftpDir;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalPxeCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalPxeCmd.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalPxeCmd.java
deleted file mode 100755
index 63e1147..0000000
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalPxeCmd.java
+++ /dev/null
@@ -1,147 +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 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.BaseAsyncCmd;
-import org.apache.cloudstack.api.BaseCmd;
-import org.apache.cloudstack.api.BaseCmd.CommandType;
-import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
-import org.apache.cloudstack.api.response.PodResponse;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.log4j.Logger;
-
-import com.cloud.baremetal.database.BaremetalPxeVO;
-import com.cloud.event.EventTypes;
-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;
-import com.cloud.user.UserContext;
-public class AddBaremetalPxeCmd extends BaseAsyncCmd {
- private static final String s_name = "addexternalpxeresponse";
- public static final Logger s_logger = Logger.getLogger(AddBaremetalPxeCmd.class);
-
- @Inject BaremetalPxeManager pxeMgr;
- /////////////////////////////////////////////////////
- //////////////// API parameters /////////////////////
- /////////////////////////////////////////////////////
- @Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.UUID, entityType=PhysicalNetworkResponse.class, required=true, description="the Physical Network ID")
- private Long physicalNetworkId;
-
- @Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType=PodResponse.class, description="Pod Id")
- private Long podId;
-
- @Parameter(name=ApiConstants.URL, type=CommandType.STRING, required = true, description="URL of the external pxe device")
- private String url;
-
- @Parameter(name=ApiConstants.PXE_SERVER_TYPE, type=CommandType.STRING, required = true, description="type of pxe device")
- private String deviceType;
-
- @Parameter(name=ApiConstants.USERNAME, type=CommandType.STRING, required = true, description="Credentials to reach external pxe device")
- private String username;
-
- @Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, required = true, description="Credentials to reach external pxe device")
- private String password;
-
- @Override
- public String getEventType() {
- return EventTypes.EVENT_BAREMETAL_PXE_SERVER_ADD;
- }
-
- @Override
- public String getEventDescription() {
- return "Adding an external pxe server";
- }
-
- @Override
- public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
- ResourceAllocationException, NetworkRuleConflictException {
- try {
- BaremetalPxeVO vo = pxeMgr.addPxeServer(this);
- } catch (Exception e) {
- s_logger.warn("Unable to add external pxe server with url: " + getUrl(), e);
- throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
- }
- }
-
- @Override
- public String getCommandName() {
- return s_name;
- }
-
- @Override
- public long getEntityOwnerId() {
- return UserContext.current().getCaller().getId();
- }
-
- public Long getPhysicalNetworkId() {
- return physicalNetworkId;
- }
-
- public void setPhysicalNetworkId(Long physicalNetworkId) {
- this.physicalNetworkId = physicalNetworkId;
- }
-
- public Long getPodId() {
- return podId;
- }
-
- public void setPodId(Long podId) {
- this.podId = podId;
- }
-
- public String getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- public String getUsername() {
- return username;
- }
-
- public void setUsername(String username) {
- this.username = username;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-
- public String getDeviceType() {
- return deviceType;
- }
-
- public void setDeviceType(String deviceType) {
- this.deviceType = deviceType;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalPxePingServerCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalPxePingServerCmd.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalPxePingServerCmd.java
deleted file mode 100755
index 01cafd4..0000000
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalPxePingServerCmd.java
+++ /dev/null
@@ -1,82 +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 org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.Parameter;
-
-@APICommand(name="addBaremetalPxePingServer", description="add a baremetal ping pxe server", responseObject = BaremetalPxePingResponse.class)
-public class AddBaremetalPxePingServerCmd extends AddBaremetalPxeCmd {
-
- @Parameter(name=ApiConstants.PING_STORAGE_SERVER_IP, type=CommandType.STRING, required = true, description="PING storage server ip")
- private String pingStorageServerIp;
-
- @Parameter(name=ApiConstants.PING_DIR, type=CommandType.STRING, required = true, description="Root directory on PING storage server")
- private String pingDir;
-
- @Parameter(name=ApiConstants.TFTP_DIR, type=CommandType.STRING, required = true, description="Tftp root directory of PXE server")
- private String tftpDir;
-
- @Parameter(name=ApiConstants.PING_CIFS_USERNAME, type=CommandType.STRING, description="Username of PING storage server")
- private String pingStorageServerUserName;
-
- @Parameter(name=ApiConstants.PING_CIFS_PASSWORD, type=CommandType.STRING, description="Password of PING storage server")
- private String pingStorageServerPassword;
-
- public String getPingStorageServerIp() {
- return pingStorageServerIp;
- }
-
- public void setPingStorageServerIp(String pingStorageServerIp) {
- this.pingStorageServerIp = pingStorageServerIp;
- }
-
- public String getPingDir() {
- return pingDir;
- }
-
- public void setPingDir(String pingDir) {
- this.pingDir = pingDir;
- }
-
- public String getTftpDir() {
- return tftpDir;
- }
-
- public void setTftpDir(String tftpDir) {
- this.tftpDir = tftpDir;
- }
-
- public String getPingStorageServerUserName() {
- return pingStorageServerUserName;
- }
-
- public void setPingStorageServerUserName(String pingStorageServerUserName) {
- this.pingStorageServerUserName = pingStorageServerUserName;
- }
-
- public String getPingStorageServerPassword() {
- return pingStorageServerPassword;
- }
-
- public void setPingStorageServerPassword(String pingStorageServerPassword) {
- this.pingStorageServerPassword = pingStorageServerPassword;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/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 d6b96a8..74cd6a9 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java
@@ -31,6 +31,8 @@ import java.util.Map;
import javax.ejb.Local;
import javax.inject.Inject;
+import org.apache.cloudstack.api.AddBaremetalPxeCmd;
+import org.apache.cloudstack.api.AddBaremetalPxePingServerCmd;
import org.apache.log4j.Logger;
import com.cloud.agent.api.Answer;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/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 a9c63bf..0a62387 100644
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManager.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManager.java
@@ -24,6 +24,8 @@ package com.cloud.baremetal.networkservice;
import java.util.List;
+import org.apache.cloudstack.api.AddBaremetalDhcpCmd;
+
import com.cloud.baremetal.database.BaremetalDhcpVO;
import com.cloud.deploy.DeployDestination;
import com.cloud.exception.ResourceUnavailableException;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/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 f87bf71..7b53fc6 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java
@@ -32,6 +32,7 @@ import javax.ejb.Local;
import javax.inject.Inject;
import javax.naming.ConfigurationException;
+import org.apache.cloudstack.api.AddBaremetalDhcpCmd;
import org.apache.log4j.Logger;
import com.cloud.agent.AgentManager;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/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 49582b0..2714f48 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
@@ -27,6 +27,8 @@ import java.util.Map;
import javax.ejb.Local;
import javax.inject.Inject;
+import org.apache.cloudstack.api.AddBaremetalKickStartPxeCmd;
+import org.apache.cloudstack.api.AddBaremetalPxeCmd;
import org.apache.log4j.Logger;
import com.cloud.agent.api.Answer;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/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 2dd26bc..4fe5c0d 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManager.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManager.java
@@ -24,6 +24,8 @@ package com.cloud.baremetal.networkservice;
import java.util.List;
+import org.apache.cloudstack.api.AddBaremetalPxeCmd;
+
import com.cloud.baremetal.database.BaremetalPxeVO;
import com.cloud.deploy.DeployDestination;
import com.cloud.host.HostVO;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/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 59a2811..b781a65 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java
@@ -31,6 +31,9 @@ import javax.ejb.Local;
import javax.inject.Inject;
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.log4j.Logger;
import com.cloud.agent.AgentManager;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/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 9fd560f..efdd221 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeService.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeService.java
@@ -24,6 +24,8 @@ package com.cloud.baremetal.networkservice;
import java.util.List;
+import org.apache.cloudstack.api.AddBaremetalPxeCmd;
+
import com.cloud.baremetal.database.BaremetalPxeVO;
import com.cloud.deploy.DeployDestination;
import com.cloud.host.Host;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalDhcpCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalDhcpCmd.java b/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalDhcpCmd.java
new file mode 100755
index 0000000..7c56a8a
--- /dev/null
+++ b/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalDhcpCmd.java
@@ -0,0 +1,155 @@
+// 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 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.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.BaseCmd.CommandType;
+import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
+import org.apache.cloudstack.api.response.PodResponse;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.log4j.Logger;
+
+import com.cloud.baremetal.database.BaremetalDhcpVO;
+import com.cloud.baremetal.networkservice.BaremetalDhcpManager;
+import com.cloud.baremetal.networkservice.BaremetalDhcpResponse;
+import com.cloud.event.EventTypes;
+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;
+import com.cloud.user.UserContext;
+@APICommand(name="addBaremetalDhcp", description="adds a baremetal dhcp server", responseObject = BaremetalDhcpResponse.class)
+public class AddBaremetalDhcpCmd extends BaseAsyncCmd {
+ private static final String s_name = "addexternaldhcpresponse";
+ public static final Logger s_logger = Logger.getLogger(AddBaremetalDhcpCmd.class);
+
+ @Inject BaremetalDhcpManager mgr;
+
+ /////////////////////////////////////////////////////
+ //////////////// API parameters /////////////////////
+ /////////////////////////////////////////////////////
+ @Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.UUID, entityType=PhysicalNetworkResponse.class, required=true, description="the Physical Network ID")
+ private Long physicalNetworkId;
+
+ @Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType=PodResponse.class, required = true, description="Pod Id")
+ private Long podId;
+
+ @Parameter(name=ApiConstants.DHCP_SERVER_TYPE, type=CommandType.STRING, required = true, description="Type of dhcp device")
+ private String dhcpType;
+
+ @Parameter(name=ApiConstants.URL, type=CommandType.STRING, required = true, description="URL of the external dhcp appliance.")
+ private String url;
+
+ @Parameter(name=ApiConstants.USERNAME, type=CommandType.STRING, required = true, description="Credentials to reach external dhcp device")
+ private String username;
+
+ @Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, required = true, description="Credentials to reach external dhcp device")
+ private String password;
+
+ @Override
+ public String getEventType() {
+ return EventTypes.EVENT_BAREMETAL_DHCP_SERVER_ADD;
+ }
+
+ @Override
+ public String getEventDescription() {
+ return "Adding an external DHCP server";
+ }
+
+ @Override
+ public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
+ ResourceAllocationException, NetworkRuleConflictException {
+ try {
+ BaremetalDhcpVO vo = mgr.addDchpServer(this);
+ BaremetalDhcpResponse response = mgr.generateApiResponse(vo);
+ response.setObjectName(s_name);
+ response.setResponseName(getCommandName());
+ this.setResponseObject(response);
+ } catch (Exception e) {
+ s_logger.warn("Unable to add external dhcp server with url: " + getUrl(), e);
+ throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
+ }
+ }
+
+ @Override
+ public String getCommandName() {
+ return s_name;
+ }
+
+ @Override
+ public long getEntityOwnerId() {
+ return UserContext.current().getCaller().getId();
+ }
+
+ public Long getPodId() {
+ return podId;
+ }
+
+ public void setPodId(Long podId) {
+ this.podId = podId;
+ }
+
+ public String getDhcpType() {
+ return dhcpType;
+ }
+
+ public void setDhcpType(String dhcpType) {
+ this.dhcpType = dhcpType;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public Long getPhysicalNetworkId() {
+ return physicalNetworkId;
+ }
+
+ public void setPhysicalNetworkId(Long physicalNetworkId) {
+ this.physicalNetworkId = physicalNetworkId;
+ }
+}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalHostCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalHostCmd.java b/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalHostCmd.java
new file mode 100755
index 0000000..6bc1819
--- /dev/null
+++ b/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalHostCmd.java
@@ -0,0 +1,50 @@
+// 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 org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.command.admin.host.AddHostCmd;
+import org.apache.cloudstack.api.response.HostResponse;
+
+import com.cloud.baremetal.manager.BareMetalDiscoverer;
+@APICommand(name="addBaremetalHost", description="add a baremetal host", responseObject = HostResponse.class)
+public class AddBaremetalHostCmd extends AddHostCmd {
+
+ @Parameter(name=ApiConstants.IP_ADDRESS, type=CommandType.STRING, description="ip address intentionally allocated to this host after provisioning")
+ private String vmIpAddress;
+
+ public AddBaremetalHostCmd() {
+ }
+
+ @Override
+ public void execute(){
+ this.getFullUrlParams().put(ApiConstants.BAREMETAL_DISCOVER_NAME, BareMetalDiscoverer.class.getName());
+ super.execute();
+ }
+
+ public String getVmIpAddress() {
+ return vmIpAddress;
+ }
+
+ public void setVmIpAddress(String vmIpAddress) {
+ this.vmIpAddress = vmIpAddress;
+ }
+}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalKickStartPxeCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalKickStartPxeCmd.java b/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalKickStartPxeCmd.java
new file mode 100755
index 0000000..3adab20
--- /dev/null
+++ b/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalKickStartPxeCmd.java
@@ -0,0 +1,39 @@
+// 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 org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd.CommandType;
+import org.apache.cloudstack.api.Parameter;
+
+import com.cloud.baremetal.networkservice.BaremetalPxeKickStartResponse;
+@APICommand(name="addBaremetalPxeKickStartServer", description="add a baremetal pxe server", responseObject = BaremetalPxeKickStartResponse.class)
+public class AddBaremetalKickStartPxeCmd extends AddBaremetalPxeCmd {
+ @Parameter(name=ApiConstants.TFTP_DIR, type=CommandType.STRING, required = true, description="Tftp root directory of PXE server")
+ private String tftpDir;
+
+ public String getTftpDir() {
+ return tftpDir;
+ }
+
+ public void setTftpDir(String tftpDir) {
+ this.tftpDir = tftpDir;
+ }
+}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalPxeCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalPxeCmd.java b/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalPxeCmd.java
new file mode 100755
index 0000000..e1b39e9
--- /dev/null
+++ b/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalPxeCmd.java
@@ -0,0 +1,148 @@
+// 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 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.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.BaseCmd.CommandType;
+import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
+import org.apache.cloudstack.api.response.PodResponse;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.log4j.Logger;
+
+import com.cloud.baremetal.database.BaremetalPxeVO;
+import com.cloud.baremetal.networkservice.BaremetalPxeManager;
+import com.cloud.event.EventTypes;
+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;
+import com.cloud.user.UserContext;
+public class AddBaremetalPxeCmd extends BaseAsyncCmd {
+ private static final String s_name = "addexternalpxeresponse";
+ public static final Logger s_logger = Logger.getLogger(AddBaremetalPxeCmd.class);
+
+ @Inject BaremetalPxeManager pxeMgr;
+ /////////////////////////////////////////////////////
+ //////////////// API parameters /////////////////////
+ /////////////////////////////////////////////////////
+ @Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.UUID, entityType=PhysicalNetworkResponse.class, required=true, description="the Physical Network ID")
+ private Long physicalNetworkId;
+
+ @Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType=PodResponse.class, description="Pod Id")
+ private Long podId;
+
+ @Parameter(name=ApiConstants.URL, type=CommandType.STRING, required = true, description="URL of the external pxe device")
+ private String url;
+
+ @Parameter(name=ApiConstants.PXE_SERVER_TYPE, type=CommandType.STRING, required = true, description="type of pxe device")
+ private String deviceType;
+
+ @Parameter(name=ApiConstants.USERNAME, type=CommandType.STRING, required = true, description="Credentials to reach external pxe device")
+ private String username;
+
+ @Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, required = true, description="Credentials to reach external pxe device")
+ private String password;
+
+ @Override
+ public String getEventType() {
+ return EventTypes.EVENT_BAREMETAL_PXE_SERVER_ADD;
+ }
+
+ @Override
+ public String getEventDescription() {
+ return "Adding an external pxe server";
+ }
+
+ @Override
+ public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
+ ResourceAllocationException, NetworkRuleConflictException {
+ try {
+ BaremetalPxeVO vo = pxeMgr.addPxeServer(this);
+ } catch (Exception e) {
+ s_logger.warn("Unable to add external pxe server with url: " + getUrl(), e);
+ throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
+ }
+ }
+
+ @Override
+ public String getCommandName() {
+ return s_name;
+ }
+
+ @Override
+ public long getEntityOwnerId() {
+ return UserContext.current().getCaller().getId();
+ }
+
+ public Long getPhysicalNetworkId() {
+ return physicalNetworkId;
+ }
+
+ public void setPhysicalNetworkId(Long physicalNetworkId) {
+ this.physicalNetworkId = physicalNetworkId;
+ }
+
+ public Long getPodId() {
+ return podId;
+ }
+
+ public void setPodId(Long podId) {
+ this.podId = podId;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getDeviceType() {
+ return deviceType;
+ }
+
+ public void setDeviceType(String deviceType) {
+ this.deviceType = deviceType;
+ }
+}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalPxePingServerCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalPxePingServerCmd.java b/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalPxePingServerCmd.java
new file mode 100755
index 0000000..2ec9ecf
--- /dev/null
+++ b/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/AddBaremetalPxePingServerCmd.java
@@ -0,0 +1,84 @@
+// 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 org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.Parameter;
+
+import com.cloud.baremetal.networkservice.BaremetalPxePingResponse;
+
+@APICommand(name="addBaremetalPxePingServer", description="add a baremetal ping pxe server", responseObject = BaremetalPxePingResponse.class)
+public class AddBaremetalPxePingServerCmd extends AddBaremetalPxeCmd {
+
+ @Parameter(name=ApiConstants.PING_STORAGE_SERVER_IP, type=CommandType.STRING, required = true, description="PING storage server ip")
+ private String pingStorageServerIp;
+
+ @Parameter(name=ApiConstants.PING_DIR, type=CommandType.STRING, required = true, description="Root directory on PING storage server")
+ private String pingDir;
+
+ @Parameter(name=ApiConstants.TFTP_DIR, type=CommandType.STRING, required = true, description="Tftp root directory of PXE server")
+ private String tftpDir;
+
+ @Parameter(name=ApiConstants.PING_CIFS_USERNAME, type=CommandType.STRING, description="Username of PING storage server")
+ private String pingStorageServerUserName;
+
+ @Parameter(name=ApiConstants.PING_CIFS_PASSWORD, type=CommandType.STRING, description="Password of PING storage server")
+ private String pingStorageServerPassword;
+
+ public String getPingStorageServerIp() {
+ return pingStorageServerIp;
+ }
+
+ public void setPingStorageServerIp(String pingStorageServerIp) {
+ this.pingStorageServerIp = pingStorageServerIp;
+ }
+
+ public String getPingDir() {
+ return pingDir;
+ }
+
+ public void setPingDir(String pingDir) {
+ this.pingDir = pingDir;
+ }
+
+ public String getTftpDir() {
+ return tftpDir;
+ }
+
+ public void setTftpDir(String tftpDir) {
+ this.tftpDir = tftpDir;
+ }
+
+ public String getPingStorageServerUserName() {
+ return pingStorageServerUserName;
+ }
+
+ public void setPingStorageServerUserName(String pingStorageServerUserName) {
+ this.pingStorageServerUserName = pingStorageServerUserName;
+ }
+
+ public String getPingStorageServerPassword() {
+ return pingStorageServerPassword;
+ }
+
+ public void setPingStorageServerPassword(String pingStorageServerPassword) {
+ this.pingStorageServerPassword = pingStorageServerPassword;
+ }
+}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b047a9b6/tools/apidoc/gen_toc.py
----------------------------------------------------------------------
diff --git a/tools/apidoc/gen_toc.py b/tools/apidoc/gen_toc.py
index 3dd526a..b5d5f9e 100644
--- a/tools/apidoc/gen_toc.py
+++ b/tools/apidoc/gen_toc.py
@@ -146,7 +146,8 @@ known_categories = {
'DeploymentPlanners': 'Configuration',
'PortableIp': 'Portable IP',
'dedicateHost': 'Dedicate Resources',
- 'releaseDedicatedHost': 'Dedicate Resources'
+ 'releaseDedicatedHost': 'Dedicate Resources',
+ 'Baremetal' : 'Baremetal'
}