Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E349B11A65 for ; Sat, 11 May 2013 09:59:53 +0000 (UTC) Received: (qmail 8119 invoked by uid 500); 11 May 2013 09:59:42 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 7804 invoked by uid 500); 11 May 2013 09:59:36 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 4754 invoked by uid 99); 11 May 2013 09:59:30 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 May 2013 09:59:30 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 2869A88C115; Sat, 11 May 2013 09:59:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: nitin@apache.org To: commits@cloudstack.apache.org Date: Sat, 11 May 2013 10:00:10 -0000 Message-Id: <9dff37706b5b4660b762d18fc6831fca@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [45/51] [partial] merge master http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/routing/Site2SiteVpnCfgCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/routing/Site2SiteVpnCfgCommand.java b/api/src/com/cloud/agent/api/routing/Site2SiteVpnCfgCommand.java deleted file mode 100644 index 8316303..0000000 --- a/api/src/com/cloud/agent/api/routing/Site2SiteVpnCfgCommand.java +++ /dev/null @@ -1,154 +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.agent.api.routing; - -public class Site2SiteVpnCfgCommand extends NetworkElementCommand { - - private boolean create; - private String localPublicIp; - private String localGuestCidr; - private String localPublicGateway; - private String peerGatewayIp; - private String peerGuestCidrList; - private String ipsecPsk; - private String ikePolicy; - private String espPolicy; - private long ikeLifetime; - private long espLifetime; - private boolean dpd; - - @Override - public boolean executeInSequence() { - return true; - } - - public Site2SiteVpnCfgCommand () { - this.create = false; - } - - public Site2SiteVpnCfgCommand (boolean create, String localPublicIp, String localPublicGateway, String localGuestCidr, String peerGatewayIp, - String peerGuestCidrList, String ikePolicy, String espPolicy, String ipsecPsk, Long ikeLifetime, Long espLifetime, Boolean dpd) { - this.create = create; - this.setLocalPublicIp(localPublicIp); - this.setLocalPublicGateway(localPublicGateway); - this.setLocalGuestCidr(localGuestCidr); - this.setPeerGatewayIp(peerGatewayIp); - this.setPeerGuestCidrList(peerGuestCidrList); - this.ipsecPsk = ipsecPsk; - this.ikePolicy = ikePolicy; - this.espPolicy = espPolicy; - this.ikeLifetime = ikeLifetime; - this.espLifetime = espLifetime; - this.dpd = dpd; - } - - public boolean isCreate() { - return create; - } - - public void setCreate(boolean create) { - this.create = create; - } - - public String getIpsecPsk() { - return ipsecPsk; - } - - public void setIpsecPsk(String ipsecPsk) { - this.ipsecPsk = ipsecPsk; - } - - public String getIkePolicy() { - return ikePolicy; - } - - public void setIkePolicy(String ikePolicy) { - this.ikePolicy = ikePolicy; - } - - public String getEspPolicy() { - return espPolicy; - } - - public void setEspPolicy(String espPolicy) { - this.espPolicy = espPolicy; - } - - public long getIkeLifetime() { - return ikeLifetime; - } - - public void setikeLifetime(long ikeLifetime) { - this.ikeLifetime = ikeLifetime; - } - - public long getEspLifetime() { - return espLifetime; - } - - public void setEspLifetime(long espLifetime) { - this.espLifetime = espLifetime; - } - - public Boolean getDpd() { - return dpd; - } - - public void setDpd(Boolean dpd) { - this.dpd = dpd; - } - - public String getLocalPublicIp() { - return localPublicIp; - } - - public void setLocalPublicIp(String localPublicIp) { - this.localPublicIp = localPublicIp; - } - - public String getLocalGuestCidr() { - return localGuestCidr; - } - - public void setLocalGuestCidr(String localGuestCidr) { - this.localGuestCidr = localGuestCidr; - } - - public String getLocalPublicGateway() { - return localPublicGateway; - } - - public void setLocalPublicGateway(String localPublicGateway) { - this.localPublicGateway = localPublicGateway; - } - - public String getPeerGatewayIp() { - return peerGatewayIp; - } - - public void setPeerGatewayIp(String peerGatewayIp) { - this.peerGatewayIp = peerGatewayIp; - } - - public String getPeerGuestCidrList() { - return peerGuestCidrList; - } - - public void setPeerGuestCidrList(String peerGuestCidrList) { - this.peerGuestCidrList = peerGuestCidrList; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/routing/SiteLoadBalancerConfig.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/routing/SiteLoadBalancerConfig.java b/api/src/com/cloud/agent/api/routing/SiteLoadBalancerConfig.java deleted file mode 100644 index cca5de8..0000000 --- a/api/src/com/cloud/agent/api/routing/SiteLoadBalancerConfig.java +++ /dev/null @@ -1,121 +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.agent.api.routing; - -// details of site participating in the GLSB service, represents configuration load balancer rule and the zone -// in which the rule is configured -public class SiteLoadBalancerConfig { - - // true if the site details are local to the zone receiving 'GlobalLoadBalancerConfigCommand' - boolean local; - - // true if the site needs to be removed from GSLB service - boolean revoked; - - // service type of the 'site load balanced' service - String serviceType; - - // public IP corresponding to the site load balanced service - String servicePublicIp; - - // port corresponding to the site load balanced service - String servicePort; - - // Private IP corresponding to the GSLB service provider in the site. - String gslbProviderPrivateIp; - - // Public IP corresponding to the GSLB service provider in the site. - String gslbProviderPublicIp; - - // zone id in which site is located - long dataCenterId; - - public SiteLoadBalancerConfig(boolean revoked, String serviceType, String servicePublicIp, String servicePort, - long dataCenterId) { - this.revoked = revoked; - this.serviceType = serviceType; - this.servicePublicIp = servicePublicIp; - this.servicePort = servicePort; - this.dataCenterId = dataCenterId; - } - - public SiteLoadBalancerConfig(String gslbProviderPublicIP, String gslbProviderPrivateIp, boolean local, - boolean revoked, String serviceType, String servicePublicIp, String port, - long dataCenterId) { - this(revoked, serviceType, servicePublicIp, port, dataCenterId); - this.gslbProviderPrivateIp = gslbProviderPrivateIp; - this.gslbProviderPublicIp = gslbProviderPublicIP; - this.local = local; - } - - public String getServiceType() { - return serviceType; - } - - public void setServiceType(String serviceType) { - this.serviceType = serviceType; - } - - public String getServicePublicIp() { - return servicePublicIp; - } - - public void SetServicePublicIp(String servicePublicIp) { - this.servicePublicIp = servicePublicIp; - } - - public String getServicePort() { - return servicePort; - } - - public void setServicePort(String port) { - this.servicePort = port; - } - - public String getGslbProviderPrivateIp() { - return gslbProviderPrivateIp; - } - - public void setGslbProviderPrivateIp(String privateIp) { - this.gslbProviderPrivateIp = privateIp; - } - - public String getGslbProviderPublicIp() { - return gslbProviderPublicIp; - } - - public long getDataCenterId() { - return dataCenterId; - } - - public void setGslbProviderPublicIp(String publicIp) { - this.gslbProviderPublicIp = publicIp; - } - - public boolean isLocal() { - return local; - } - - public void setLocal(boolean local) { - this.local = local; - } - - public boolean forRevoke() { - return revoked; - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/routing/UserDataCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/routing/UserDataCommand.java b/api/src/com/cloud/agent/api/routing/UserDataCommand.java deleted file mode 100644 index f7b38c8..0000000 --- a/api/src/com/cloud/agent/api/routing/UserDataCommand.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 com.cloud.agent.api.routing; - - -public class UserDataCommand extends NetworkElementCommand { - - String userData; - String vmIpAddress; - String routerPrivateIpAddress; - String vmName; - - protected UserDataCommand() { - - } - - @Override - public boolean executeInSequence() { - return true; - } - - public UserDataCommand(String userData, String vmIpAddress, String routerPrivateIpAddress, String vmName) { - this.userData = userData; - this.vmIpAddress = vmIpAddress; - this.routerPrivateIpAddress = routerPrivateIpAddress; - this.vmName = vmName; - } - - public String getRouterPrivateIpAddress() { - return routerPrivateIpAddress; - } - - public String getVmIpAddress() { - return vmIpAddress; - } - - public String getVmName() { - return vmName; - } - - public String getUserData() { - return userData; - } - - public void setUserData(String userData) { - this.userData = userData; - } - -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/routing/VmDataCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/routing/VmDataCommand.java b/api/src/com/cloud/agent/api/routing/VmDataCommand.java deleted file mode 100644 index df88255..0000000 --- a/api/src/com/cloud/agent/api/routing/VmDataCommand.java +++ /dev/null @@ -1,67 +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.agent.api.routing; - -import java.util.ArrayList; -import java.util.List; - -import com.cloud.agent.api.LogLevel; -import com.cloud.agent.api.LogLevel.Log4jLevel; - -public class VmDataCommand extends NetworkElementCommand { - - String vmIpAddress; - String vmName; - @LogLevel(Log4jLevel.Trace) - List vmData; - - protected VmDataCommand() { - } - - @Override - public boolean executeInSequence() { - return true; - } - - public VmDataCommand(String vmIpAddress) { - this(vmIpAddress, null); - } - - public String getVmName() { - return vmName; - } - - public VmDataCommand(String vmIpAddress, String vmName) { - this.vmName = vmName; - this.vmIpAddress = vmIpAddress; - this.vmData = new ArrayList(); - } - - - public String getVmIpAddress() { - return vmIpAddress; - } - - public List getVmData() { - return vmData; - } - - public void addVmData(String folder, String file, String contents) { - vmData.add(new String[]{folder, file, contents}); - } - -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/routing/VpnUsersCfgCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/routing/VpnUsersCfgCommand.java b/api/src/com/cloud/agent/api/routing/VpnUsersCfgCommand.java deleted file mode 100644 index ebe725d..0000000 --- a/api/src/com/cloud/agent/api/routing/VpnUsersCfgCommand.java +++ /dev/null @@ -1,94 +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.agent.api.routing; -import java.util.List; - -import com.cloud.agent.api.LogLevel; -import com.cloud.agent.api.LogLevel.Log4jLevel; -import com.cloud.network.VpnUser; - - -public class VpnUsersCfgCommand extends NetworkElementCommand { - public static class UsernamePassword{ - private String username; - @LogLevel(Log4jLevel.Off) - private String password; - boolean add = true; - - public boolean isAdd() { - return add; - } - public void setAdd(boolean add) { - this.add = add; - } - 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; - } - public UsernamePassword(String username, String password) { - super(); - this.username = username; - this.password = password; - } - public UsernamePassword(String username, String password, boolean add) { - super(); - this.username = username; - this.password = password; - this.add = add; - } - protected UsernamePassword() { - //for Gson - } - public String getUsernamePassword() { - return getUsername() + "," + getPassword(); - } - } - UsernamePassword [] userpwds; - - protected VpnUsersCfgCommand() { - - } - - public VpnUsersCfgCommand(List addUsers, List removeUsers) { - userpwds = new UsernamePassword[addUsers.size() + removeUsers.size()]; - int i = 0; - for (VpnUser vpnUser: removeUsers) { - userpwds[i++] = new UsernamePassword(vpnUser.getUsername(), vpnUser.getPassword(), false); - } - for (VpnUser vpnUser: addUsers) { - userpwds[i++] = new UsernamePassword(vpnUser.getUsername(), vpnUser.getPassword(), true); - } - } - - @Override - public boolean executeInSequence() { - return true; - } - - public UsernamePassword[] getUserpwds() { - return userpwds; - } - -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/AbstractDownloadCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/AbstractDownloadCommand.java b/api/src/com/cloud/agent/api/storage/AbstractDownloadCommand.java deleted file mode 100644 index 04b3d43..0000000 --- a/api/src/com/cloud/agent/api/storage/AbstractDownloadCommand.java +++ /dev/null @@ -1,78 +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.agent.api.storage; - -import com.cloud.storage.Storage.ImageFormat; - -public abstract class AbstractDownloadCommand extends ssCommand { - - private String url; - private ImageFormat format; - private long accountId; - private String name; - - protected AbstractDownloadCommand() { - } - - protected AbstractDownloadCommand(String name, String url, ImageFormat format, long accountId) { - assert(url != null); - url = url.replace('\\', '/'); - - this.url = url; - this.format = format; - this.accountId = accountId; - this.name = name; - } - - protected AbstractDownloadCommand(AbstractDownloadCommand that) { - super(that); - assert(that.url != null); - - this.url = that.url.replace('\\', '/'); - this.format = that.format; - this.accountId = that.accountId; - this.name = that.name; - } - - public String getUrl() { - return url; - } - - public String getName() { - return name; - } - - public ImageFormat getFormat() { - return format; - } - - public long getAccountId() { - return accountId; - } - - @Override - public boolean executeInSequence() { - return true; - } - - public void setUrl(String url) { - assert(url != null); - url = url.replace('\\', '/'); - this.url = url; - } - -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/AbstractUploadCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/AbstractUploadCommand.java b/api/src/com/cloud/agent/api/storage/AbstractUploadCommand.java deleted file mode 100644 index 49c04b1..0000000 --- a/api/src/com/cloud/agent/api/storage/AbstractUploadCommand.java +++ /dev/null @@ -1,68 +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.agent.api.storage; - -import com.cloud.storage.Storage.ImageFormat; - -public class AbstractUploadCommand extends StorageCommand{ - - - private String url; - private ImageFormat format; - private long accountId; - private String name; - - protected AbstractUploadCommand() { - } - - protected AbstractUploadCommand(String name, String url, ImageFormat format, long accountId) { - this.url = url; - this.format = format; - this.accountId = accountId; - this.name = name; - } - - protected AbstractUploadCommand(AbstractUploadCommand that) { - this(that.name, that.url, that.format, that.accountId); - } - - public String getUrl() { - return url; - } - - public String getName() { - return name; - } - - public ImageFormat getFormat() { - return format; - } - - public long getAccountId() { - return accountId; - } - - @Override - public boolean executeInSequence() { - return true; - } - - public void setUrl(String url) { - this.url = url; - } - -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/CopyVolumeAnswer.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/CopyVolumeAnswer.java b/api/src/com/cloud/agent/api/storage/CopyVolumeAnswer.java deleted file mode 100644 index 8c55ac3..0000000 --- a/api/src/com/cloud/agent/api/storage/CopyVolumeAnswer.java +++ /dev/null @@ -1,42 +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.agent.api.storage; - -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.Command; - -public class CopyVolumeAnswer extends Answer { - private String volumeFolder; - private String volumePath; - - protected CopyVolumeAnswer() { - } - - public CopyVolumeAnswer(Command command, boolean success, String details, String volumeFolder, String volumePath) { - super(command, success, details); - this.volumeFolder = volumeFolder; - this.volumePath = volumePath; - } - - public String getVolumeFolder() { - return volumeFolder; - } - - public String getVolumePath() { - return volumePath; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/CopyVolumeCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/CopyVolumeCommand.java b/api/src/com/cloud/agent/api/storage/CopyVolumeCommand.java deleted file mode 100644 index 3d05e9b..0000000 --- a/api/src/com/cloud/agent/api/storage/CopyVolumeCommand.java +++ /dev/null @@ -1,72 +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.agent.api.storage; - -import com.cloud.agent.api.Command; -import com.cloud.agent.api.to.StorageFilerTO; -import com.cloud.storage.StoragePool; - -public class CopyVolumeCommand extends Command { - - long volumeId; - String volumePath; - StorageFilerTO pool; - String secondaryStorageURL; - boolean toSecondaryStorage; - String vmName; - - public CopyVolumeCommand() { - } - - public CopyVolumeCommand(long volumeId, String volumePath, StoragePool pool, String secondaryStorageURL, boolean toSecondaryStorage, int wait) { - this.volumeId = volumeId; - this.volumePath = volumePath; - this.pool = new StorageFilerTO(pool); - this.secondaryStorageURL = secondaryStorageURL; - this.toSecondaryStorage = toSecondaryStorage; - setWait(wait); - } - - @Override - public boolean executeInSequence() { - return true; - } - - public String getVolumePath() { - return volumePath; - } - - public long getVolumeId() { - return volumeId; - } - - public StorageFilerTO getPool() { - return pool; - } - - public String getSecondaryStorageURL() { - return secondaryStorageURL; - } - - public boolean toSecondaryStorage() { - return toSecondaryStorage; - } - - public String getVmName() { - return vmName; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/CreateAnswer.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/CreateAnswer.java b/api/src/com/cloud/agent/api/storage/CreateAnswer.java deleted file mode 100644 index ab6cc03..0000000 --- a/api/src/com/cloud/agent/api/storage/CreateAnswer.java +++ /dev/null @@ -1,53 +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.agent.api.storage; - -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.to.VolumeTO; - -public class CreateAnswer extends Answer { - VolumeTO volume; - boolean requestTemplateReload = false; - protected CreateAnswer() { - } - - public CreateAnswer(CreateCommand cmd, VolumeTO volume) { - super(cmd, true, null); - this.volume = volume; - } - - public CreateAnswer(CreateCommand cmd, String details) { - super(cmd, false, details); - } - - public CreateAnswer(CreateCommand cmd, String details, boolean requestTemplateReload) { - super(cmd, false, details); - this.requestTemplateReload = requestTemplateReload; - } - - public CreateAnswer(CreateCommand cmd, Exception e) { - super(cmd, e); - } - - public VolumeTO getVolume() { - return volume; - } - - public boolean templateReloadRequested() { - return requestTemplateReload; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/CreateCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/CreateCommand.java b/api/src/com/cloud/agent/api/storage/CreateCommand.java deleted file mode 100644 index fd0375a..0000000 --- a/api/src/com/cloud/agent/api/storage/CreateCommand.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.agent.api.storage; - -import com.cloud.agent.api.Command; -import com.cloud.agent.api.to.StorageFilerTO; -import com.cloud.storage.StoragePool; -import com.cloud.vm.DiskProfile; - -public class CreateCommand extends Command { - private long volId; - private StorageFilerTO pool; - private DiskProfile diskCharacteristics; - private String templateUrl; - - protected CreateCommand() { - super(); - } - - /** - * Construction for template based volumes. - * - * @param vol - * @param vm - * @param diskCharacteristics - * @param templateUrl - * @param pool - */ - public CreateCommand(DiskProfile diskCharacteristics, String templateUrl, StorageFilerTO pool) { - this(diskCharacteristics, pool); - this.templateUrl = templateUrl; - } - - /** - * Construction for regular volumes. - * - * @param vol - * @param vm - * @param diskCharacteristics - * @param pool - */ - public CreateCommand(DiskProfile diskCharacteristics, StorageFilerTO pool) { - this.volId = diskCharacteristics.getVolumeId(); - this.diskCharacteristics = diskCharacteristics; - this.pool = pool; - this.templateUrl = null; - } - - public CreateCommand(DiskProfile diskCharacteristics, String templateUrl, StoragePool pool) { - this(diskCharacteristics, templateUrl, new StorageFilerTO(pool)); - } - - public CreateCommand(DiskProfile diskCharacteristics, StoragePool pool) { - this(diskCharacteristics, new StorageFilerTO(pool)); - } - - @Override - public boolean executeInSequence() { - return true; - } - - public String getTemplateUrl() { - return templateUrl; - } - - public StorageFilerTO getPool() { - return pool; - } - - public DiskProfile getDiskCharacteristics() { - return diskCharacteristics; - } - - public long getVolumeId() { - return volId; - } - - @Deprecated - public String getInstanceName() { - return null; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/CreateEntityDownloadURLAnswer.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/CreateEntityDownloadURLAnswer.java b/api/src/com/cloud/agent/api/storage/CreateEntityDownloadURLAnswer.java deleted file mode 100644 index 808a67f..0000000 --- a/api/src/com/cloud/agent/api/storage/CreateEntityDownloadURLAnswer.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.agent.api.storage; - -import com.cloud.agent.api.Answer; - -public class CreateEntityDownloadURLAnswer extends Answer{ - - String resultString; - short resultCode; - public static final short RESULT_SUCCESS = 1; - public static final short RESULT_FAILURE = 0; - - public CreateEntityDownloadURLAnswer(String resultString, short resultCode) { - super(); - this.resultString = resultString; - this.resultCode = resultCode; - } - - public CreateEntityDownloadURLAnswer(){ - } - -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/CreateEntityDownloadURLCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/CreateEntityDownloadURLCommand.java b/api/src/com/cloud/agent/api/storage/CreateEntityDownloadURLCommand.java deleted file mode 100755 index d928e0c..0000000 --- a/api/src/com/cloud/agent/api/storage/CreateEntityDownloadURLCommand.java +++ /dev/null @@ -1,72 +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.agent.api.storage; - - -public class CreateEntityDownloadURLCommand extends AbstractDownloadCommand { - - public CreateEntityDownloadURLCommand(String parent, String installPath, String uuid) { // this constructor is for creating template download url - super(); - this.parent = parent; // parent is required as not the template can be child of one of many parents - this.installPath = installPath; - this.extractLinkUUID = uuid; - } - - public CreateEntityDownloadURLCommand(String installPath, String uuid) { - super(); - this.parent = parent; - this.installPath = installPath; - this.extractLinkUUID = uuid; - } - - public CreateEntityDownloadURLCommand() { - } - - private String installPath; - private String parent; - private String extractLinkUUID; - - @Override - public boolean executeInSequence() { - return false; - } - - public String getInstallPath() { - return installPath; - } - - public void setInstallPath(String installPath) { - this.installPath = installPath; - } - - public String getParent() { - return parent; - } - - public void setParent(String parent) { - this.parent = parent; - } - - public String getExtractLinkUUID() { - return extractLinkUUID; - } - - public void setExtractLinkUUID(String extractLinkUUID) { - this.extractLinkUUID = extractLinkUUID; - } - -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/CreatePrivateTemplateAnswer.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/CreatePrivateTemplateAnswer.java b/api/src/com/cloud/agent/api/storage/CreatePrivateTemplateAnswer.java deleted file mode 100644 index 83db84d..0000000 --- a/api/src/com/cloud/agent/api/storage/CreatePrivateTemplateAnswer.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 com.cloud.agent.api.storage; - -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.Command; -import com.cloud.storage.Storage.ImageFormat; - -public class CreatePrivateTemplateAnswer extends Answer { - private String _path; - private long _virtualSize; - private long _physicalSize; - private String _uniqueName; - private ImageFormat _format; - - public CreatePrivateTemplateAnswer() {} - - public CreatePrivateTemplateAnswer(Command cmd, boolean success, String result, String path, long virtualSize, - long physicalSize, String uniqueName, ImageFormat format) { - super(cmd, success, result); - _path = path; - _virtualSize = virtualSize; - _physicalSize = physicalSize; - _uniqueName = uniqueName; - _format = format; - } - - public CreatePrivateTemplateAnswer(Command cmd, boolean success, String result) { - super(cmd, success, result); - } - - public String getPath() { - return _path; - } - - public void setPath(String path) { - _path = path; - } - - public long getVirtualSize() { - return _virtualSize; - } - - public void setVirtualSize(long virtualSize) { - _virtualSize = virtualSize; - } - - public void setphysicalSize(long _physicalSize) { - this._physicalSize = _physicalSize; - } - - public long getphysicalSize() { - return _physicalSize; - } - - public String getUniqueName() { - return _uniqueName; - } - - public ImageFormat getImageFormat() { - return _format; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/CreatePrivateTemplateCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/CreatePrivateTemplateCommand.java b/api/src/com/cloud/agent/api/storage/CreatePrivateTemplateCommand.java deleted file mode 100644 index d392a89..0000000 --- a/api/src/com/cloud/agent/api/storage/CreatePrivateTemplateCommand.java +++ /dev/null @@ -1,90 +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.agent.api.storage; - -public class CreatePrivateTemplateCommand extends StorageCommand { - private String _snapshotFolder; - private String _snapshotPath; - private String _userFolder; - private String _userSpecifiedName; - private String _uniqueName; - private long _templateId; - private long _accountId; - - // For XenServer - private String _secondaryStorageURL; - private String _snapshotName; - - public CreatePrivateTemplateCommand() {} - - public CreatePrivateTemplateCommand(String secondaryStorageURL, long templateId, long accountId, String userSpecifiedName, String uniqueName, String snapshotFolder, String snapshotPath, String snapshotName, String userFolder) { - _secondaryStorageURL = secondaryStorageURL; - _templateId = templateId; - _accountId = accountId; - _userSpecifiedName = userSpecifiedName; - _uniqueName = uniqueName; - _snapshotFolder = snapshotFolder; - _snapshotPath = snapshotPath; - _snapshotName = snapshotName; - _userFolder = userFolder; - } - - @Override - public boolean executeInSequence() { - return false; - } - - public String getSecondaryStorageURL() { - return _secondaryStorageURL; - } - - public String getTemplateName() { - return _userSpecifiedName; - } - - public String getUniqueName() { - return _uniqueName; - } - - public String getSnapshotFolder() { - return _snapshotFolder; - } - - public String getSnapshotPath() { - return _snapshotPath; - } - - public String getSnapshotName() { - return _snapshotName; - } - - public String getUserFolder() { - return _userFolder; - } - - public long getTemplateId() { - return _templateId; - } - - public long getAccountId() { - return _accountId; - } - - public void setTemplateId(long templateId) { - _templateId = templateId; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/CreateVolumeOVAAnswer.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/CreateVolumeOVAAnswer.java b/api/src/com/cloud/agent/api/storage/CreateVolumeOVAAnswer.java new file mode 100755 index 0000000..52a57db --- /dev/null +++ b/api/src/com/cloud/agent/api/storage/CreateVolumeOVAAnswer.java @@ -0,0 +1,26 @@ +// 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.agent.api.storage; + +import com.cloud.agent.api.Answer; + +public class CreateVolumeOVAAnswer extends Answer { + public CreateVolumeOVAAnswer(CreateVolumeOVACommand cmd, boolean result, String details) { + super(cmd, result, details); + } + +} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/CreateVolumeOVACommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/CreateVolumeOVACommand.java b/api/src/com/cloud/agent/api/storage/CreateVolumeOVACommand.java new file mode 100755 index 0000000..224b7c80 --- /dev/null +++ b/api/src/com/cloud/agent/api/storage/CreateVolumeOVACommand.java @@ -0,0 +1,60 @@ +// 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.agent.api.storage; + +import com.cloud.agent.api.Command; +import com.cloud.agent.api.to.StorageFilerTO; +import com.cloud.storage.StoragePool; + +public class CreateVolumeOVACommand extends Command { + String secUrl; + String volPath; + String volName; + StorageFilerTO pool; + + public CreateVolumeOVACommand() { + } + + public CreateVolumeOVACommand(String secUrl, String volPath, String volName, StoragePool pool, int wait) { + this.secUrl = secUrl; + this.volPath = volPath; + this.volName = volName; + this.pool = new StorageFilerTO(pool); + setWait(wait); + } + + @Override + public boolean executeInSequence() { + return true; + } + + public String getVolPath() { + return this.volPath; + } + + public String getVolName() { + return this.volName; + } + public String getSecondaryStorageUrl() { + return this.secUrl; + } + public StorageFilerTO getPool() { + return pool; + } +} + + http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/DeleteEntityDownloadURLAnswer.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/DeleteEntityDownloadURLAnswer.java b/api/src/com/cloud/agent/api/storage/DeleteEntityDownloadURLAnswer.java deleted file mode 100644 index c6fdf3c..0000000 --- a/api/src/com/cloud/agent/api/storage/DeleteEntityDownloadURLAnswer.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.agent.api.storage; - -import com.cloud.agent.api.Answer; - -public class DeleteEntityDownloadURLAnswer extends Answer{ - - String resultString; - short resultCode; - public static final short RESULT_SUCCESS = 1; - public static final short RESULT_FAILURE = 0; - - public DeleteEntityDownloadURLAnswer(String resultString, short resultCode) { - super(); - this.resultString = resultString; - this.resultCode = resultCode; - } - - public DeleteEntityDownloadURLAnswer(){ - } - -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/DeleteEntityDownloadURLCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/DeleteEntityDownloadURLCommand.java b/api/src/com/cloud/agent/api/storage/DeleteEntityDownloadURLCommand.java deleted file mode 100755 index fbfacb9..0000000 --- a/api/src/com/cloud/agent/api/storage/DeleteEntityDownloadURLCommand.java +++ /dev/null @@ -1,72 +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.agent.api.storage; - -import com.cloud.storage.Upload; - -public class DeleteEntityDownloadURLCommand extends AbstractDownloadCommand { - - private String path; - private String extractUrl; - private Upload.Type type; - private String parentPath; - - public DeleteEntityDownloadURLCommand(String path, Upload.Type type, String url, String parentPath) { - super(); - this.path = path; - this.type = type; - this.extractUrl = url; - this.parentPath = parentPath; - } - - public DeleteEntityDownloadURLCommand() { - super(); - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public Upload.Type getType() { - return type; - } - - public void setType(Upload.Type type) { - this.type = type; - } - - public String getExtractUrl() { - return extractUrl; - } - - public void setExtractUrl(String extractUrl) { - this.extractUrl = extractUrl; - } - - public String getParentPath() { - return parentPath; - } - - public void setParentPath(String parentPath) { - this.parentPath = parentPath; - } - -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/DeleteTemplateCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/DeleteTemplateCommand.java b/api/src/com/cloud/agent/api/storage/DeleteTemplateCommand.java deleted file mode 100644 index 69f465c..0000000 --- a/api/src/com/cloud/agent/api/storage/DeleteTemplateCommand.java +++ /dev/null @@ -1,40 +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.agent.api.storage; - - -public class DeleteTemplateCommand extends ssCommand { - private String templatePath; - - - public DeleteTemplateCommand() { - } - - public DeleteTemplateCommand(String secUrl, String templatePath) { - this.setSecUrl(secUrl); - this.templatePath = templatePath; - } - - @Override - public boolean executeInSequence() { - return true; - } - - public String getTemplatePath() { - return templatePath; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/DeleteVolumeCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/DeleteVolumeCommand.java b/api/src/com/cloud/agent/api/storage/DeleteVolumeCommand.java deleted file mode 100755 index 949af01..0000000 --- a/api/src/com/cloud/agent/api/storage/DeleteVolumeCommand.java +++ /dev/null @@ -1,38 +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.agent.api.storage; - -public class DeleteVolumeCommand extends ssCommand { - private String volumePath; - - public DeleteVolumeCommand() { - } - - public DeleteVolumeCommand(String secUrl, String volumePath) { - this.setSecUrl(secUrl); - this.volumePath = volumePath; - } - - @Override - public boolean executeInSequence() { - return true; - } - - public String getVolumePath() { - return volumePath; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/DestroyAnswer.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/DestroyAnswer.java b/api/src/com/cloud/agent/api/storage/DestroyAnswer.java deleted file mode 100644 index ac60015..0000000 --- a/api/src/com/cloud/agent/api/storage/DestroyAnswer.java +++ /dev/null @@ -1,31 +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.agent.api.storage; - -import com.cloud.agent.api.Answer; - -public class DestroyAnswer extends Answer { - public DestroyAnswer(DestroyCommand cmd, boolean result, String details) { - super(cmd, result, details); - } - - // Constructor for gson. - protected DestroyAnswer() { - super(); - } - -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/DestroyCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/DestroyCommand.java b/api/src/com/cloud/agent/api/storage/DestroyCommand.java deleted file mode 100755 index 6732ea5..0000000 --- a/api/src/com/cloud/agent/api/storage/DestroyCommand.java +++ /dev/null @@ -1,55 +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.agent.api.storage; - -import com.cloud.agent.api.to.VolumeTO; -import com.cloud.storage.StoragePool; -import com.cloud.storage.VMTemplateStorageResourceAssoc; -import com.cloud.storage.Volume; - -public class DestroyCommand extends StorageCommand { - // in VMware, things are designed around VM instead of volume, we need it the volume VM context if the volume is attached - String vmName; - VolumeTO volume; - - protected DestroyCommand() { - } - - public DestroyCommand(StoragePool pool, Volume volume, String vmName) { - this.volume = new VolumeTO(volume, pool); - this.vmName = vmName; - } - - public DestroyCommand(StoragePool pool, VMTemplateStorageResourceAssoc templatePoolRef) { - volume = new VolumeTO(templatePoolRef.getId(), null, pool.getPoolType(), pool.getUuid(), - null, pool.getPath(), templatePoolRef.getInstallPath(), - templatePoolRef.getTemplateSize(), null); - } - - public VolumeTO getVolume() { - return volume; - } - - public String getVmName() { - return vmName; - } - - @Override - public boolean executeInSequence() { - return true; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/DownloadAnswer.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/DownloadAnswer.java b/api/src/com/cloud/agent/api/storage/DownloadAnswer.java deleted file mode 100755 index bb7b8a9..0000000 --- a/api/src/com/cloud/agent/api/storage/DownloadAnswer.java +++ /dev/null @@ -1,141 +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.agent.api.storage; - -import java.io.File; - -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.Command; -import com.cloud.storage.VMTemplateStorageResourceAssoc; -import com.cloud.storage.VMTemplateStorageResourceAssoc.Status; - -public class DownloadAnswer extends Answer { - private String jobId; - private int downloadPct; - private String errorString; - private VMTemplateStorageResourceAssoc.Status downloadStatus; - private String downloadPath; - private String installPath; - private long templateSize = 0L; - private long templatePhySicalSize = 0L; - private String checkSum; - - public String getCheckSum() { - return checkSum; - } - - public int getDownloadPct() { - return downloadPct; - } - public String getErrorString() { - return errorString; - } - - public String getDownloadStatusString() { - return downloadStatus.toString(); - } - - public VMTemplateStorageResourceAssoc.Status getDownloadStatus() { - return downloadStatus; - } - - public String getDownloadPath() { - return downloadPath; - } - protected DownloadAnswer() { - - } - - public String getJobId() { - return jobId; - } - public void setJobId(String jobId) { - this.jobId = jobId; - } - - public DownloadAnswer(String errorString, Status status) { - super(); - this.downloadPct = 0; - this.errorString = errorString; - this.downloadStatus = status; - this.details = errorString; - } - - public DownloadAnswer(String jobId, int downloadPct, String errorString, - Status downloadStatus, String fileSystemPath, String installPath, long templateSize, long templatePhySicalSize, String checkSum) { - super(); - this.jobId = jobId; - this.downloadPct = downloadPct; - this.errorString = errorString; - this.details = errorString; - this.downloadStatus = downloadStatus; - this.downloadPath = fileSystemPath; - this.installPath = fixPath(installPath); - this.templateSize = templateSize; - this.templatePhySicalSize = templatePhySicalSize; - this.checkSum = checkSum; - } - - public DownloadAnswer(String jobId, int downloadPct, Command command, - Status downloadStatus, String fileSystemPath, String installPath) { - super(command); - this.jobId = jobId; - this.downloadPct = downloadPct; - this.downloadStatus = downloadStatus; - this.downloadPath = fileSystemPath; - this.installPath = installPath; - } - - private static String fixPath(String path){ - if (path == null) { - return path; - } - if (path.startsWith(File.separator)) { - path=path.substring(File.separator.length()); - } - if (path.endsWith(File.separator)) { - path=path.substring(0, path.length()-File.separator.length()); - } - return path; - } - - public void setDownloadStatus(VMTemplateStorageResourceAssoc.Status downloadStatus) { - this.downloadStatus = downloadStatus; - } - - public String getInstallPath() { - return installPath; - } - public void setInstallPath(String installPath) { - this.installPath = fixPath(installPath); - } - - public void setTemplateSize(long templateSize) { - this.templateSize = templateSize; - } - - public Long getTemplateSize() { - return templateSize; - } - public void setTemplatePhySicalSize(long templatePhySicalSize) { - this.templatePhySicalSize = templatePhySicalSize; - } - public long getTemplatePhySicalSize() { - return templatePhySicalSize; - } - -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/DownloadCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/DownloadCommand.java b/api/src/com/cloud/agent/api/storage/DownloadCommand.java deleted file mode 100644 index c6ffe45..0000000 --- a/api/src/com/cloud/agent/api/storage/DownloadCommand.java +++ /dev/null @@ -1,219 +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.agent.api.storage; - -import java.net.URI; - -import org.apache.cloudstack.api.InternalIdentity; - -import com.cloud.storage.Storage.ImageFormat; -import com.cloud.storage.Volume; -import com.cloud.template.VirtualMachineTemplate; - - -public class DownloadCommand extends AbstractDownloadCommand implements InternalIdentity { - public static class PasswordAuth { - String userName; - String password; - public PasswordAuth() { - - } - public PasswordAuth(String user, String password) { - this.userName = user; - this.password = password; - } - public String getUserName() { - return userName; - } - public String getPassword() { - return password; - } - } - - public static enum ResourceType { - VOLUME, TEMPLATE - } - - public static class Proxy { - private String _host; - private int _port; - private String _userName; - private String _password; - - public Proxy() { - - } - - public Proxy(String host, int port, String userName, String password) { - this._host = host; - this._port = port; - this._userName = userName; - this._password = password; - } - - public Proxy(URI uri) { - this._host = uri.getHost(); - this._port = uri.getPort() == -1 ? 3128 : uri.getPort(); - String userInfo = uri.getUserInfo(); - if (userInfo != null) { - String[] tokens = userInfo.split(":"); - if (tokens.length == 1) { - this._userName = userInfo; - this._password = ""; - } else if (tokens.length == 2) { - this._userName = tokens[0]; - this._password = tokens[1]; - } - } - } - - public String getHost() { - return _host; - } - - public int getPort() { - return _port; - } - - public String getUserName() { - return _userName; - } - - public String getPassword() { - return _password; - } - } - private boolean hvm; - private String description; - private String checksum; - private PasswordAuth auth; - private Proxy _proxy; - private Long maxDownloadSizeInBytes = null; - private long id; - private ResourceType resourceType = ResourceType.TEMPLATE; - - protected DownloadCommand() { - } - - - public DownloadCommand(DownloadCommand that) { - super(that); - this.hvm = that.hvm; - this.checksum = that.checksum; - this.id = that.id; - this.description = that.description; - this.auth = that.getAuth(); - this.setSecUrl(that.getSecUrl()); - this.maxDownloadSizeInBytes = that.getMaxDownloadSizeInBytes(); - this.resourceType = that.resourceType; - } - - public DownloadCommand(String secUrl, VirtualMachineTemplate template, Long maxDownloadSizeInBytes) { - super(template.getUniqueName(), template.getUrl(), template.getFormat(), template.getAccountId()); - this.hvm = template.isRequiresHvm(); - this.checksum = template.getChecksum(); - this.id = template.getId(); - this.description = template.getDisplayText(); - this.setSecUrl(secUrl); - this.maxDownloadSizeInBytes = maxDownloadSizeInBytes; - } - - public DownloadCommand(String secUrl, Volume volume, Long maxDownloadSizeInBytes, String checkSum, String url, ImageFormat format) { - super(volume.getName(), url, format, volume.getAccountId()); - //this.hvm = volume.isRequiresHvm(); - this.checksum = checkSum; - this.id = volume.getId(); - this.setSecUrl(secUrl); - this.maxDownloadSizeInBytes = maxDownloadSizeInBytes; - this.resourceType = ResourceType.VOLUME; - } - - public DownloadCommand(String secUrl, String url, VirtualMachineTemplate template, String user, String passwd, Long maxDownloadSizeInBytes) { - super(template.getUniqueName(), url, template.getFormat(), template.getAccountId()); - this.hvm = template.isRequiresHvm(); - this.checksum = template.getChecksum(); - this.id = template.getId(); - this.description = template.getDisplayText(); - this.setSecUrl(secUrl); - this.maxDownloadSizeInBytes = maxDownloadSizeInBytes; - auth = new PasswordAuth(user, passwd); - } - - public long getId() { - return id; - } - - public void setHvm(boolean hvm) { - this.hvm = hvm; - } - - public boolean isHvm() { - return hvm; - } - - public String getDescription() { - return description; - } - - public String getChecksum() { - return checksum; - } - - public void setDescription(String description) { - this.description = description; - } - - public void setChecksum(String checksum) { - this.checksum = checksum; - } - - @Override - public boolean executeInSequence() { - return false; - } - - - public PasswordAuth getAuth() { - return auth; - } - - public void setCreds(String userName, String passwd) { - auth = new PasswordAuth(userName, passwd); - } - - public Proxy getProxy() { - return _proxy; - } - - public void setProxy(Proxy proxy) { - _proxy = proxy; - } - - public Long getMaxDownloadSizeInBytes() { - return maxDownloadSizeInBytes; - } - - - public ResourceType getResourceType() { - return resourceType; - } - - - public void setResourceType(ResourceType resourceType) { - this.resourceType = resourceType; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/DownloadProgressCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/DownloadProgressCommand.java b/api/src/com/cloud/agent/api/storage/DownloadProgressCommand.java deleted file mode 100644 index 835847b..0000000 --- a/api/src/com/cloud/agent/api/storage/DownloadProgressCommand.java +++ /dev/null @@ -1,48 +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.agent.api.storage; - - - -public class DownloadProgressCommand extends DownloadCommand { - public static enum RequestType {GET_STATUS, ABORT, RESTART, PURGE, GET_OR_RESTART} - private String jobId; - private RequestType request; - - protected DownloadProgressCommand() { - super(); - } - - public DownloadProgressCommand(DownloadCommand cmd, String jobId, RequestType req) { - super(cmd); - - this.jobId = jobId; - this.setRequest(req); - } - - public String getJobId() { - return jobId; - } - - public void setRequest(RequestType request) { - this.request = request; - } - - public RequestType getRequest() { - return request; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/ListTemplateAnswer.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/ListTemplateAnswer.java b/api/src/com/cloud/agent/api/storage/ListTemplateAnswer.java deleted file mode 100644 index a4e2e25..0000000 --- a/api/src/com/cloud/agent/api/storage/ListTemplateAnswer.java +++ /dev/null @@ -1,53 +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.agent.api.storage; - -import java.util.Map; - -import com.cloud.agent.api.Answer; -import com.cloud.storage.template.TemplateInfo; - -public class ListTemplateAnswer extends Answer { - private String secUrl; - private Map templateInfos; - - public ListTemplateAnswer() { - - } - - public ListTemplateAnswer(String secUrl, Map templateInfos) { - super(null, true, "success"); - this.setSecUrl(secUrl); - this.templateInfos = templateInfos; - } - - public Map getTemplateInfo() { - return templateInfos; - } - - public void setTemplateInfo(Map templateInfos) { - this.templateInfos = templateInfos; - } - - public void setSecUrl(String secUrl) { - this.secUrl = secUrl; - } - - public String getSecUrl() { - return secUrl; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/ListTemplateCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/ListTemplateCommand.java b/api/src/com/cloud/agent/api/storage/ListTemplateCommand.java deleted file mode 100644 index da25ed5..0000000 --- a/api/src/com/cloud/agent/api/storage/ListTemplateCommand.java +++ /dev/null @@ -1,54 +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.agent.api.storage; - -import com.cloud.agent.api.LogLevel; -import com.cloud.agent.api.LogLevel.Log4jLevel; -import com.cloud.agent.api.to.SwiftTO; - -public class ListTemplateCommand extends StorageCommand { - private String secUrl; - @LogLevel(Log4jLevel.Off) - private SwiftTO swift; - - public ListTemplateCommand() { - } - - public ListTemplateCommand(String secUrl) { - this.secUrl = secUrl; - this.swift = null; - } - - public ListTemplateCommand(SwiftTO swift) { - this.secUrl = null; - this.swift = swift; - } - - @Override - public boolean executeInSequence() { - return true; - } - - public String getSecUrl() { - return secUrl; - } - - public SwiftTO getSwift() { - return swift; - } - -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/ListVolumeAnswer.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/ListVolumeAnswer.java b/api/src/com/cloud/agent/api/storage/ListVolumeAnswer.java deleted file mode 100755 index 6bbb2e8..0000000 --- a/api/src/com/cloud/agent/api/storage/ListVolumeAnswer.java +++ /dev/null @@ -1,53 +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.agent.api.storage; - -import java.util.Map; - -import com.cloud.agent.api.Answer; -import com.cloud.storage.template.TemplateInfo; - -public class ListVolumeAnswer extends Answer { - private String secUrl; - private Map templateInfos; - - public ListVolumeAnswer() { - - } - - public ListVolumeAnswer(String secUrl, Map templateInfos) { - super(null, true, "success"); - this.setSecUrl(secUrl); - this.templateInfos = templateInfos; - } - - public Map getTemplateInfo() { - return templateInfos; - } - - public void setTemplateInfo(Map templateInfos) { - this.templateInfos = templateInfos; - } - - public void setSecUrl(String secUrl) { - this.secUrl = secUrl; - } - - public String getSecUrl() { - return secUrl; - } -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/ListVolumeCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/ListVolumeCommand.java b/api/src/com/cloud/agent/api/storage/ListVolumeCommand.java deleted file mode 100755 index 63c5b62..0000000 --- a/api/src/com/cloud/agent/api/storage/ListVolumeCommand.java +++ /dev/null @@ -1,40 +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.agent.api.storage; - - -public class ListVolumeCommand extends StorageCommand { - - private String secUrl; - - public ListVolumeCommand() { - } - - public ListVolumeCommand(String secUrl) { - this.secUrl = secUrl; - } - - @Override - public boolean executeInSequence() { - return true; - } - - public String getSecUrl() { - return secUrl; - } - -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/ManageVolumeAvailabilityAnswer.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/ManageVolumeAvailabilityAnswer.java b/api/src/com/cloud/agent/api/storage/ManageVolumeAvailabilityAnswer.java deleted file mode 100644 index edd2830..0000000 --- a/api/src/com/cloud/agent/api/storage/ManageVolumeAvailabilityAnswer.java +++ /dev/null @@ -1,31 +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.agent.api.storage; - -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.Command; - -public class ManageVolumeAvailabilityAnswer extends Answer { - - protected ManageVolumeAvailabilityAnswer() { - } - - public ManageVolumeAvailabilityAnswer(Command command, boolean success, String details) { - super(command, success, details); - } - -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/ManageVolumeAvailabilityCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/ManageVolumeAvailabilityCommand.java b/api/src/com/cloud/agent/api/storage/ManageVolumeAvailabilityCommand.java deleted file mode 100644 index 1a7d480..0000000 --- a/api/src/com/cloud/agent/api/storage/ManageVolumeAvailabilityCommand.java +++ /dev/null @@ -1,54 +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.agent.api.storage; - -import com.cloud.agent.api.Command; - -public class ManageVolumeAvailabilityCommand extends Command { - - boolean attach; - String primaryStorageSRUuid; - String volumeUuid; - - - public ManageVolumeAvailabilityCommand() { - } - - public ManageVolumeAvailabilityCommand(boolean attach, String primaryStorageSRUuid, String volumeUuid) { - this.attach = attach; - this.primaryStorageSRUuid = primaryStorageSRUuid; - this.volumeUuid = volumeUuid; - } - - @Override - public boolean executeInSequence() { - return false; - } - - public boolean getAttach() { - return attach; - } - - public String getPrimaryStorageSRUuid() { - return primaryStorageSRUuid; - } - - public String getVolumeUuid() { - return volumeUuid; - } - -} http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/MigrateVolumeAnswer.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/MigrateVolumeAnswer.java b/api/src/com/cloud/agent/api/storage/MigrateVolumeAnswer.java deleted file mode 100644 index d5efa95..0000000 --- a/api/src/com/cloud/agent/api/storage/MigrateVolumeAnswer.java +++ /dev/null @@ -1,38 +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.agent.api.storage; - -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.Command; - -public class MigrateVolumeAnswer extends Answer { - private String volumePath; - - public MigrateVolumeAnswer(Command command, boolean success, String details, String volumePath) { - super(command, success, details); - this.volumePath = volumePath; - } - - public MigrateVolumeAnswer(Command command) { - super(command); - this.volumePath = null; - } - - public String getVolumePath() { - return volumePath; - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/storage/MigrateVolumeCommand.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/agent/api/storage/MigrateVolumeCommand.java b/api/src/com/cloud/agent/api/storage/MigrateVolumeCommand.java deleted file mode 100644 index b82d848..0000000 --- a/api/src/com/cloud/agent/api/storage/MigrateVolumeCommand.java +++ /dev/null @@ -1,51 +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.agent.api.storage; - -import com.cloud.agent.api.Command; -import com.cloud.agent.api.to.StorageFilerTO; -import com.cloud.storage.StoragePool; - -public class MigrateVolumeCommand extends Command { - - long volumeId; - String volumePath; - StorageFilerTO pool; - - public MigrateVolumeCommand(long volumeId, String volumePath, StoragePool pool) { - this.volumeId = volumeId; - this.volumePath = volumePath; - this.pool = new StorageFilerTO(pool); - } - - @Override - public boolean executeInSequence() { - return true; - } - - public String getVolumePath() { - return volumePath; - } - - public long getVolumeId() { - return volumeId; - } - - public StorageFilerTO getPool() { - return pool; - } -} \ No newline at end of file