cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From frankzh...@apache.org
Subject git commit: updated refs/heads/4.5 to 1b535e2
Date Mon, 27 Oct 2014 23:49:02 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 1b0a0d68f -> 1b535e20e


fixing build because missig ListBaremetalRctCmd


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

Branch: refs/heads/4.5
Commit: 1b535e20e6ef0ff14e0bbaa6dc4813b93d6317e4
Parents: 1b0a0d6
Author: Frank Zhang <frank.zhang@citrix.com>
Authored: Mon Oct 27 16:52:05 2014 -0700
Committer: Frank Zhang <frank.zhang@citrix.com>
Committed: Mon Oct 27 16:52:05 2014 -0700

----------------------------------------------------------------------
 .../cloudstack/api/ListBaremetalRctCmd.java     | 69 ++++++++++++++++++++
 1 file changed, 69 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b535e20/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/ListBaremetalRctCmd.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/ListBaremetalRctCmd.java
b/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/ListBaremetalRctCmd.java
new file mode 100755
index 0000000..3a69f3c
--- /dev/null
+++ b/plugins/hypervisors/baremetal/src/org/apache/cloudstack/api/ListBaremetalRctCmd.java
@@ -0,0 +1,69 @@
+// 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 com.cloud.baremetal.manager.BaremetalVlanManager;
+import com.cloud.baremetal.networkservice.BaremetalRctResponse;
+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 org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+
+@APICommand(name = "listBaremetalRct", description = "list baremetal rack configuration",
responseObject = BaremetalRctResponse.class,
+        requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, authorized = {RoleType.Admin})
+public class ListBaremetalRctCmd extends BaseListCmd {
+    private static final Logger s_logger = Logger.getLogger(ListBaremetalRctCmd.class);
+    private static final String s_name = "listbaremetalrctresponse";
+    @Inject
+    BaremetalVlanManager vlanMgr;
+
+    @Override
+    public void execute() throws ResourceUnavailableException, InsufficientCapacityException,
ServerApiException, ConcurrentOperationException,
+        ResourceAllocationException, NetworkRuleConflictException {
+        try {
+            ListResponse<BaremetalRctResponse> response = new ListResponse<>();
+            List<BaremetalRctResponse> rctResponses = new ArrayList<>();
+            BaremetalRctResponse rsp = vlanMgr.listRct();
+            if (rsp != null) {
+                rctResponses.add(rsp);
+            }
+            response.setResponses(rctResponses);
+            response.setResponseName(getCommandName());
+            response.setObjectName("baremetalrcts");
+            this.setResponseObject(response);
+        } catch (Exception e) {
+            s_logger.debug("Exception happened while executing ListBaremetalRctCmd", e);
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
+        }
+    }
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+}


Mime
View raw message