UCS: Add missing beans

Also move the API to the right place
This commit is contained in:
Sheng Yang 2013-06-27 14:51:51 -07:00
parent 329c6eb4d3
commit 7e44f81273
15 changed files with 61 additions and 10 deletions

View File

@ -855,6 +855,8 @@
<bean id="baremetalDhcpDaoImpl" class="com.cloud.baremetal.database.BaremetalDhcpDaoImpl" />
<bean id="baremetalPxeDaoImpl" class="com.cloud.baremetal.database.BaremetalPxeDaoImpl" />
<bean id="UcsManager" class="com.cloud.ucs.manager.UcsManagerImpl" />
<bean id="AffinityGroupServiceImpl" class="org.apache.cloudstack.affinity.AffinityGroupServiceImpl"/>
<bean id="DeploymentPlanningManager" class="com.cloud.deploy.DeploymentPlanningManagerImpl">
<property name="Planners" value="#{deploymentPlanners.Adapters}" />

View File

@ -606,6 +606,12 @@ addBaremetalPxeKickStartServer=1
addBaremetalPxePingServer=1
addBaremetalDhcp=1
#### UCS commands
addUcsManager=1
listUcsProfile=1
listUcsBlade=1
associatesUcsProfileToBlade=1
#### New Load Balancer commands
createLoadBalancer=15
listLoadBalancers=15

View File

@ -83,6 +83,12 @@
<property name="name" value="StratosphereSsp"/>
</bean>
<!--
UCS support components
-->
<bean id="ucsBladeDaoImpl" class="com.cloud.ucs.database.UcsBladeDaoImpl" />
<bean id="ucsManagerDaoImpl" class="com.cloud.ucs.database.UcsManagerDaoImpl" />
<!--
Deployment configurations of various adapters

View File

@ -170,6 +170,12 @@
</bean>
<!--
UCS support components
-->
<bean id="ucsBladeDaoImpl" class="com.cloud.ucs.database.UcsBladeDaoImpl" />
<bean id="ucsManagerDaoImpl" class="com.cloud.ucs.database.UcsManagerDaoImpl" />
<!--
Deployment configurations of various adapters

View File

@ -17,7 +17,15 @@
//
package com.cloud.ucs.manager;
import org.apache.cloudstack.api.AddUcsManagerCmd;
import org.apache.cloudstack.api.AssociateUcsProfileToBladeCmd;
import org.apache.cloudstack.api.ListUcsBladeCmd;
import org.apache.cloudstack.api.ListUcsManagerCmd;
import org.apache.cloudstack.api.ListUcsProfileCmd;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.UcsBladeResponse;
import org.apache.cloudstack.api.response.UcsManagerResponse;
import org.apache.cloudstack.api.response.UcsProfileResponse;
import com.cloud.utils.component.Manager;
import com.cloud.utils.component.PluggableService;

View File

@ -32,12 +32,20 @@ import javax.naming.ConfigurationException;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller;
import org.apache.cloudstack.api.AddUcsManagerCmd;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.AssociateUcsProfileToBladeCmd;
import org.apache.cloudstack.api.BaseCmd;
import org.apache.cloudstack.api.ListUcsBladeCmd;
import org.apache.cloudstack.api.ListUcsManagerCmd;
import org.apache.cloudstack.api.ListUcsProfileCmd;
import org.apache.cloudstack.api.ResponseGenerator;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.ClusterResponse;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.UcsBladeResponse;
import org.apache.cloudstack.api.response.UcsManagerResponse;
import org.apache.cloudstack.api.response.UcsProfileResponse;
import org.apache.cxf.helpers.FileUtils;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;

View File

@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
//
package com.cloud.ucs.manager;
package org.apache.cloudstack.api;
import javax.inject.Inject;
@ -26,6 +26,7 @@ import org.apache.cloudstack.api.BaseCmd;
import org.apache.cloudstack.api.BaseCmd.CommandType;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.UcsManagerResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
import org.apache.log4j.Logger;
@ -35,6 +36,7 @@ import com.cloud.exception.NetworkRuleConflictException;
import com.cloud.exception.ResourceAllocationException;
import com.cloud.exception.ResourceUnavailableException;
import com.cloud.server.ManagementService;
import com.cloud.ucs.manager.UcsManager;
import com.cloud.user.Account;
@APICommand(name="addUcsManager", description="Adds a Ucs manager", responseObject=UcsManagerResponse.class)

View File

@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
//
package com.cloud.ucs.manager;
package org.apache.cloudstack.api;
import javax.inject.Inject;
@ -25,6 +25,8 @@ import org.apache.cloudstack.api.ApiErrorCode;
import org.apache.cloudstack.api.BaseCmd;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.UcsBladeResponse;
import org.apache.cloudstack.api.response.UcsManagerResponse;
import org.apache.log4j.Logger;
import com.cloud.exception.ConcurrentOperationException;
@ -32,8 +34,9 @@ import com.cloud.exception.InsufficientCapacityException;
import com.cloud.exception.NetworkRuleConflictException;
import com.cloud.exception.ResourceAllocationException;
import com.cloud.exception.ResourceUnavailableException;
import com.cloud.ucs.manager.UcsManager;
import com.cloud.user.Account;
@APICommand(name="associatesUscProfileToBlade", description="associate a profile to a blade", responseObject=UcsBladeResponse.class)
@APICommand(name="associatesUcsProfileToBlade", description="associate a profile to a blade", responseObject=UcsBladeResponse.class)
public class AssociateUcsProfileToBladeCmd extends BaseCmd {
public static final Logger s_logger = Logger.getLogger(AssociateUcsProfileToBladeCmd.class);

View File

@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.ucs.manager;
package org.apache.cloudstack.api;
import javax.inject.Inject;
@ -26,6 +26,8 @@ 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.cloudstack.api.response.UcsBladeResponse;
import org.apache.cloudstack.api.response.UcsManagerResponse;
import org.apache.log4j.Logger;
import com.cloud.exception.ConcurrentOperationException;
@ -33,6 +35,7 @@ import com.cloud.exception.InsufficientCapacityException;
import com.cloud.exception.NetworkRuleConflictException;
import com.cloud.exception.ResourceAllocationException;
import com.cloud.exception.ResourceUnavailableException;
import com.cloud.ucs.manager.UcsManager;
import com.cloud.user.Account;
@APICommand(name="listUcsBlade", description="List ucs blades", responseObject=UcsBladeResponse.class)

View File

@ -23,7 +23,7 @@
//
// Unless required by applicable law or agreed to in writing,
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
package com.cloud.ucs.manager;
package org.apache.cloudstack.api;
import javax.inject.Inject;
@ -35,6 +35,7 @@ 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.cloudstack.api.response.UcsManagerResponse;
import org.apache.log4j.Logger;
import com.cloud.exception.ConcurrentOperationException;
@ -43,6 +44,7 @@ import com.cloud.exception.NetworkRuleConflictException;
import com.cloud.exception.ResourceAllocationException;
import com.cloud.exception.ResourceUnavailableException;
import com.cloud.server.ManagementService;
import com.cloud.ucs.manager.UcsManager;
import com.cloud.user.Account;
@APICommand(description="List ucs manager", responseObject=UcsManagerResponse.class)
public class ListUcsManagerCmd extends BaseListCmd {

View File

@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
//
package com.cloud.ucs.manager;
package org.apache.cloudstack.api;
import javax.inject.Inject;
@ -28,6 +28,8 @@ 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.cloudstack.api.response.UcsManagerResponse;
import org.apache.cloudstack.api.response.UcsProfileResponse;
import org.apache.log4j.Logger;
import com.cloud.exception.ConcurrentOperationException;
@ -36,6 +38,7 @@ import com.cloud.exception.NetworkRuleConflictException;
import com.cloud.exception.ResourceAllocationException;
import com.cloud.exception.ResourceUnavailableException;
import com.cloud.server.ManagementService;
import com.cloud.ucs.manager.UcsManager;
import com.cloud.user.Account;
@APICommand(name="listUcsProfile", description="List profile in ucs manager", responseObject=UcsProfileResponse.class)
public class ListUcsProfileCmd extends BaseListCmd {

View File

@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.ucs.manager;
package org.apache.cloudstack.api.response;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponse;

View File

@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
//
package com.cloud.ucs.manager;
package org.apache.cloudstack.api.response;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.EntityReference;

View File

@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
//
package com.cloud.ucs.manager;
package org.apache.cloudstack.api.response;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponse;

View File

@ -152,7 +152,9 @@ known_categories = {
'PortableIp': 'Portable IP',
'dedicateHost': 'Dedicate Resources',
'releaseDedicatedHost': 'Dedicate Resources',
'Baremetal' : 'Baremetal'
'Baremetal' : 'Baremetal',
'UCS' : 'UCS',
'Ucs' : 'UCS'
}