An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.cloud.network.security.schema
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link SecurityGroupRule }
+ *
+ */
+ public SecurityGroupRule createSecurityGroupRule() {
+ return new SecurityGroupRule();
+ }
+
+ /**
+ * Create an instance of {@link SecurityGroupVmRuleSet }
+ *
+ */
+ public SecurityGroupVmRuleSet createSecurityGroupVmRuleSet() {
+ return new SecurityGroupVmRuleSet();
+ }
+
+}
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/schema/SecurityGroupRule.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/schema/SecurityGroupRule.java
new file mode 100644
index 00000000000..050c3fdee7d
--- /dev/null
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/schema/SecurityGroupRule.java
@@ -0,0 +1,146 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2012.07.11 at 03:24:15 PM PDT
+//
+
+
+package com.cloud.baremetal.networkservice.schema;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
ip;
+
+ /**
+ * Gets the value of the protocol property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getProtocol() {
+ return protocol;
+ }
+
+ /**
+ * Sets the value of the protocol property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setProtocol(String value) {
+ this.protocol = value;
+ }
+
+ /**
+ * Gets the value of the startPort property.
+ *
+ */
+ public long getStartPort() {
+ return startPort;
+ }
+
+ /**
+ * Sets the value of the startPort property.
+ *
+ */
+ public void setStartPort(long value) {
+ this.startPort = value;
+ }
+
+ /**
+ * Gets the value of the endPort property.
+ *
+ */
+ public long getEndPort() {
+ return endPort;
+ }
+
+ /**
+ * Sets the value of the endPort property.
+ *
+ */
+ public void setEndPort(long value) {
+ this.endPort = value;
+ }
+
+ /**
+ * Gets the value of the ip property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the ip property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getIp().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link String }
+ *
+ *
+ */
+ public List getIp() {
+ if (ip == null) {
+ ip = new ArrayList();
+ }
+ return this.ip;
+ }
+
+}
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/schema/SecurityGroupVmRuleSet.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/schema/SecurityGroupVmRuleSet.java
new file mode 100644
index 00000000000..2c50c0e24d8
--- /dev/null
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/schema/SecurityGroupVmRuleSet.java
@@ -0,0 +1,263 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10
+// See http://java.sun.com/xml/jaxb
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2012.07.11 at 03:24:15 PM PDT
+//
+
+
+package com.cloud.baremetal.networkservice.schema;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for anonymous complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="vmName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="vmId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ * <element name="vmIp" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="vmMac" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="signature" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="sequenceNumber" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ * <sequence maxOccurs="unbounded" minOccurs="0">
+ * <element name="ingressRules" type="{}SecurityGroupRule"/>
+ * </sequence>
+ * <sequence maxOccurs="unbounded" minOccurs="0">
+ * <element name="egressRules" type="{}SecurityGroupRule"/>
+ * </sequence>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "vmName",
+ "vmId",
+ "vmIp",
+ "vmMac",
+ "signature",
+ "sequenceNumber",
+ "ingressRules",
+ "egressRules"
+})
+@XmlRootElement(name = "SecurityGroupVmRuleSet")
+public class SecurityGroupVmRuleSet {
+
+ @XmlElement(required = true)
+ protected String vmName;
+ protected long vmId;
+ @XmlElement(required = true)
+ protected String vmIp;
+ @XmlElement(required = true)
+ protected String vmMac;
+ @XmlElement(required = true)
+ protected String signature;
+ protected long sequenceNumber;
+ protected List ingressRules;
+ protected List egressRules;
+
+ /**
+ * Gets the value of the vmName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVmName() {
+ return vmName;
+ }
+
+ /**
+ * Sets the value of the vmName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVmName(String value) {
+ this.vmName = value;
+ }
+
+ /**
+ * Gets the value of the vmId property.
+ *
+ */
+ public long getVmId() {
+ return vmId;
+ }
+
+ /**
+ * Sets the value of the vmId property.
+ *
+ */
+ public void setVmId(long value) {
+ this.vmId = value;
+ }
+
+ /**
+ * Gets the value of the vmIp property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVmIp() {
+ return vmIp;
+ }
+
+ /**
+ * Sets the value of the vmIp property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVmIp(String value) {
+ this.vmIp = value;
+ }
+
+ /**
+ * Gets the value of the vmMac property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVmMac() {
+ return vmMac;
+ }
+
+ /**
+ * Sets the value of the vmMac property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVmMac(String value) {
+ this.vmMac = value;
+ }
+
+ /**
+ * Gets the value of the signature property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSignature() {
+ return signature;
+ }
+
+ /**
+ * Sets the value of the signature property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSignature(String value) {
+ this.signature = value;
+ }
+
+ /**
+ * Gets the value of the sequenceNumber property.
+ *
+ */
+ public long getSequenceNumber() {
+ return sequenceNumber;
+ }
+
+ /**
+ * Sets the value of the sequenceNumber property.
+ *
+ */
+ public void setSequenceNumber(long value) {
+ this.sequenceNumber = value;
+ }
+
+ /**
+ * Gets the value of the ingressRules property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the ingressRules property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getIngressRules().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link SecurityGroupRule }
+ *
+ *
+ */
+ public List getIngressRules() {
+ if (ingressRules == null) {
+ ingressRules = new ArrayList();
+ }
+ return this.ingressRules;
+ }
+
+ /**
+ * Gets the value of the egressRules property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set method for the egressRules property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getEgressRules().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link SecurityGroupRule }
+ *
+ *
+ */
+ public List getEgressRules() {
+ if (egressRules == null) {
+ egressRules = new ArrayList();
+ }
+ return this.egressRules;
+ }
+
+}
diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java
index af1f062c48f..52efd732abe 100755
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -1803,6 +1803,23 @@ public enum Config {
"Timeout to echo baremetal security group agent, in seconds, the provisioning process will be treated as a failure",
null),
+ BaremetalIpmiLanInterface(
+ "Advanced",
+ ManagementServer.class,
+ String.class,
+ "baremetal.ipmi.lan.interface",
+ "default",
+ "option specified in -I option of impitool. candidates are: open/bmc/lipmi/lan/lanplus/free/imb, see ipmitool man page for details. default valule 'default' means using default option of ipmitool",
+ null),
+
+ BaremetalIpmiRetryTimes("Advanced",
+ ManagementServer.class,
+ String.class,
+ "baremetal.ipmi.fail.retry",
+ "5",
+ "ipmi interface will be temporary out of order after power opertions(e.g. cycle, on), it leads following commands fail immediately. The value specifies retry times before accounting it as real failure",
+ null),
+
ApiLimitEnabled("Advanced", ManagementServer.class, Boolean.class, "api.throttling.enabled", "false", "Enable/disable Api rate limit", null),
ApiLimitInterval("Advanced", ManagementServer.class, Integer.class, "api.throttling.interval", "1", "Time interval (in seconds) to reset API count", null),
ApiLimitMax("Advanced", ManagementServer.class, Integer.class, "api.throttling.max", "25", "Max allowed number of APIs within fixed interval", null),
diff --git a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
index 97757da920d..f9546156ab1 100644
--- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
+++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
@@ -316,6 +316,15 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy
host.getClusterId());
}
+ Pod pod = _podDao.findById(host.getPodId());
+ Cluster cluster = _clusterDao.findById(host.getClusterId());
+
+ if (vm.getHypervisorType() == HypervisorType.BareMetal) {
+ DeployDestination dest = new DeployDestination(dc, pod, cluster, host, new HashMap());
+ s_logger.debug("Returning Deployment Destination: " + dest);
+ return dest;
+ }
+
// search for storage under the zone, pod, cluster of the host.
DataCenterDeployment lastPlan =
new DataCenterDeployment(host.getDataCenterId(), host.getPodId(), host.getClusterId(), hostIdSpecified, plan.getPoolId(), null,
@@ -333,8 +342,6 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy
suitableHosts, suitableVolumeStoragePools, avoids,
getPlannerUsage(planner, vmProfile, plan, avoids), readyAndReusedVolumes);
if (potentialResources != null) {
- Pod pod = _podDao.findById(host.getPodId());
- Cluster cluster = _clusterDao.findById(host.getClusterId());
Map storageVolMap = potentialResources.second();
// remove the reused vol<->pool from destination, since
// we don't have to prepare this volume.
@@ -395,10 +402,22 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy
// search for storage under the zone, pod, cluster
// of
// the last host.
- DataCenterDeployment lastPlan = new DataCenterDeployment(host.getDataCenterId(),
- host.getPodId(), host.getClusterId(), host.getId(), plan.getPoolId(), null);
- Pair