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/27 23:54:53 UTC

git commit: updated refs/heads/master to 7e44f81

Updated Branches:
  refs/heads/master 329c6eb4d -> 7e44f8127


UCS: Add missing beans

Also move the API to the right place


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

Branch: refs/heads/master
Commit: 7e44f81273a3fa2781f80e7a5e6c7410fd9e0ebe
Parents: 329c6eb
Author: Sheng Yang <sh...@citrix.com>
Authored: Thu Jun 27 14:51:51 2013 -0700
Committer: Sheng Yang <sh...@citrix.com>
Committed: Thu Jun 27 14:54:45 2013 -0700

----------------------------------------------------------------------
 client/tomcatconf/applicationContext.xml.in     |   2 +
 client/tomcatconf/commands.properties.in        |   6 +
 client/tomcatconf/componentContext.xml.in       |   6 +
 client/tomcatconf/nonossComponentContext.xml.in |   6 +
 .../com/cloud/ucs/manager/AddUcsManagerCmd.java | 126 ------------------
 .../manager/AssociateUcsProfileToBladeCmd.java  |  96 --------------
 .../com/cloud/ucs/manager/ListUcsBladeCmd.java  |  87 -------------
 .../cloud/ucs/manager/ListUcsManagerCmd.java    |  88 -------------
 .../cloud/ucs/manager/ListUcsProfileCmd.java    |  81 ------------
 .../com/cloud/ucs/manager/UcsBladeResponse.java |  84 ------------
 .../src/com/cloud/ucs/manager/UcsManager.java   |   8 ++
 .../com/cloud/ucs/manager/UcsManagerImpl.java   |   8 ++
 .../cloud/ucs/manager/UcsManagerResponse.java   |  73 -----------
 .../cloud/ucs/manager/UcsProfileResponse.java   |  37 ------
 .../apache/cloudstack/api/AddUcsManagerCmd.java | 128 +++++++++++++++++++
 .../api/AssociateUcsProfileToBladeCmd.java      |  99 ++++++++++++++
 .../apache/cloudstack/api/ListUcsBladeCmd.java  |  90 +++++++++++++
 .../cloudstack/api/ListUcsManagerCmd.java       |  90 +++++++++++++
 .../cloudstack/api/ListUcsProfileCmd.java       |  84 ++++++++++++
 .../api/response/UcsBladeResponse.java          |  84 ++++++++++++
 .../api/response/UcsManagerResponse.java        |  73 +++++++++++
 .../api/response/UcsProfileResponse.java        |  37 ++++++
 tools/apidoc/gen_toc.py                         |   4 +-
 23 files changed, 724 insertions(+), 673 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/client/tomcatconf/applicationContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in
index 2b2d834..09948f4 100644
--- a/client/tomcatconf/applicationContext.xml.in
+++ b/client/tomcatconf/applicationContext.xml.in
@@ -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}" />

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/client/tomcatconf/commands.properties.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in
index 648b69d..6a38795 100644
--- a/client/tomcatconf/commands.properties.in
+++ b/client/tomcatconf/commands.properties.in
@@ -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

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/client/tomcatconf/componentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/componentContext.xml.in b/client/tomcatconf/componentContext.xml.in
index 61bca48..c720155 100644
--- a/client/tomcatconf/componentContext.xml.in
+++ b/client/tomcatconf/componentContext.xml.in
@@ -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

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/client/tomcatconf/nonossComponentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/nonossComponentContext.xml.in b/client/tomcatconf/nonossComponentContext.xml.in
index 62685e9..7b65e71 100644
--- a/client/tomcatconf/nonossComponentContext.xml.in
+++ b/client/tomcatconf/nonossComponentContext.xml.in
@@ -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

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/AddUcsManagerCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/AddUcsManagerCmd.java b/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/AddUcsManagerCmd.java
deleted file mode 100755
index 274cfbd..0000000
--- a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/AddUcsManagerCmd.java
+++ /dev/null
@@ -1,126 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-// 
-//   http://www.apache.org/licenses/LICENSE-2.0
-// 
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-package com.cloud.ucs.manager;
-
-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.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.ZoneResponse;
-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;
-import com.cloud.server.ManagementService;
-import com.cloud.user.Account;
-
-@APICommand(name="addUcsManager", description="Adds a Ucs manager", responseObject=UcsManagerResponse.class)
-public class AddUcsManagerCmd extends BaseCmd {
-    public static final Logger s_logger = Logger.getLogger(AddUcsManagerCmd.class);
-
-    @Inject
-    private UcsManager mgr;
-
-    @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, description="the Zone id for the ucs manager", entityType=ZoneResponse.class, required=true)
-    private Long zoneId;
-
-    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of UCS manager")
-    private String name;
-
-    @Parameter(name=ApiConstants.URL, type=CommandType.STRING, description="the name of UCS url", required=true)
-    private String url;
-
-    @Parameter(name=ApiConstants.USERNAME, type=CommandType.STRING, description="the username of UCS", required=true)
-    private String username;
-
-    @Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, description="the password of UCS", required=true)
-    private String password;
-
-    @Override
-    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
-            ResourceAllocationException, NetworkRuleConflictException {
-        try {
-            UcsManagerResponse rsp = mgr.addUcsManager(this);
-            rsp.setObjectName("ucsmanager");
-            rsp.setResponseName(getCommandName());
-            this.setResponseObject(rsp);
-        } catch (Exception e) {
-            s_logger.warn("Exception: ", e);
-            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
-        }
-    }
-
-    @Override
-    public String getCommandName() {
-        return "addUcsManagerResponse";
-    }
-
-    @Override
-    public long getEntityOwnerId() {
-        return Account.ACCOUNT_ID_SYSTEM;
-    }
-
-    public Long getZoneId() {
-        return zoneId;
-    }
-
-    public void setZoneId(Long zoneId) {
-        this.zoneId = zoneId;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    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;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/AssociateUcsProfileToBladeCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/AssociateUcsProfileToBladeCmd.java b/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/AssociateUcsProfileToBladeCmd.java
deleted file mode 100755
index 0f95bb9..0000000
--- a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/AssociateUcsProfileToBladeCmd.java
+++ /dev/null
@@ -1,96 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-// 
-//   http://www.apache.org/licenses/LICENSE-2.0
-// 
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-package com.cloud.ucs.manager;
-
-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.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-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;
-import com.cloud.user.Account;
-@APICommand(name="associatesUscProfileToBlade", 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);
-
-    @Inject
-    private UcsManager mgr;
-
-    @Parameter(name=ApiConstants.UCS_MANAGER_ID, type=CommandType.UUID, description="ucs manager id", entityType=UcsManagerResponse.class, required=true)
-    private Long ucsManagerId;
-    @Parameter(name=ApiConstants.UCS_PROFILE_DN, type=CommandType.STRING, description="profile dn", required=true)
-    private String profileDn;
-    @Parameter(name=ApiConstants.UCS_BLADE_ID, type=CommandType.UUID, entityType=UcsBladeResponse.class, description="blade id", required=true)
-    private Long bladeId;
-
-    @Override
-    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
-            ResourceAllocationException, NetworkRuleConflictException {
-        try {
-            UcsBladeResponse rsp = mgr.associateProfileToBlade(this);
-            rsp.setResponseName(getCommandName());
-            this.setResponseObject(rsp);
-        } catch (Exception e) {
-            s_logger.warn("Exception: ", e);
-            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
-        }
-    }
-
-    @Override
-    public String getCommandName() {
-        return "associateucsprofiletobladeresponse";
-    }
-
-    @Override
-    public long getEntityOwnerId() {
-        return Account.ACCOUNT_ID_SYSTEM;
-    }
-
-    public Long getUcsManagerId() {
-        return ucsManagerId;
-    }
-
-    public void setUcsManagerId(Long ucsManagerId) {
-        this.ucsManagerId = ucsManagerId;
-    }
-
-    public String getProfileDn() {
-        return profileDn;
-    }
-
-    public void setProfileDn(String profileDn) {
-        this.profileDn = profileDn;
-    }
-
-    public Long getBladeId() {
-        return bladeId;
-    }
-
-    public void setBladeId(Long bladeId) {
-        this.bladeId = bladeId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/ListUcsBladeCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/ListUcsBladeCmd.java b/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/ListUcsBladeCmd.java
deleted file mode 100755
index 3c6587e..0000000
--- a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/ListUcsBladeCmd.java
+++ /dev/null
@@ -1,87 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.ucs.manager;
-
-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.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;
-import com.cloud.user.Account;
-
-@APICommand(name="listUcsBlade", description="List ucs blades", responseObject=UcsBladeResponse.class)
-public class ListUcsBladeCmd extends BaseListCmd {
-    public static final Logger s_logger = Logger.getLogger(ListUcsBladeCmd.class);
-
-    @Inject
-    private UcsManager mgr;
-
-    @Parameter(name=ApiConstants.UCS_MANAGER_ID, type=CommandType.UUID, description="ucs manager id", entityType=UcsManagerResponse.class, required=true)
-    private Long ucsManagerId;
-
-    public UcsManager getMgr() {
-        return mgr;
-    }
-
-    public void setMgr(UcsManager mgr) {
-        this.mgr = mgr;
-    }
-
-    public Long getUcsManagerId() {
-        return ucsManagerId;
-    }
-
-    public void setUcsManagerId(Long ucsManagerId) {
-        this.ucsManagerId = ucsManagerId;
-    }
-
-    @Override
-    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
-            ResourceAllocationException, NetworkRuleConflictException {
-        try {
-            ListResponse<UcsBladeResponse> response = mgr.listUcsBlades(this);
-            response.setResponseName(getCommandName());
-            response.setObjectName("ucsblade");
-            this.setResponseObject(response);
-        } catch (Exception e) {
-            s_logger.warn(e.getMessage(), e);
-            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
-        }
-    }
-
-    @Override
-    public String getCommandName() {
-        return "listucsbladeresponse";
-    }
-
-    @Override
-    public long getEntityOwnerId() {
-        return Account.ACCOUNT_ID_SYSTEM;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/ListUcsManagerCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/ListUcsManagerCmd.java b/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/ListUcsManagerCmd.java
deleted file mode 100755
index e705b17..0000000
--- a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/ListUcsManagerCmd.java
+++ /dev/null
@@ -1,88 +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 02/28/2013
-// regarding copyright ownership.  The ASF licenses this file
-// "License"); you may not use this file except in compliance
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-package com.cloud.ucs.manager;
-
-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.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;
-import com.cloud.server.ManagementService;
-import com.cloud.user.Account;
-@APICommand(description="List ucs manager", responseObject=UcsManagerResponse.class)
-public class ListUcsManagerCmd extends BaseListCmd {
-    public static final Logger s_logger = Logger.getLogger(ListUcsManagerCmd.class);
-
-    @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="the zone id", required=true)
-    private Long zoneId;
-
-    @Inject
-    private UcsManager mgr;
-
-    @Override
-    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
-            ResourceAllocationException, NetworkRuleConflictException {
-        try {
-            ListResponse<UcsManagerResponse> response  = mgr.listUcsManager(this);
-            response.setResponseName(getCommandName());
-            response.setObjectName("ucsmanager");
-            this.setResponseObject(response);
-        } catch (Exception e) {
-            s_logger.warn("Exception: ", e);
-            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
-        }
-    }
-
-    @Override
-    public String getCommandName() {
-        return "listucsmanagerreponse";
-    }
-
-    @Override
-    public long getEntityOwnerId() {
-        return Account.ACCOUNT_ID_SYSTEM;
-    }
-
-    public Long getZoneId() {
-        return zoneId;
-    }
-
-    public void setZoneId(Long zoneId) {
-        this.zoneId = zoneId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/ListUcsProfileCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/ListUcsProfileCmd.java b/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/ListUcsProfileCmd.java
deleted file mode 100755
index 7bc4dec..0000000
--- a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/ListUcsProfileCmd.java
+++ /dev/null
@@ -1,81 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-// 
-//   http://www.apache.org/licenses/LICENSE-2.0
-// 
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-package com.cloud.ucs.manager;
-
-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;
-import com.cloud.server.ManagementService;
-import com.cloud.user.Account;
-@APICommand(name="listUcsProfile", description="List profile in ucs manager", responseObject=UcsProfileResponse.class)
-public class ListUcsProfileCmd extends BaseListCmd {
-    public static final Logger s_logger = Logger.getLogger(ListUcsProfileCmd.class);
-
-    @Inject UcsManager mgr;
-
-    @Parameter(name=ApiConstants.UCS_MANAGER_ID, type=CommandType.UUID,  entityType=UcsManagerResponse.class, description="the id for the ucs manager", required=true)
-    private Long ucsManagerId;
-
-    public Long getUcsManagerId() {
-        return ucsManagerId;
-    }
-
-    public void setUcsManagerId(Long ucsManagerId) {
-        this.ucsManagerId = ucsManagerId;
-    }
-
-    @Override
-    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
-            ResourceAllocationException, NetworkRuleConflictException {
-        try {
-            ListResponse<UcsProfileResponse> response = mgr.listUcsProfiles(this);
-            response.setResponseName(getCommandName());
-            response.setObjectName("ucsprofiles");
-            this.setResponseObject(response);
-        } catch (Exception e) {
-            s_logger.warn("Exception: ", e);
-            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
-        }
-    }
-
-    @Override
-    public String getCommandName() {
-        return "listucsprofileresponse";
-    }
-
-    @Override
-    public long getEntityOwnerId() {
-        return Account.ACCOUNT_ID_SYSTEM;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsBladeResponse.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsBladeResponse.java b/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsBladeResponse.java
deleted file mode 100755
index b06d62a..0000000
--- a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsBladeResponse.java
+++ /dev/null
@@ -1,84 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.ucs.manager;
-
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseResponse;
-import org.apache.cloudstack.api.EntityReference;
-
-import com.cloud.serializer.Param;
-import com.cloud.ucs.database.UcsBladeVO;
-import com.google.gson.annotations.SerializedName;
-@EntityReference(value=UcsBladeVO.class)
-public class UcsBladeResponse extends BaseResponse {
-    @SerializedName(ApiConstants.ID)
-    @Param(description = "ucs blade id")
-    private String id;
-    @SerializedName(ApiConstants.UCS_MANAGER_ID)
-    @Param(description = "ucs manager id")
-    private String ucsManagerId;
-    @SerializedName(ApiConstants.HOST_ID)
-    @Param(description = "cloudstack host id this blade associates to")
-    private String hostId;
-    @SerializedName(ApiConstants.UCS_BLADE_DN)
-    @Param(description = "ucs blade dn")
-    private String dn;
-    @SerializedName(ApiConstants.UCS_PROFILE_DN)
-    @Param(description = "associated ucs profile dn")
-    private String associatedProfileDn;
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getUcsManagerId() {
-        return ucsManagerId;
-    }
-
-    public void setUcsManagerId(String ucsManagerId) {
-        this.ucsManagerId = ucsManagerId;
-    }
-
-    public String getHostId() {
-        return hostId;
-    }
-
-    public void setHostId(String hostId) {
-        this.hostId = hostId;
-    }
-
-    public String getDn() {
-        return dn;
-    }
-
-    public void setDn(String dn) {
-        this.dn = dn;
-    }
-
-    public String getAssociatedProfileDn() {
-        return associatedProfileDn;
-    }
-
-    public void setAssociatedProfileDn(String associatedProfileDn) {
-        this.associatedProfileDn = associatedProfileDn;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsManager.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsManager.java b/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsManager.java
index 7250318..35a4459 100755
--- a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsManager.java
+++ b/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsManager.java
@@ -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;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsManagerImpl.java b/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsManagerImpl.java
index e0aefcf..150e3dc 100755
--- a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsManagerImpl.java
+++ b/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsManagerImpl.java
@@ -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;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsManagerResponse.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsManagerResponse.java b/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsManagerResponse.java
deleted file mode 100755
index e389a83..0000000
--- a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsManagerResponse.java
+++ /dev/null
@@ -1,73 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-// 
-//   http://www.apache.org/licenses/LICENSE-2.0
-// 
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-package com.cloud.ucs.manager;
-
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.EntityReference;
-
-import org.apache.cloudstack.api.BaseResponse;
-
-import com.cloud.serializer.Param;
-import com.cloud.ucs.database.UcsManagerVO;
-import com.google.gson.annotations.SerializedName;
-@EntityReference(value=UcsManagerVO.class)
-public class UcsManagerResponse extends BaseResponse {
-    @SerializedName(ApiConstants.ID) @Param(description="the ID of the ucs manager")
-    private String id;
-
-    @SerializedName(ApiConstants.NAME) @Param(description="the name of ucs manager")
-    private String name;
-
-    @SerializedName(ApiConstants.URL) @Param(description="the url of ucs manager")
-    private String url;
-
-    @SerializedName(ApiConstants.ZONE_ID) @Param(description="the zone ID of ucs manager")
-    private String zoneId;
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getUrl() {
-        return url;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getZoneId() {
-        return zoneId;
-    }
-
-    public void setZoneId(String zoneId) {
-        this.zoneId = zoneId;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsProfileResponse.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsProfileResponse.java b/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsProfileResponse.java
deleted file mode 100755
index 14a2215..0000000
--- a/plugins/hypervisors/ucs/src/com/cloud/ucs/manager/UcsProfileResponse.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.
-//
-package com.cloud.ucs.manager;
-
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseResponse;
-
-import com.cloud.serializer.Param;
-import com.google.gson.annotations.SerializedName;
-
-public class UcsProfileResponse extends BaseResponse {
-    @SerializedName(ApiConstants.UCS_DN) @Param(description="ucs profile dn")
-    private String dn;
-
-    public String getDn() {
-        return dn;
-    }
-
-    public void setDn(String dn) {
-        this.dn = dn;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/AddUcsManagerCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/AddUcsManagerCmd.java b/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/AddUcsManagerCmd.java
new file mode 100755
index 0000000..e5ae0bd
--- /dev/null
+++ b/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/AddUcsManagerCmd.java
@@ -0,0 +1,128 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+// 
+//   http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package 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.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;
+
+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.server.ManagementService;
+import com.cloud.ucs.manager.UcsManager;
+import com.cloud.user.Account;
+
+@APICommand(name="addUcsManager", description="Adds a Ucs manager", responseObject=UcsManagerResponse.class)
+public class AddUcsManagerCmd extends BaseCmd {
+    public static final Logger s_logger = Logger.getLogger(AddUcsManagerCmd.class);
+
+    @Inject
+    private UcsManager mgr;
+
+    @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, description="the Zone id for the ucs manager", entityType=ZoneResponse.class, required=true)
+    private Long zoneId;
+
+    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of UCS manager")
+    private String name;
+
+    @Parameter(name=ApiConstants.URL, type=CommandType.STRING, description="the name of UCS url", required=true)
+    private String url;
+
+    @Parameter(name=ApiConstants.USERNAME, type=CommandType.STRING, description="the username of UCS", required=true)
+    private String username;
+
+    @Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, description="the password of UCS", required=true)
+    private String password;
+
+    @Override
+    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
+            ResourceAllocationException, NetworkRuleConflictException {
+        try {
+            UcsManagerResponse rsp = mgr.addUcsManager(this);
+            rsp.setObjectName("ucsmanager");
+            rsp.setResponseName(getCommandName());
+            this.setResponseObject(rsp);
+        } catch (Exception e) {
+            s_logger.warn("Exception: ", e);
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
+        }
+    }
+
+    @Override
+    public String getCommandName() {
+        return "addUcsManagerResponse";
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        return Account.ACCOUNT_ID_SYSTEM;
+    }
+
+    public Long getZoneId() {
+        return zoneId;
+    }
+
+    public void setZoneId(Long zoneId) {
+        this.zoneId = zoneId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    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;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/AssociateUcsProfileToBladeCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/AssociateUcsProfileToBladeCmd.java b/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/AssociateUcsProfileToBladeCmd.java
new file mode 100755
index 0000000..c3178cd
--- /dev/null
+++ b/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/AssociateUcsProfileToBladeCmd.java
@@ -0,0 +1,99 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+// 
+//   http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package 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.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;
+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="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);
+
+    @Inject
+    private UcsManager mgr;
+
+    @Parameter(name=ApiConstants.UCS_MANAGER_ID, type=CommandType.UUID, description="ucs manager id", entityType=UcsManagerResponse.class, required=true)
+    private Long ucsManagerId;
+    @Parameter(name=ApiConstants.UCS_PROFILE_DN, type=CommandType.STRING, description="profile dn", required=true)
+    private String profileDn;
+    @Parameter(name=ApiConstants.UCS_BLADE_ID, type=CommandType.UUID, entityType=UcsBladeResponse.class, description="blade id", required=true)
+    private Long bladeId;
+
+    @Override
+    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
+            ResourceAllocationException, NetworkRuleConflictException {
+        try {
+            UcsBladeResponse rsp = mgr.associateProfileToBlade(this);
+            rsp.setResponseName(getCommandName());
+            this.setResponseObject(rsp);
+        } catch (Exception e) {
+            s_logger.warn("Exception: ", e);
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
+        }
+    }
+
+    @Override
+    public String getCommandName() {
+        return "associateucsprofiletobladeresponse";
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        return Account.ACCOUNT_ID_SYSTEM;
+    }
+
+    public Long getUcsManagerId() {
+        return ucsManagerId;
+    }
+
+    public void setUcsManagerId(Long ucsManagerId) {
+        this.ucsManagerId = ucsManagerId;
+    }
+
+    public String getProfileDn() {
+        return profileDn;
+    }
+
+    public void setProfileDn(String profileDn) {
+        this.profileDn = profileDn;
+    }
+
+    public Long getBladeId() {
+        return bladeId;
+    }
+
+    public void setBladeId(Long bladeId) {
+        this.bladeId = bladeId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/ListUcsBladeCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/ListUcsBladeCmd.java b/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/ListUcsBladeCmd.java
new file mode 100755
index 0000000..e42cf65
--- /dev/null
+++ b/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/ListUcsBladeCmd.java
@@ -0,0 +1,90 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package 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.BaseCmd;
+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;
+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)
+public class ListUcsBladeCmd extends BaseListCmd {
+    public static final Logger s_logger = Logger.getLogger(ListUcsBladeCmd.class);
+
+    @Inject
+    private UcsManager mgr;
+
+    @Parameter(name=ApiConstants.UCS_MANAGER_ID, type=CommandType.UUID, description="ucs manager id", entityType=UcsManagerResponse.class, required=true)
+    private Long ucsManagerId;
+
+    public UcsManager getMgr() {
+        return mgr;
+    }
+
+    public void setMgr(UcsManager mgr) {
+        this.mgr = mgr;
+    }
+
+    public Long getUcsManagerId() {
+        return ucsManagerId;
+    }
+
+    public void setUcsManagerId(Long ucsManagerId) {
+        this.ucsManagerId = ucsManagerId;
+    }
+
+    @Override
+    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
+            ResourceAllocationException, NetworkRuleConflictException {
+        try {
+            ListResponse<UcsBladeResponse> response = mgr.listUcsBlades(this);
+            response.setResponseName(getCommandName());
+            response.setObjectName("ucsblade");
+            this.setResponseObject(response);
+        } catch (Exception e) {
+            s_logger.warn(e.getMessage(), e);
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
+        }
+    }
+
+    @Override
+    public String getCommandName() {
+        return "listucsbladeresponse";
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        return Account.ACCOUNT_ID_SYSTEM;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/ListUcsManagerCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/ListUcsManagerCmd.java b/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/ListUcsManagerCmd.java
new file mode 100755
index 0000000..e9b6644
--- /dev/null
+++ b/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/ListUcsManagerCmd.java
@@ -0,0 +1,90 @@
+// 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 02/28/2013
+// regarding copyright ownership.  The ASF licenses this file
+// "License"); you may not use this file except in compliance
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+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.BaseCmd;
+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;
+import com.cloud.exception.InsufficientCapacityException;
+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 {
+    public static final Logger s_logger = Logger.getLogger(ListUcsManagerCmd.class);
+
+    @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="the zone id", required=true)
+    private Long zoneId;
+
+    @Inject
+    private UcsManager mgr;
+
+    @Override
+    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
+            ResourceAllocationException, NetworkRuleConflictException {
+        try {
+            ListResponse<UcsManagerResponse> response  = mgr.listUcsManager(this);
+            response.setResponseName(getCommandName());
+            response.setObjectName("ucsmanager");
+            this.setResponseObject(response);
+        } catch (Exception e) {
+            s_logger.warn("Exception: ", e);
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
+        }
+    }
+
+    @Override
+    public String getCommandName() {
+        return "listucsmanagerreponse";
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        return Account.ACCOUNT_ID_SYSTEM;
+    }
+
+    public Long getZoneId() {
+        return zoneId;
+    }
+
+    public void setZoneId(Long zoneId) {
+        this.zoneId = zoneId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/ListUcsProfileCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/ListUcsProfileCmd.java b/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/ListUcsProfileCmd.java
new file mode 100755
index 0000000..56f3f5d
--- /dev/null
+++ b/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/ListUcsProfileCmd.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.
+//
+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.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.cloudstack.api.response.UcsManagerResponse;
+import org.apache.cloudstack.api.response.UcsProfileResponse;
+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;
+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 {
+    public static final Logger s_logger = Logger.getLogger(ListUcsProfileCmd.class);
+
+    @Inject UcsManager mgr;
+
+    @Parameter(name=ApiConstants.UCS_MANAGER_ID, type=CommandType.UUID,  entityType=UcsManagerResponse.class, description="the id for the ucs manager", required=true)
+    private Long ucsManagerId;
+
+    public Long getUcsManagerId() {
+        return ucsManagerId;
+    }
+
+    public void setUcsManagerId(Long ucsManagerId) {
+        this.ucsManagerId = ucsManagerId;
+    }
+
+    @Override
+    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
+            ResourceAllocationException, NetworkRuleConflictException {
+        try {
+            ListResponse<UcsProfileResponse> response = mgr.listUcsProfiles(this);
+            response.setResponseName(getCommandName());
+            response.setObjectName("ucsprofiles");
+            this.setResponseObject(response);
+        } catch (Exception e) {
+            s_logger.warn("Exception: ", e);
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
+        }
+    }
+
+    @Override
+    public String getCommandName() {
+        return "listucsprofileresponse";
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        return Account.ACCOUNT_ID_SYSTEM;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/response/UcsBladeResponse.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/response/UcsBladeResponse.java b/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/response/UcsBladeResponse.java
new file mode 100755
index 0000000..7416978
--- /dev/null
+++ b/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/response/UcsBladeResponse.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.
+package org.apache.cloudstack.api.response;
+
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseResponse;
+import org.apache.cloudstack.api.EntityReference;
+
+import com.cloud.serializer.Param;
+import com.cloud.ucs.database.UcsBladeVO;
+import com.google.gson.annotations.SerializedName;
+@EntityReference(value=UcsBladeVO.class)
+public class UcsBladeResponse extends BaseResponse {
+    @SerializedName(ApiConstants.ID)
+    @Param(description = "ucs blade id")
+    private String id;
+    @SerializedName(ApiConstants.UCS_MANAGER_ID)
+    @Param(description = "ucs manager id")
+    private String ucsManagerId;
+    @SerializedName(ApiConstants.HOST_ID)
+    @Param(description = "cloudstack host id this blade associates to")
+    private String hostId;
+    @SerializedName(ApiConstants.UCS_BLADE_DN)
+    @Param(description = "ucs blade dn")
+    private String dn;
+    @SerializedName(ApiConstants.UCS_PROFILE_DN)
+    @Param(description = "associated ucs profile dn")
+    private String associatedProfileDn;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getUcsManagerId() {
+        return ucsManagerId;
+    }
+
+    public void setUcsManagerId(String ucsManagerId) {
+        this.ucsManagerId = ucsManagerId;
+    }
+
+    public String getHostId() {
+        return hostId;
+    }
+
+    public void setHostId(String hostId) {
+        this.hostId = hostId;
+    }
+
+    public String getDn() {
+        return dn;
+    }
+
+    public void setDn(String dn) {
+        this.dn = dn;
+    }
+
+    public String getAssociatedProfileDn() {
+        return associatedProfileDn;
+    }
+
+    public void setAssociatedProfileDn(String associatedProfileDn) {
+        this.associatedProfileDn = associatedProfileDn;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/response/UcsManagerResponse.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/response/UcsManagerResponse.java b/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/response/UcsManagerResponse.java
new file mode 100755
index 0000000..87994a0
--- /dev/null
+++ b/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/response/UcsManagerResponse.java
@@ -0,0 +1,73 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+// 
+//   http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package org.apache.cloudstack.api.response;
+
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.EntityReference;
+
+import org.apache.cloudstack.api.BaseResponse;
+
+import com.cloud.serializer.Param;
+import com.cloud.ucs.database.UcsManagerVO;
+import com.google.gson.annotations.SerializedName;
+@EntityReference(value=UcsManagerVO.class)
+public class UcsManagerResponse extends BaseResponse {
+    @SerializedName(ApiConstants.ID) @Param(description="the ID of the ucs manager")
+    private String id;
+
+    @SerializedName(ApiConstants.NAME) @Param(description="the name of ucs manager")
+    private String name;
+
+    @SerializedName(ApiConstants.URL) @Param(description="the url of ucs manager")
+    private String url;
+
+    @SerializedName(ApiConstants.ZONE_ID) @Param(description="the zone ID of ucs manager")
+    private String zoneId;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getZoneId() {
+        return zoneId;
+    }
+
+    public void setZoneId(String zoneId) {
+        this.zoneId = zoneId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/response/UcsProfileResponse.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/response/UcsProfileResponse.java b/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/response/UcsProfileResponse.java
new file mode 100755
index 0000000..f49e104
--- /dev/null
+++ b/plugins/hypervisors/ucs/src/org/apache/cloudstack/api/response/UcsProfileResponse.java
@@ -0,0 +1,37 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+// 
+//   http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package org.apache.cloudstack.api.response;
+
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseResponse;
+
+import com.cloud.serializer.Param;
+import com.google.gson.annotations.SerializedName;
+
+public class UcsProfileResponse extends BaseResponse {
+    @SerializedName(ApiConstants.UCS_DN) @Param(description="ucs profile dn")
+    private String dn;
+
+    public String getDn() {
+        return dn;
+    }
+
+    public void setDn(String dn) {
+        this.dn = dn;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e44f812/tools/apidoc/gen_toc.py
----------------------------------------------------------------------
diff --git a/tools/apidoc/gen_toc.py b/tools/apidoc/gen_toc.py
index 6c08d17..33a7e75 100644
--- a/tools/apidoc/gen_toc.py
+++ b/tools/apidoc/gen_toc.py
@@ -152,7 +152,9 @@ known_categories = {
     'PortableIp': 'Portable IP',
     'dedicateHost': 'Dedicate Resources',
     'releaseDedicatedHost': 'Dedicate Resources',
-    'Baremetal' : 'Baremetal'
+    'Baremetal' : 'Baremetal',
+    'UCS' : 'UCS',
+    'Ucs' : 'UCS'
     }