You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/05/13 20:01:45 UTC
[54/96] [abbrv] git commit: updated refs/heads/ui-vpc-redesign to
9be3660
remove unwanted files
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5f0f1001
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5f0f1001
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5f0f1001
Branch: refs/heads/ui-vpc-redesign
Commit: 5f0f1001beec0c1d27e977b53242a44766569aa4
Parents: fa12175
Author: Nitin Mehta <ni...@citrix.com>
Authored: Sun May 12 14:30:10 2013 +0530
Committer: Nitin Mehta <ni...@citrix.com>
Committed: Sun May 12 14:30:10 2013 +0530
----------------------------------------------------------------------
api/src/com/cloud/network/NetworkService.java | 6 -
api/src/com/cloud/storage/VolumeApiService.java | 6 -
.../api/command/user/network/AddNicDetailCmd.java | 113 --------------
.../command/user/network/ListNicDetailsCmd.java | 77 ----------
.../command/user/network/RemoveNicDetailCmd.java | 117 ---------------
.../command/user/network/UpdateNicDetailCmd.java | 116 --------------
.../command/user/volume/AddVolumeDetailCmd.java | 115 --------------
.../command/user/volume/ListVolumeDetailsCmd.java | 82 ----------
.../command/user/volume/RemoveVolumeDetailCmd.java | 107 -------------
.../command/user/volume/UpdateVolumeDetailCmd.java | 115 --------------
.../org/apache/cloudstack/query/QueryService.java | 2 -
.../api/command/test/AddNicDetailCmdTest.java | 62 --------
.../api/command/test/AddVolumeDetailCmdTest.java | 62 --------
.../api/command/test/RemoveNicDetailCmdTest.java | 62 --------
.../command/test/RemoveVolumeDetailCmdTest.java | 63 --------
.../command/test/UpdateVolumeDetailCmdTest.java | 65 --------
.../api/command/test/updateNicDetailCmdTest.java | 62 --------
.../src/com/cloud/api/query/QueryManagerImpl.java | 29 ----
.../src/com/cloud/network/NetworkServiceImpl.java | 14 --
.../src/com/cloud/storage/VolumeManagerImpl.java | 59 --------
.../com/cloud/network/MockNetworkManagerImpl.java | 15 --
.../test/com/cloud/vpc/MockNetworkManagerImpl.java | 15 --
22 files changed, 0 insertions(+), 1364 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/src/com/cloud/network/NetworkService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/NetworkService.java b/api/src/com/cloud/network/NetworkService.java
index 2b4982a..4a6a84f 100755
--- a/api/src/com/cloud/network/NetworkService.java
+++ b/api/src/com/cloud/network/NetworkService.java
@@ -175,10 +175,4 @@ public interface NetworkService {
/* lists the nic informaton */
List<? extends Nic> listNics(ListNicsCmd listNicsCmd);
- void removeNicDetail(RemoveNicDetailCmd removeNicDetailCmd);
-
- void addNicDetail(AddNicDetailCmd cmd);
-
- void updateNicDetail(UpdateNicDetailCmd cmd);
-
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/src/com/cloud/storage/VolumeApiService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/storage/VolumeApiService.java b/api/src/com/cloud/storage/VolumeApiService.java
index 047d124..7e5ebe2 100644
--- a/api/src/com/cloud/storage/VolumeApiService.java
+++ b/api/src/com/cloud/storage/VolumeApiService.java
@@ -75,11 +75,5 @@ public interface VolumeApiService {
Volume detachVolumeFromVM(DetachVolumeCmd cmmd);
- void updateVolumeDetails(UpdateVolumeDetailCmd updateVolumeDetailCmd);
-
- void removeVolumeDetail(RemoveVolumeDetailCmd removeVolumeDetailCmd);
-
- void addVolumeDetail(AddVolumeDetailCmd addVolumeDetailCmd);
-
Volume updateVolume(UpdateVolumeCmd updateVolumeCmd);
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/src/org/apache/cloudstack/api/command/user/network/AddNicDetailCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/network/AddNicDetailCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/AddNicDetailCmd.java
deleted file mode 100644
index 230cd7e..0000000
--- a/api/src/org/apache/cloudstack/api/command/user/network/AddNicDetailCmd.java
+++ /dev/null
@@ -1,113 +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 org.apache.cloudstack.api.command.user.network;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.ApiErrorCode;
-import org.apache.cloudstack.api.BaseAsyncCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.NicResponse;
-import org.apache.cloudstack.api.response.SuccessResponse;
-import org.apache.cloudstack.api.response.UserVmResponse;
-import org.apache.cloudstack.api.response.VolumeResponse;
-import org.apache.log4j.Logger;
-
-import com.cloud.async.AsyncJob;
-import com.cloud.event.EventTypes;
-import com.cloud.storage.Volume;
-import com.cloud.user.Account;
-import com.cloud.user.UserContext;
-
-@APICommand(name = "addNicDetail", description="Adds detail for the volume.", since="4.2", responseObject=SuccessResponse.class)
-public class AddNicDetailCmd extends BaseAsyncCmd {
- public static final Logger s_logger = Logger.getLogger(AddNicDetailCmd.class.getName());
- private static final String s_name = "addNicDetailresponse";
-
- /////////////////////////////////////////////////////
- //////////////// API parameters /////////////////////
- /////////////////////////////////////////////////////
-
- @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=NicResponse.class,
- required=true, description="the ID of the nic")
- private Long id;
-
- @Parameter(name=ApiConstants.NAME, type=CommandType.STRING,
- required=true, description="the name of the field")
- private String name;
-
- @Parameter(name=ApiConstants.VALUE, type=CommandType.STRING,
- required=true, description="the value of the field")
- private String value;
-
- /////////////////////////////////////////////////////
- /////////////////// Accessors ///////////////////////
- /////////////////////////////////////////////////////
-
-
- public String getName() {
- return name;
- }
-
- public String getValue() {
- return value;
- }
-
- public Long getId() {
- return id;
- }
-
- /////////////////////////////////////////////////////
- /////////////// API Implementation///////////////////
- /////////////////////////////////////////////////////
-
- @Override
- public String getCommandName() {
- return s_name;
- }
-
- public AsyncJob.Type getInstanceType() {
- return AsyncJob.Type.Volume;
- }
-
- public Long getInstanceId() {
- return getId();
- }
-
- @Override
- public long getEntityOwnerId() {
- Account caller = UserContext.current().getCaller();
- return caller.getAccountId();
- }
-
- @Override
- public String getEventType() {
- return EventTypes.EVENT_NIC_CREATE;
- }
-
- @Override
- public String getEventDescription() {
- return "adding detail to the nic: " + getId();
- }
-
- @Override
- public void execute(){
- _networkService.addNicDetail(this);
- this.setResponseObject(new SuccessResponse(getCommandName()));
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/src/org/apache/cloudstack/api/command/user/network/ListNicDetailsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/network/ListNicDetailsCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/ListNicDetailsCmd.java
deleted file mode 100644
index 84f3589..0000000
--- a/api/src/org/apache/cloudstack/api/command/user/network/ListNicDetailsCmd.java
+++ /dev/null
@@ -1,77 +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 org.apache.cloudstack.api.command.user.network;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseListTaggedResourcesCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.response.*;
-import org.apache.log4j.Logger;
-
-import java.util.List;
-
-
-@APICommand(name = "listNicDetails", description="Lists all nic details.", responseObject=NicDetailResponse.class)
-public class ListNicDetailsCmd extends BaseListTaggedResourcesCmd {
- public static final Logger s_logger = Logger.getLogger(ListNicDetailsCmd.class.getName());
-
- private static final String s_name = "listnicdetailsresponse";
-
- /////////////////////////////////////////////////////
- //////////////// API parameters /////////////////////
- /////////////////////////////////////////////////////
-
- @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=NicResponse.class,
- required=true, description="the ID of the nic")
- private Long id;
-
- @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the nic detail")
- private String name;
-
- /////////////////////////////////////////////////////
- /////////////////// Accessors ///////////////////////
- /////////////////////////////////////////////////////
-
- public Long getId() {
- return id;
- }
-
- public String getName() {
- return name;
- }
-
- /////////////////////////////////////////////////////
- /////////////// API Implementation///////////////////
- /////////////////////////////////////////////////////
-
- @Override
- public String getCommandName() {
- return s_name;
- }
-
-
-
- @Override
- public void execute(){
- ListResponse<NicDetailResponse> responses = new ListResponse<NicDetailResponse>();
- List<NicDetailResponse> nicDetailList = _queryService.searchForNicDetails(this);
- responses.setResponses(nicDetailList);
- responses.setResponseName(getCommandName());
- this.setResponseObject(responses);
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/src/org/apache/cloudstack/api/command/user/network/RemoveNicDetailCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/network/RemoveNicDetailCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/RemoveNicDetailCmd.java
deleted file mode 100644
index abea515..0000000
--- a/api/src/org/apache/cloudstack/api/command/user/network/RemoveNicDetailCmd.java
+++ /dev/null
@@ -1,117 +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 removeitional 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.command.user.network;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.ApiErrorCode;
-import org.apache.cloudstack.api.BaseAsyncCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.NicResponse;
-import org.apache.cloudstack.api.response.SuccessResponse;
-import org.apache.cloudstack.api.response.UserVmResponse;
-import org.apache.cloudstack.api.response.VolumeResponse;
-import org.apache.log4j.Logger;
-
-import com.cloud.async.AsyncJob;
-import com.cloud.event.EventTypes;
-import com.cloud.storage.Volume;
-import com.cloud.user.Account;
-import com.cloud.user.UserContext;
-
-@APICommand(name = "removeNicDetail", description="Removes detail for the volume.", since="4.2", responseObject=SuccessResponse.class)
-public class RemoveNicDetailCmd extends BaseAsyncCmd {
- public static final Logger s_logger = Logger.getLogger(RemoveNicDetailCmd.class.getName());
- private static final String s_name = "removeNicDetailresponse";
-
- /////////////////////////////////////////////////////
- //////////////// API parameters /////////////////////
- /////////////////////////////////////////////////////
-
- @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=NicResponse.class,
- required=true, description="the ID of the nic")
- private Long id;
-
- @Parameter(name=ApiConstants.NAME, type=CommandType.STRING,
- required=false, description="the name of the field")
- private String name;
-
- @Parameter(name=ApiConstants.VALUE, type=CommandType.STRING,
- required=false, description="the value of the field")
- private String value;
-
- /////////////////////////////////////////////////////
- /////////////////// Accessors ///////////////////////
- /////////////////////////////////////////////////////
-
-
- public String getName() {
- return name;
- }
-
- public String getValue() {
- return value;
- }
-
- public Long getId() {
- return id;
- }
-
- /////////////////////////////////////////////////////
- /////////////// API Implementation///////////////////
- /////////////////////////////////////////////////////
-
- @Override
- public String getCommandName() {
- return s_name;
- }
-
- public AsyncJob.Type getInstanceType() {
- return AsyncJob.Type.Volume;
- }
-
- public Long getInstanceId() {
- return getId();
- }
-
- @Override
- public long getEntityOwnerId() {
- Volume volume = _responseGenerator.findVolumeById(getId());
- if (volume == null) {
- return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked
- }
- return volume.getAccountId();
- }
-
- @Override
- public String getEventType() {
- return EventTypes.EVENT_NIC_DETAIL_REMOVE;
- }
-
- @Override
- public String getEventDescription() {
- return "removing detail to the nic: " + getId();
- }
-
- @Override
- public void execute(){
- UserContext.current().setEventDetails("Nic Id: "+getId());
- _networkService.removeNicDetail(this);
- this.setResponseObject(new SuccessResponse(getCommandName()));
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/src/org/apache/cloudstack/api/command/user/network/UpdateNicDetailCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/network/UpdateNicDetailCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/UpdateNicDetailCmd.java
deleted file mode 100644
index 0e263e1..0000000
--- a/api/src/org/apache/cloudstack/api/command/user/network/UpdateNicDetailCmd.java
+++ /dev/null
@@ -1,116 +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 updateitional 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.command.user.network;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.ApiErrorCode;
-import org.apache.cloudstack.api.BaseAsyncCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.NicResponse;
-import org.apache.cloudstack.api.response.SuccessResponse;
-import org.apache.cloudstack.api.response.UserVmResponse;
-import org.apache.cloudstack.api.response.VolumeResponse;
-import org.apache.log4j.Logger;
-
-import com.cloud.async.AsyncJob;
-import com.cloud.event.EventTypes;
-import com.cloud.storage.Volume;
-import com.cloud.user.Account;
-import com.cloud.user.UserContext;
-
-@APICommand(name = "updateNicDetail", description="Updates detail for the nic.", since="4.2", responseObject=SuccessResponse.class)
-public class UpdateNicDetailCmd extends BaseAsyncCmd {
- public static final Logger s_logger = Logger.getLogger(UpdateNicDetailCmd.class.getName());
- private static final String s_name = "updateNicDetailresponse";
-
- /////////////////////////////////////////////////////
- //////////////// API parameters /////////////////////
- /////////////////////////////////////////////////////
-
- @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=NicResponse.class,
- required=true, description="the ID of the nic")
- private Long id;
-
- @Parameter(name=ApiConstants.NAME, type=CommandType.STRING,
- required=true, description="the name of the field")
- private String name;
-
- @Parameter(name=ApiConstants.VALUE, type=CommandType.STRING,
- required=true, description="the value of the field")
- private String value;
-
- /////////////////////////////////////////////////////
- /////////////////// Accessors ///////////////////////
- /////////////////////////////////////////////////////
-
-
- public String getName() {
- return name;
- }
-
- public String getValue() {
- return value;
- }
-
- public Long getId() {
- return id;
- }
-
- /////////////////////////////////////////////////////
- /////////////// API Implementation///////////////////
- /////////////////////////////////////////////////////
-
- @Override
- public String getCommandName() {
- return s_name;
- }
-
- public AsyncJob.Type getInstanceType() {
- return AsyncJob.Type.Volume;
- }
-
- public Long getInstanceId() {
- return getId();
- }
-
- @Override
- public long getEntityOwnerId() {
- Volume volume = _responseGenerator.findVolumeById(getId());
- if (volume == null) {
- return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked
- }
- return volume.getAccountId();
- }
-
- @Override
- public String getEventType() {
- return EventTypes.EVENT_VOLUME_ATTACH;
- }
-
- @Override
- public String getEventDescription() {
- return "updating detail to the nic: " + getId();
- }
-
- @Override
- public void execute(){
- _networkService.updateNicDetail(this);
- this.setResponseObject(new SuccessResponse(getCommandName()));
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/src/org/apache/cloudstack/api/command/user/volume/AddVolumeDetailCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/AddVolumeDetailCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/AddVolumeDetailCmd.java
deleted file mode 100644
index e9eff59..0000000
--- a/api/src/org/apache/cloudstack/api/command/user/volume/AddVolumeDetailCmd.java
+++ /dev/null
@@ -1,115 +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 org.apache.cloudstack.api.command.user.volume;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.ApiErrorCode;
-import org.apache.cloudstack.api.BaseAsyncCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.SuccessResponse;
-import org.apache.cloudstack.api.response.UserVmResponse;
-import org.apache.cloudstack.api.response.VolumeResponse;
-import org.apache.log4j.Logger;
-
-import com.cloud.async.AsyncJob;
-import com.cloud.event.EventTypes;
-import com.cloud.storage.Volume;
-import com.cloud.user.Account;
-import com.cloud.user.UserContext;
-
-@APICommand(name = "addVolumeDetail", description="Adds detail for the volume.", responseObject=SuccessResponse.class)
-public class AddVolumeDetailCmd extends BaseAsyncCmd {
- public static final Logger s_logger = Logger.getLogger(AddVolumeDetailCmd.class.getName());
- private static final String s_name = "addVolumeDetailresponse";
-
- /////////////////////////////////////////////////////
- //////////////// API parameters /////////////////////
- /////////////////////////////////////////////////////
-
- @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class,
- required=true, description="the ID of the disk volume")
- private Long id;
-
- @Parameter(name=ApiConstants.NAME, type=CommandType.STRING,
- required=true, description="the name of the field")
- private String name;
-
- @Parameter(name=ApiConstants.VALUE, type=CommandType.STRING,
- required=true, description="the value of the field")
- private String value;
-
- /////////////////////////////////////////////////////
- /////////////////// Accessors ///////////////////////
- /////////////////////////////////////////////////////
-
-
- public String getName() {
- return name;
- }
-
- public String getValue() {
- return value;
- }
-
- public Long getId() {
- return id;
- }
-
- /////////////////////////////////////////////////////
- /////////////// API Implementation///////////////////
- /////////////////////////////////////////////////////
-
- @Override
- public String getCommandName() {
- return s_name;
- }
-
- public AsyncJob.Type getInstanceType() {
- return AsyncJob.Type.Volume;
- }
-
- public Long getInstanceId() {
- return getId();
- }
-
- @Override
- public long getEntityOwnerId() {
- Volume volume = _responseGenerator.findVolumeById(getId());
- if (volume == null) {
- return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked
- }
- return volume.getAccountId();
- }
-
- @Override
- public String getEventType() {
- return EventTypes.EVENT_VOLUME_DETAIL_ADD;
- }
-
- @Override
- public String getEventDescription() {
- return "adding detail to the volume: " + getId();
- }
-
- @Override
- public void execute(){
- _volumeService.addVolumeDetail(this);
- this.setResponseObject(new SuccessResponse(getCommandName()));
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumeDetailsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumeDetailsCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumeDetailsCmd.java
deleted file mode 100644
index fc064cc..0000000
--- a/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumeDetailsCmd.java
+++ /dev/null
@@ -1,82 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package org.apache.cloudstack.api.command.user.volume;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.BaseListTaggedResourcesCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.response.*;
-import org.apache.log4j.Logger;
-
-import com.cloud.async.AsyncJob;
-
-import java.util.List;
-
-
-@APICommand(name = "listVolumeDetails", description="Lists all volume details.", responseObject=VolumeDetailResponse.class)
-public class ListVolumeDetailsCmd extends BaseListTaggedResourcesCmd {
- public static final Logger s_logger = Logger.getLogger(ListVolumeDetailsCmd.class.getName());
-
- private static final String s_name = "listvolumedetailsresponse";
-
- /////////////////////////////////////////////////////
- //////////////// API parameters /////////////////////
- /////////////////////////////////////////////////////
-
- @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class,
- required=true, description="the ID of the volume")
- private Long id;
-
- @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the volume detail")
- private String name;
-
- /////////////////////////////////////////////////////
- /////////////////// Accessors ///////////////////////
- /////////////////////////////////////////////////////
-
- public Long getId() {
- return id;
- }
-
- public String getName() {
- return name;
- }
-
- /////////////////////////////////////////////////////
- /////////////// API Implementation///////////////////
- /////////////////////////////////////////////////////
-
- @Override
- public String getCommandName() {
- return s_name;
- }
-
- @Override
- public AsyncJob.Type getInstanceType() {
- return AsyncJob.Type.Volume;
- }
-
- @Override
- public void execute(){
- ListResponse<VolumeDetailResponse> responses = new ListResponse<VolumeDetailResponse>();
- List<VolumeDetailResponse> volumeDetailList = _queryService.searchForVolumeDetails(this);
- responses.setResponses(volumeDetailList);
- responses.setResponseName(getCommandName());
- this.setResponseObject(responses);
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/src/org/apache/cloudstack/api/command/user/volume/RemoveVolumeDetailCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/RemoveVolumeDetailCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/RemoveVolumeDetailCmd.java
deleted file mode 100644
index 9e3c1c6..0000000
--- a/api/src/org/apache/cloudstack/api/command/user/volume/RemoveVolumeDetailCmd.java
+++ /dev/null
@@ -1,107 +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 org.apache.cloudstack.api.command.user.volume;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.ApiErrorCode;
-import org.apache.cloudstack.api.BaseAsyncCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.SuccessResponse;
-import org.apache.cloudstack.api.response.UserVmResponse;
-import org.apache.cloudstack.api.response.VolumeResponse;
-import org.apache.log4j.Logger;
-
-import com.cloud.async.AsyncJob;
-import com.cloud.event.EventTypes;
-import com.cloud.storage.Volume;
-import com.cloud.user.Account;
-import com.cloud.user.UserContext;
-
-@APICommand(name = "removeVolumeDetail", description="Remove a particular detail for the volume.", responseObject=VolumeResponse.class)
-public class RemoveVolumeDetailCmd extends BaseAsyncCmd {
- public static final Logger s_logger = Logger.getLogger(AttachVolumeCmd.class.getName());
- private static final String s_name = "removeVolumeDetailresponse";
-
- /////////////////////////////////////////////////////
- //////////////// API parameters /////////////////////
- /////////////////////////////////////////////////////
-
- @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class,
- required=true, description="the ID of the disk volume")
- private Long id;
-
- @Parameter(name=ApiConstants.NAME, type=CommandType.STRING,
- required=true, description="the name of the field")
- private String name;
-
- /////////////////////////////////////////////////////
- /////////////////// Accessors ///////////////////////
- /////////////////////////////////////////////////////
-
-
- public String getName() {
- return name;
- }
-
- public Long getId() {
- return id;
- }
-
- /////////////////////////////////////////////////////
- /////////////// API Implementation///////////////////
- /////////////////////////////////////////////////////
-
- @Override
- public String getCommandName() {
- return s_name;
- }
-
- public AsyncJob.Type getInstanceType() {
- return AsyncJob.Type.Volume;
- }
-
- public Long getInstanceId() {
- return getId();
- }
-
- @Override
- public long getEntityOwnerId() {
- Volume volume = _responseGenerator.findVolumeById(getId());
- if (volume == null) {
- return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked
- }
- return volume.getAccountId();
- }
-
- @Override
- public String getEventType() {
- return EventTypes.EVENT_VOLUME_ATTACH;
- }
-
- @Override
- public String getEventDescription() {
- return "adding detail to the volume: " + getId();
- }
-
- @Override
- public void execute(){
- _volumeService.removeVolumeDetail(this);
- this.setResponseObject(new SuccessResponse(getCommandName()));
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeDetailCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeDetailCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeDetailCmd.java
deleted file mode 100644
index 8a43c6e..0000000
--- a/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeDetailCmd.java
+++ /dev/null
@@ -1,115 +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 org.apache.cloudstack.api.command.user.volume;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.ApiErrorCode;
-import org.apache.cloudstack.api.BaseAsyncCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.SuccessResponse;
-import org.apache.cloudstack.api.response.UserVmResponse;
-import org.apache.cloudstack.api.response.VolumeResponse;
-import org.apache.log4j.Logger;
-
-import com.cloud.async.AsyncJob;
-import com.cloud.event.EventTypes;
-import com.cloud.storage.Volume;
-import com.cloud.user.Account;
-import com.cloud.user.UserContext;
-
-@APICommand(name = "updateVolumeDetail", description="Updates the volume detail.", responseObject=VolumeResponse.class)
-public class UpdateVolumeDetailCmd extends BaseAsyncCmd {
- public static final Logger s_logger = Logger.getLogger(AttachVolumeCmd.class.getName());
- private static final String s_name = "updateVolumeDetailresponse";
-
- /////////////////////////////////////////////////////
- //////////////// API parameters /////////////////////
- /////////////////////////////////////////////////////
-
- @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class,
- required=true, description="the ID of the disk volume")
- private Long id;
-
- @Parameter(name=ApiConstants.NAME, type=CommandType.STRING,
- required=true, description="the name of the field")
- private String name;
-
- @Parameter(name=ApiConstants.VALUE, type=CommandType.STRING, entityType=UserVmResponse.class,
- required=true, description="the value of the field")
- private String value;
-
- /////////////////////////////////////////////////////
- /////////////////// Accessors ///////////////////////
- /////////////////////////////////////////////////////
-
-
- public String getName() {
- return name;
- }
-
- public String getValue() {
- return value;
- }
-
- public Long getId() {
- return id;
- }
-
- /////////////////////////////////////////////////////
- /////////////// API Implementation///////////////////
- /////////////////////////////////////////////////////
-
- @Override
- public String getCommandName() {
- return s_name;
- }
-
- public AsyncJob.Type getInstanceType() {
- return AsyncJob.Type.Volume;
- }
-
- public Long getInstanceId() {
- return getId();
- }
-
- @Override
- public long getEntityOwnerId() {
- Volume volume = _responseGenerator.findVolumeById(getId());
- if (volume == null) {
- return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked
- }
- return volume.getAccountId();
- }
-
- @Override
- public String getEventType() {
- return EventTypes.EVENT_VOLUME_ATTACH;
- }
-
- @Override
- public String getEventDescription() {
- return "updating detail to the volume: " + getId();
- }
-
- @Override
- public void execute(){
- _volumeService.updateVolumeDetails(this);
- this.setResponseObject(new SuccessResponse(getCommandName()));
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/src/org/apache/cloudstack/query/QueryService.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/query/QueryService.java b/api/src/org/apache/cloudstack/query/QueryService.java
index 9eada21..7ab2c19 100644
--- a/api/src/org/apache/cloudstack/query/QueryService.java
+++ b/api/src/org/apache/cloudstack/query/QueryService.java
@@ -90,8 +90,6 @@ public interface QueryService {
public ListResponse<AffinityGroupResponse> listAffinityGroups(Long affinityGroupId, String affinityGroupName,
String affinityGroupType, Long vmId, Long startIndex, Long pageSize);
- public List<VolumeDetailResponse> searchForVolumeDetails(ListVolumeDetailsCmd cmd);
-
List<NicDetailResponse> searchForNicDetails(ListNicDetailsCmd ListNicDetailsCmd);
public List<ResourceDetailResponse> listResource(ListResourceDetailsCmd cmd);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/test/org/apache/cloudstack/api/command/test/AddNicDetailCmdTest.java
----------------------------------------------------------------------
diff --git a/api/test/org/apache/cloudstack/api/command/test/AddNicDetailCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/AddNicDetailCmdTest.java
deleted file mode 100644
index 6c43fd8..0000000
--- a/api/test/org/apache/cloudstack/api/command/test/AddNicDetailCmdTest.java
+++ /dev/null
@@ -1,62 +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 org.apache.cloudstack.api.command.test;
-
-import com.cloud.network.NetworkService;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import org.apache.cloudstack.api.ResponseGenerator;
-
-import org.apache.cloudstack.api.command.user.network.AddNicDetailCmd;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.mockito.Mockito;
-import static org.mockito.Mockito.*;
-
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
-
-public class AddNicDetailCmdTest extends TestCase{
-
- private AddNicDetailCmd addNicDetailCmd;
- private ResponseGenerator responseGenerator;
-
- @Rule
- public ExpectedException expectedException = ExpectedException.none();
-
- @Before
- public void setUp() {
-
- addNicDetailCmd = new AddNicDetailCmd();
-
- }
-
-
- @Test
- public void testCreateSuccess() {
-
- NetworkService networkService = Mockito.mock(NetworkService.class);
- doNothing().when(networkService).addNicDetail(addNicDetailCmd);
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/test/org/apache/cloudstack/api/command/test/AddVolumeDetailCmdTest.java
----------------------------------------------------------------------
diff --git a/api/test/org/apache/cloudstack/api/command/test/AddVolumeDetailCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/AddVolumeDetailCmdTest.java
deleted file mode 100644
index d501439..0000000
--- a/api/test/org/apache/cloudstack/api/command/test/AddVolumeDetailCmdTest.java
+++ /dev/null
@@ -1,62 +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 org.apache.cloudstack.api.command.test;
-
-import com.cloud.storage.VolumeApiService;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import org.apache.cloudstack.api.ResponseGenerator;
-
-import org.apache.cloudstack.api.command.user.volume.AddVolumeDetailCmd;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.mockito.Mockito;
-import static org.mockito.Mockito.*;
-
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
-
-public class AddVolumeDetailCmdTest extends TestCase{
-
- private AddVolumeDetailCmd addVolumeDetailCmd;
- private ResponseGenerator responseGenerator;
-
- @Rule
- public ExpectedException expectedException = ExpectedException.none();
-
- @Before
- public void setUp() {
-
- addVolumeDetailCmd = new AddVolumeDetailCmd();
-
- }
-
-
- @Test
- public void testCreateSuccess() {
-
- VolumeApiService volumeService = Mockito.mock(VolumeApiService.class);
- doNothing().when(volumeService).addVolumeDetail(addVolumeDetailCmd);
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/test/org/apache/cloudstack/api/command/test/RemoveNicDetailCmdTest.java
----------------------------------------------------------------------
diff --git a/api/test/org/apache/cloudstack/api/command/test/RemoveNicDetailCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/RemoveNicDetailCmdTest.java
deleted file mode 100644
index 607255c..0000000
--- a/api/test/org/apache/cloudstack/api/command/test/RemoveNicDetailCmdTest.java
+++ /dev/null
@@ -1,62 +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 removeitional 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.command.test;
-
-import com.cloud.network.NetworkService;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import org.apache.cloudstack.api.ResponseGenerator;
-
-import org.apache.cloudstack.api.command.user.network.RemoveNicDetailCmd;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.mockito.Mockito;
-import static org.mockito.Mockito.*;
-
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
-
-public class RemoveNicDetailCmdTest extends TestCase{
-
- private RemoveNicDetailCmd removeNicDetailCmd;
- private ResponseGenerator responseGenerator;
-
- @Rule
- public ExpectedException expectedException = ExpectedException.none();
-
- @Before
- public void setUp() {
-
- removeNicDetailCmd = new RemoveNicDetailCmd();
-
- }
-
-
- @Test
- public void testCreateSuccess() {
-
- NetworkService networkService = Mockito.mock(NetworkService.class);
- doNothing().when(networkService).removeNicDetail(removeNicDetailCmd);
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/test/org/apache/cloudstack/api/command/test/RemoveVolumeDetailCmdTest.java
----------------------------------------------------------------------
diff --git a/api/test/org/apache/cloudstack/api/command/test/RemoveVolumeDetailCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/RemoveVolumeDetailCmdTest.java
deleted file mode 100644
index 12ae812..0000000
--- a/api/test/org/apache/cloudstack/api/command/test/RemoveVolumeDetailCmdTest.java
+++ /dev/null
@@ -1,63 +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 org.apache.cloudstack.api.command.test;
-
-import com.cloud.storage.VolumeApiService;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import org.apache.cloudstack.api.ResponseGenerator;
-
-import org.apache.cloudstack.api.command.user.volume.AddVolumeDetailCmd;
-import org.apache.cloudstack.api.command.user.volume.RemoveVolumeDetailCmd;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.mockito.Mockito;
-import static org.mockito.Mockito.*;
-
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
-
-public class RemoveVolumeDetailCmdTest extends TestCase{
-
- private RemoveVolumeDetailCmd removeVolumeDetailCmd;
- private ResponseGenerator responseGenerator;
-
- @Rule
- public ExpectedException expectedException = ExpectedException.none();
-
- @Before
- public void setUp() {
-
- removeVolumeDetailCmd = new RemoveVolumeDetailCmd();
-
- }
-
-
- @Test
- public void testCreateSuccess() {
-
- VolumeApiService volumeService = Mockito.mock(VolumeApiService.class);
- doNothing().when(volumeService).removeVolumeDetail(removeVolumeDetailCmd);
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/test/org/apache/cloudstack/api/command/test/UpdateVolumeDetailCmdTest.java
----------------------------------------------------------------------
diff --git a/api/test/org/apache/cloudstack/api/command/test/UpdateVolumeDetailCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/UpdateVolumeDetailCmdTest.java
deleted file mode 100644
index 1a3bada..0000000
--- a/api/test/org/apache/cloudstack/api/command/test/UpdateVolumeDetailCmdTest.java
+++ /dev/null
@@ -1,65 +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 org.apache.cloudstack.api.command.test;
-
-import com.cloud.storage.VolumeApiService;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import org.apache.cloudstack.api.ResponseGenerator;
-
-import org.apache.cloudstack.api.command.user.volume.UpdateVolumeDetailCmd;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.mockito.Mockito;
-import static org.mockito.Mockito.*;
-
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
-
-public class UpdateVolumeDetailCmdTest extends TestCase{
-
- private UpdateVolumeDetailCmd updateVolumeDetailCmd;
- private ResponseGenerator responseGenerator;
-
- @Rule
- public ExpectedException expectedException = ExpectedException.none();
-
- @Before
- public void setUp() {
-
- updateVolumeDetailCmd = new UpdateVolumeDetailCmd();
-
- //Account account = new AccountVO("testaccount", 1L, "networkdomain", (short) 0, "uuid");
- //UserContext.registerContext(1, account, null, true);
-
- }
-
-
- @Test
- public void testCreateSuccess() {
-
- VolumeApiService volumeService = Mockito.mock(VolumeApiService.class);
- doNothing().when(volumeService).updateVolumeDetails(updateVolumeDetailCmd);
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/api/test/org/apache/cloudstack/api/command/test/updateNicDetailCmdTest.java
----------------------------------------------------------------------
diff --git a/api/test/org/apache/cloudstack/api/command/test/updateNicDetailCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/updateNicDetailCmdTest.java
deleted file mode 100644
index 7143e2c..0000000
--- a/api/test/org/apache/cloudstack/api/command/test/updateNicDetailCmdTest.java
+++ /dev/null
@@ -1,62 +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 updateitional 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.command.test;
-
-import com.cloud.network.NetworkService;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import org.apache.cloudstack.api.ResponseGenerator;
-
-import org.apache.cloudstack.api.command.user.network.UpdateNicDetailCmd;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.mockito.Mockito;
-import static org.mockito.Mockito.*;
-
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
-
-public class updateNicDetailCmdTest extends TestCase{
-
- private UpdateNicDetailCmd updateNicDetailCmd;
- private ResponseGenerator responseGenerator;
-
- @Rule
- public ExpectedException expectedException = ExpectedException.none();
-
- @Before
- public void setUp() {
-
- updateNicDetailCmd = new UpdateNicDetailCmd();
-
- }
-
-
- @Test
- public void testCreateSuccess() {
-
- NetworkService networkService = Mockito.mock(NetworkService.class);
- doNothing().when(networkService).updateNicDetail(updateNicDetailCmd);
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/server/src/com/cloud/api/query/QueryManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java
index 6c1406a..ebf9cac 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -1533,35 +1533,6 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
}
@Override
- public List<VolumeDetailResponse> searchForVolumeDetails(ListVolumeDetailsCmd cmd){
-
- Long id = cmd.getId();
- String name = cmd.getName();
-
- List<VolumeDetailVO> volumeDetailList;
- if(name == null){
- volumeDetailList = _volumeDetailDao.findDetails(id);
- }else{
- VolumeDetailVO volumeDetail = _volumeDetailDao.findDetail(id, name);
- volumeDetailList = new LinkedList<VolumeDetailVO>();
- volumeDetailList.add(volumeDetail);
- }
-
- List<VolumeDetailResponse> volumeDetailResponseList = new ArrayList<VolumeDetailResponse>();
- for (VolumeDetailVO volumeDetail : volumeDetailList ){
- VolumeDetailResponse volumeDetailResponse = new VolumeDetailResponse();
- String uuid = ApiDBUtils.findVolumeById(id).getUuid();
- volumeDetailResponse.setId(uuid);
- volumeDetailResponse.setName(volumeDetail.getName());
- volumeDetailResponse.setValue(volumeDetail.getValue());
- volumeDetailResponse.setObjectName("volumedetail");
- volumeDetailResponseList.add(volumeDetailResponse);
- }
-
- return volumeDetailResponseList;
- }
-
- @Override
public List<NicDetailResponse> searchForNicDetails(ListNicDetailsCmd cmd){
Long id = cmd.getId();
String name = cmd.getName();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java
index 85fa979..addd853 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -3836,18 +3836,4 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
return _networkMgr.listVmNics(vmId, nicId);
}
- @Override
- public void removeNicDetail(RemoveNicDetailCmd removeNicDetailCmd) {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- @Override
- public void addNicDetail(AddNicDetailCmd addNicDetailCmd) {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- @Override
- public void updateNicDetail(UpdateNicDetailCmd updateNicDetailCmd) {
- //To change body of implemented methods use File | Settings | File Templates.
- }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/server/src/com/cloud/storage/VolumeManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeManagerImpl.java b/server/src/com/cloud/storage/VolumeManagerImpl.java
index 356f676..2f4b2c8 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -1793,65 +1793,6 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
return volume;
}
- @Override
- @ActionEvent(eventType = EventTypes.EVENT_VOLUME_DETAIL_UPDATE, eventDescription = "updating volume detail", async = true)
- public void updateVolumeDetails(UpdateVolumeDetailCmd cmd){
- UserContext.current().setEventDetails("Volume Id: "+cmd.getId());
- Account caller = UserContext.current().getCaller();
- Long volumeId = cmd.getId();
- String name = cmd.getName();
- String value = cmd.getValue();
-
- VolumeVO volume = _volsDao.findById(volumeId);
- _accountMgr.checkAccess(caller, null, true, volume);
- VolumeDetailVO volDetail = _volDetailDao.findDetail(volumeId, name);
- if(volDetail != null){
- volDetail.setValue(value);
- _volDetailDao.update(volDetail.getId(), volDetail);
- }else{
- throw new InvalidParameterValueException("This detail doesnt exist for the volume ");
- }
-
- }
-
-
- @Override
- @ActionEvent(eventType = EventTypes.EVENT_VOLUME_DETAIL_REMOVE, eventDescription = "removing volume detail", async = true)
- public void removeVolumeDetail(RemoveVolumeDetailCmd cmd){
- UserContext.current().setEventDetails("Volume Id: "+cmd.getId());
- Account caller = UserContext.current().getCaller();
- Long volumeId = cmd.getId();
- String name = cmd.getName();
-
- VolumeVO volume = _volsDao.findById(volumeId);
- _accountMgr.checkAccess(caller, null, true, volume);
- VolumeDetailVO volDetail = _volDetailDao.findDetail(volumeId, name);
- if(volDetail != null){
- _volDetailDao.remove(volDetail.getId());
- }else{
- throw new InvalidParameterValueException("This detail doesnt exist for the volume ");
- }
-
- }
-
-
- @Override
- @ActionEvent(eventType = EventTypes.EVENT_VOLUME_DETAIL_ADD, eventDescription = "adding volume detail", async = true)
- public void addVolumeDetail(AddVolumeDetailCmd cmd){
-
- Account caller = UserContext.current().getCaller();
- UserContext.current().setEventDetails("Volume Id: "+ cmd.getId());
-
- Long volumeId = cmd.getId();
- String name = cmd.getName();
- String value = cmd.getValue();
-
- VolumeVO volume = _volsDao.findById(volumeId);
- _accountMgr.checkAccess(caller, null, true, volume);
- VolumeDetailVO volDetail = new VolumeDetailVO(volumeId, name, value);
- _volDetailDao.persist(volDetail);
- }
-
@Override
@ActionEvent(eventType = EventTypes.EVENT_VOLUME_DETACH, eventDescription = "detaching volume", async = true)
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/server/test/com/cloud/network/MockNetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/network/MockNetworkManagerImpl.java b/server/test/com/cloud/network/MockNetworkManagerImpl.java
index 19b6aa1..cfd7149 100755
--- a/server/test/com/cloud/network/MockNetworkManagerImpl.java
+++ b/server/test/com/cloud/network/MockNetworkManagerImpl.java
@@ -897,21 +897,6 @@ public class MockNetworkManagerImpl extends ManagerBase implements NetworkManage
}
@Override
- public void removeNicDetail(RemoveNicDetailCmd removeNicDetailCmd) {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- @Override
- public void addNicDetail(AddNicDetailCmd addNicDetailCmd) {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- @Override
- public void updateNicDetail(UpdateNicDetailCmd updateNicDetailCmd) {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- @Override
public String allocatePublicIpForGuestNic(Long networkId, DataCenter dc,
Pod pod, Account caller, String requestedIp)
throws InsufficientAddressCapacityException {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f0f1001/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vpc/MockNetworkManagerImpl.java b/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
index 0b1de60..5d19cf4 100644
--- a/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
+++ b/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
@@ -1407,21 +1407,6 @@ public class MockNetworkManagerImpl extends ManagerBase implements NetworkManage
return null;
}
- @Override
- public void removeNicDetail(RemoveNicDetailCmd removeNicDetailCmd) {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- @Override
- public void addNicDetail(AddNicDetailCmd addNicDetailCmd) {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- @Override
- public void updateNicDetail(UpdateNicDetailCmd updateNicDetailCmd) {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
@Override
public String allocatePublicIpForGuestNic(Long networkId, DataCenter dc,