You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mu...@apache.org on 2013/05/13 17:54:08 UTC
[48/93] [abbrv] [partial] merge master
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/MigrateWithStorageSendAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/MigrateWithStorageSendAnswer.java b/api/src/com/cloud/agent/api/MigrateWithStorageSendAnswer.java
deleted file mode 100644
index 7cf641f..0000000
--- a/api/src/com/cloud/agent/api/MigrateWithStorageSendAnswer.java
+++ /dev/null
@@ -1,39 +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;
-
-import java.util.Set;
-import com.cloud.agent.api.to.VolumeTO;
-
-public class MigrateWithStorageSendAnswer extends Answer {
-
- Set<VolumeTO> volumeToSet;
-
- public MigrateWithStorageSendAnswer(MigrateWithStorageSendCommand cmd, Exception ex) {
- super(cmd, ex);
- volumeToSet = null;
- }
-
- public MigrateWithStorageSendAnswer(MigrateWithStorageSendCommand cmd, Set<VolumeTO> volumeToSet) {
- super(cmd, true, null);
- this.volumeToSet = volumeToSet;
- }
-
- public Set<VolumeTO> getVolumeToSet() {
- return volumeToSet;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/MigrateWithStorageSendCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/MigrateWithStorageSendCommand.java b/api/src/com/cloud/agent/api/MigrateWithStorageSendCommand.java
deleted file mode 100644
index d10db30..0000000
--- a/api/src/com/cloud/agent/api/MigrateWithStorageSendCommand.java
+++ /dev/null
@@ -1,58 +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;
-
-import java.util.Map;
-import com.cloud.agent.api.to.VirtualMachineTO;
-import com.cloud.agent.api.to.VolumeTO;
-import com.cloud.agent.api.to.NicTO;
-
-public class MigrateWithStorageSendCommand extends Command {
- VirtualMachineTO vm;
- Map<VolumeTO, Object> volumeToSr;
- Map<NicTO, Object> nicToNetwork;
- Map<String, String> token;
-
- public MigrateWithStorageSendCommand(VirtualMachineTO vm, Map<VolumeTO, Object> volumeToSr,
- Map<NicTO, Object> nicToNetwork, Map<String, String> token) {
- this.vm = vm;
- this.volumeToSr = volumeToSr;
- this.nicToNetwork = nicToNetwork;
- this.token = token;
- }
-
- public VirtualMachineTO getVirtualMachine() {
- return vm;
- }
-
- public Map<VolumeTO, Object> getVolumeToSr() {
- return volumeToSr;
- }
-
- public Map<NicTO, Object> getNicToNetwork() {
- return nicToNetwork;
- }
-
- public Map<String, String> getToken() {
- return token;
- }
-
- @Override
- public boolean executeInSequence() {
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/ModifySshKeysCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ModifySshKeysCommand.java b/api/src/com/cloud/agent/api/ModifySshKeysCommand.java
deleted file mode 100644
index c078973..0000000
--- a/api/src/com/cloud/agent/api/ModifySshKeysCommand.java
+++ /dev/null
@@ -1,44 +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;
-
-import com.cloud.agent.api.LogLevel.Log4jLevel;
-
-public class ModifySshKeysCommand extends Command {
- @LogLevel(Log4jLevel.Off)
- private String _pubKey;
- @LogLevel(Log4jLevel.Off)
- private String _prvKey;
-
- public ModifySshKeysCommand() {
-
- }
- public ModifySshKeysCommand(String pubKey, String prvKey) {
- _pubKey = pubKey;
- _prvKey = prvKey;
- }
- public String getPubKey() {
- return _pubKey;
- }
- public String getPrvKey() {
- return _prvKey;
- }
- @Override
- public boolean executeInSequence() {
- return false;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java b/api/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java
deleted file mode 100644
index df77985..0000000
--- a/api/src/com/cloud/agent/api/ModifyStoragePoolAnswer.java
+++ /dev/null
@@ -1,57 +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;
-
-import java.util.Map;
-
-import com.cloud.storage.template.TemplateInfo;
-
-public class ModifyStoragePoolAnswer extends Answer {
- StoragePoolInfo poolInfo;
- Map<String, TemplateInfo> templateInfo;
-
- protected ModifyStoragePoolAnswer() {
- }
-
- public ModifyStoragePoolAnswer(ModifyStoragePoolCommand cmd, long capacityBytes, long availableBytes, Map<String, TemplateInfo> tInfo) {
- super(cmd);
- this.result = true;
- this.poolInfo = new StoragePoolInfo(null,
- cmd.getPool().getHost(), cmd.getPool().getPath(), cmd.getLocalPath(),
- cmd.getPool().getType(), capacityBytes, availableBytes );
-
- this.templateInfo = tInfo;
- }
-
- public StoragePoolInfo getPoolInfo() {
- return poolInfo;
- }
-
- public void setPoolInfo(StoragePoolInfo poolInfo) {
- this.poolInfo = poolInfo;
- }
-
-
- public Map<String, TemplateInfo> getTemplateInfo() {
- return templateInfo;
- }
-
- public void setTemplateInfo(Map<String, TemplateInfo> templateInfo) {
- this.templateInfo = templateInfo;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/ModifyStoragePoolCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ModifyStoragePoolCommand.java b/api/src/com/cloud/agent/api/ModifyStoragePoolCommand.java
deleted file mode 100644
index 8bc956d..0000000
--- a/api/src/com/cloud/agent/api/ModifyStoragePoolCommand.java
+++ /dev/null
@@ -1,75 +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;
-
-import java.io.File;
-import java.util.UUID;
-
-import com.cloud.agent.api.to.StorageFilerTO;
-import com.cloud.storage.StoragePool;
-
-public class ModifyStoragePoolCommand extends Command {
-
- boolean add;
- StorageFilerTO pool;
- String localPath;
- String [] options;
- public static final String LOCAL_PATH_PREFIX="/mnt/";
-
-
- public ModifyStoragePoolCommand() {
-
- }
-
- public ModifyStoragePoolCommand(boolean add, StoragePool pool, String localPath) {
- this.add = add;
- this.pool = new StorageFilerTO(pool);
- this.localPath = localPath;
-
- }
-
- public ModifyStoragePoolCommand(boolean add, StoragePool pool) {
- this(add, pool, LOCAL_PATH_PREFIX + File.separator + UUID.nameUUIDFromBytes((pool.getHostAddress() + pool.getPath()).getBytes()));
- }
-
- public StorageFilerTO getPool() {
- return pool;
- }
-
- public void setPool(StoragePool pool) {
- this.pool = new StorageFilerTO(pool);
- }
-
- public boolean getAdd() {
- return add;
- }
-
- @Override
- public boolean executeInSequence() {
- return false;
- }
-
- public String getLocalPath() {
- return localPath;
- }
-
- public void setOptions(String[] options) {
- this.options = options;
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/NetworkUsageAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/NetworkUsageAnswer.java b/api/src/com/cloud/agent/api/NetworkUsageAnswer.java
deleted file mode 100644
index fd8ebda..0000000
--- a/api/src/com/cloud/agent/api/NetworkUsageAnswer.java
+++ /dev/null
@@ -1,61 +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;
-
-import com.cloud.agent.api.LogLevel.Log4jLevel;
-
-@LogLevel(Log4jLevel.Debug)
-public class NetworkUsageAnswer extends Answer {
- String routerName;
- Long bytesSent;
- Long bytesReceived;
-
- protected NetworkUsageAnswer() {
- }
-
- public NetworkUsageAnswer(NetworkUsageCommand cmd, String details, Long bytesSent, Long bytesReceived) {
- super(cmd, true, details);
- this.bytesReceived = bytesReceived;
- this.bytesSent = bytesSent;
- routerName = cmd.getDomRName();
- }
-
- public NetworkUsageAnswer(Command command, Exception e) {
- super(command, e);
- }
-
-
- public void setBytesReceived(Long bytesReceived) {
- this.bytesReceived = bytesReceived;
- }
-
- public Long getBytesReceived() {
- return bytesReceived;
- }
-
- public void setBytesSent(Long bytesSent) {
- this.bytesSent = bytesSent;
- }
-
- public Long getBytesSent() {
- return bytesSent;
- }
-
- public String getRouterName() {
- return routerName;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/NetworkUsageCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/NetworkUsageCommand.java b/api/src/com/cloud/agent/api/NetworkUsageCommand.java
deleted file mode 100644
index 6cbf93b..0000000
--- a/api/src/com/cloud/agent/api/NetworkUsageCommand.java
+++ /dev/null
@@ -1,98 +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;
-
-import com.cloud.agent.api.LogLevel.Log4jLevel;
-
-@LogLevel(Log4jLevel.Trace)
-public class NetworkUsageCommand extends Command {
- private String privateIP;
- private String domRName;
- private String option;
- boolean forVpc = false;
- private String gatewayIP;
- private String vpcCIDR;
-
- protected NetworkUsageCommand() {
-
- }
-
- public NetworkUsageCommand(String privateIP, String domRName, boolean forVpc, String gatewayIP)
- {
- this.privateIP = privateIP;
- this.domRName = domRName;
- this.forVpc = forVpc;
- this.gatewayIP = gatewayIP;
- this.option = "get";
- }
-
- public NetworkUsageCommand(String privateIP, String domRName, String option, boolean forVpc)
- {
- this.privateIP = privateIP;
- this.domRName = domRName;
- this.option = option;
- this.forVpc = forVpc;
- }
-
- public NetworkUsageCommand(String privateIP, String domRName, boolean forVpc, String gatewayIP, String vpcCIDR)
- {
- this.privateIP = privateIP;
- this.domRName = domRName;
- this.forVpc = forVpc;
- this.gatewayIP = gatewayIP;
- this.option = "create";
- this.vpcCIDR = vpcCIDR;
- }
-
- public NetworkUsageCommand(String privateIP, String domRName, String option, boolean forVpc, String gatewayIP)
- {
- this.privateIP = privateIP;
- this.domRName = domRName;
- this.forVpc = forVpc;
- this.gatewayIP = gatewayIP;
- this.option = option;
- }
-
- public String getPrivateIP() {
- return privateIP;
- }
-
- public String getDomRName() {
- return domRName;
- }
-
- public String getOption() {
- return option;
- }
-
- public boolean isForVpc() {
- return forVpc;
- }
-
- public String getVpcCIDR() {
- return vpcCIDR;
- }
-
- public String getGatewayIP() {
- return gatewayIP;
- }
-
- @Override
- public boolean executeInSequence() {
- return false;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/PingAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PingAnswer.java b/api/src/com/cloud/agent/api/PingAnswer.java
deleted file mode 100644
index d9ed89c..0000000
--- a/api/src/com/cloud/agent/api/PingAnswer.java
+++ /dev/null
@@ -1,33 +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;
-
-public class PingAnswer extends Answer {
- private PingCommand _command = null;
-
- protected PingAnswer() {
- }
-
- public PingAnswer(PingCommand cmd) {
- super(cmd);
- _command = cmd;
- }
-
- public PingCommand getCommand() {
- return _command;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/PingCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PingCommand.java b/api/src/com/cloud/agent/api/PingCommand.java
deleted file mode 100755
index 8d9681f..0000000
--- a/api/src/com/cloud/agent/api/PingCommand.java
+++ /dev/null
@@ -1,45 +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;
-
-import com.cloud.host.Host;
-
-public class PingCommand extends Command {
- Host.Type hostType;
- long hostId;
-
- protected PingCommand() {
- }
-
- public PingCommand(Host.Type type, long id) {
- hostType = type;
- hostId = id;
- }
-
- public Host.Type getHostType() {
- return hostType;
- }
-
- public long getHostId() {
- return hostId;
- }
-
- @Override
- public boolean executeInSequence() {
- return false;
- }
- }
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/PingRoutingCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PingRoutingCommand.java b/api/src/com/cloud/agent/api/PingRoutingCommand.java
deleted file mode 100755
index e25ac62..0000000
--- a/api/src/com/cloud/agent/api/PingRoutingCommand.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;
-
-import java.util.Map;
-
-import com.cloud.host.Host;
-import com.cloud.vm.VirtualMachine.State;
-
-public class PingRoutingCommand extends PingCommand {
- Map<String, State> newStates;
- boolean _gatewayAccessible = true;
- boolean _vnetAccessible = true;
-
- protected PingRoutingCommand() {
- }
-
- public PingRoutingCommand(Host.Type type, long id, Map<String, State> states) {
- super(type, id);
- this.newStates = states;
- }
-
- public Map<String, State> getNewStates() {
- return newStates;
- }
-
- public boolean isGatewayAccessible() {
- return _gatewayAccessible;
- }
- public void setGatewayAccessible(boolean gatewayAccessible) {
- _gatewayAccessible = gatewayAccessible;
- }
-
- public boolean isVnetAccessible() {
- return _vnetAccessible;
- }
- public void setVnetAccessible(boolean vnetAccessible) {
- _vnetAccessible = vnetAccessible;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/PingRoutingWithNwGroupsCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PingRoutingWithNwGroupsCommand.java b/api/src/com/cloud/agent/api/PingRoutingWithNwGroupsCommand.java
deleted file mode 100644
index 51226bc..0000000
--- a/api/src/com/cloud/agent/api/PingRoutingWithNwGroupsCommand.java
+++ /dev/null
@@ -1,46 +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;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.cloud.host.Host;
-import com.cloud.utils.Pair;
-import com.cloud.vm.VirtualMachine.State;
-
-
-public class PingRoutingWithNwGroupsCommand extends PingRoutingCommand {
- HashMap<String, Pair<Long, Long>> newGroupStates;
-
- protected PingRoutingWithNwGroupsCommand() {
- super();
- }
-
- public PingRoutingWithNwGroupsCommand(Host.Type type, long id, Map<String, State> states, HashMap<String, Pair<Long, Long>> nwGrpStates) {
- super(type, id, states);
- newGroupStates = nwGrpStates;
- }
-
- public HashMap<String, Pair<Long, Long>> getNewGroupStates() {
- return newGroupStates;
- }
-
- public void setNewGroupStates(HashMap<String, Pair<Long, Long>> newGroupStates) {
- this.newGroupStates = newGroupStates;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/PingRoutingWithOvsCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PingRoutingWithOvsCommand.java b/api/src/com/cloud/agent/api/PingRoutingWithOvsCommand.java
deleted file mode 100644
index d44987b..0000000
--- a/api/src/com/cloud/agent/api/PingRoutingWithOvsCommand.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;
-
-import java.util.List;
-import java.util.Map;
-
-import com.cloud.host.Host;
-import com.cloud.utils.Pair;
-import com.cloud.vm.VirtualMachine.State;
-
-public class PingRoutingWithOvsCommand extends PingRoutingCommand {
- List<Pair<String, Long>> states;
-
- protected PingRoutingWithOvsCommand() {
- super();
- }
-
- public PingRoutingWithOvsCommand(Host.Type type, long id,
- Map<String, State> states, List<Pair<String, Long>> ovsStates) {
- super(type, id, states);
- this.states = ovsStates;
- }
-
- public List<Pair<String, Long>> getStates() {
- return states;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/PingStorageCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PingStorageCommand.java b/api/src/com/cloud/agent/api/PingStorageCommand.java
deleted file mode 100755
index 438ab50..0000000
--- a/api/src/com/cloud/agent/api/PingStorageCommand.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;
-
-import java.util.Map;
-
-import com.cloud.host.Host;
-
-public class PingStorageCommand extends PingCommand {
- Map<String, Boolean> changes;
-
- protected PingStorageCommand() {
- }
-
- public PingStorageCommand(Host.Type type, long id, Map<String, Boolean> changes) {
- super(type, id);
- this.changes = changes;
- }
-
- public Map<String, Boolean> getChanges() {
- return changes;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/PingTestCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PingTestCommand.java b/api/src/com/cloud/agent/api/PingTestCommand.java
deleted file mode 100644
index 69c6efa..0000000
--- a/api/src/com/cloud/agent/api/PingTestCommand.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;
-
-public class PingTestCommand extends Command {
-
- String _computingHostIp = null;
- String _routerIp = null;
- String _privateIp = null;
-
- public PingTestCommand() {}
-
- public PingTestCommand(String computingHostIp) {
- _computingHostIp = computingHostIp;
- setWait(20);
- }
-
- public PingTestCommand(String routerIp, String privateIp) {
- _routerIp = routerIp;
- _privateIp = privateIp;
- setWait(20);
- }
-
- public String getComputingHostIp() {
- return _computingHostIp;
- }
-
- public String getRouterIp() {
- return _routerIp;
- }
-
- public String getPrivateIp() {
- return _privateIp;
- }
-
- @Override
- public boolean executeInSequence() {
- return false;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/PlugNicAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PlugNicAnswer.java b/api/src/com/cloud/agent/api/PlugNicAnswer.java
deleted file mode 100644
index 90d31bd..0000000
--- a/api/src/com/cloud/agent/api/PlugNicAnswer.java
+++ /dev/null
@@ -1,25 +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;
-
-public class PlugNicAnswer extends Answer{
- public PlugNicAnswer() {}
-
- public PlugNicAnswer(PlugNicCommand cmd, boolean success, String result) {
- super(cmd, success, result);
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/PlugNicCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PlugNicCommand.java b/api/src/com/cloud/agent/api/PlugNicCommand.java
deleted file mode 100644
index b896e45..0000000
--- a/api/src/com/cloud/agent/api/PlugNicCommand.java
+++ /dev/null
@@ -1,46 +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;
-
-import com.cloud.agent.api.to.NicTO;
-
-public class PlugNicCommand extends Command {
-
- NicTO nic;
- String instanceName;
-
- public NicTO getNic() {
- return nic;
- }
-
- @Override
- public boolean executeInSequence() {
- return true;
- }
-
- protected PlugNicCommand() {
- }
-
- public PlugNicCommand(NicTO nic, String instanceName) {
- this.nic = nic;
- this.instanceName = instanceName;
- }
-
- public String getVmName() {
- return instanceName;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/PoolEjectCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PoolEjectCommand.java b/api/src/com/cloud/agent/api/PoolEjectCommand.java
deleted file mode 100644
index 3085042..0000000
--- a/api/src/com/cloud/agent/api/PoolEjectCommand.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;
-
-public class PoolEjectCommand extends Command {
- private String hostuuid;
-
- public String getHostuuid() {
- return hostuuid;
- }
-
- public void setHostuuid(String hostuuid) {
- this.hostuuid = hostuuid;
- }
- public PoolEjectCommand() {
- super();
- }
- public PoolEjectCommand(String hostuuid) {
- super();
- setHostuuid(hostuuid);
- }
-
- @Override
- public boolean executeInSequence() {
- return true;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/PrepareForMigrationAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PrepareForMigrationAnswer.java b/api/src/com/cloud/agent/api/PrepareForMigrationAnswer.java
deleted file mode 100644
index 1b215bc..0000000
--- a/api/src/com/cloud/agent/api/PrepareForMigrationAnswer.java
+++ /dev/null
@@ -1,34 +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;
-
-public class PrepareForMigrationAnswer extends Answer {
- protected PrepareForMigrationAnswer() {
- }
-
- public PrepareForMigrationAnswer(PrepareForMigrationCommand cmd, String detail) {
- super(cmd, false, detail);
- }
-
- public PrepareForMigrationAnswer(PrepareForMigrationCommand cmd, Exception ex) {
- super(cmd, ex);
- }
-
- public PrepareForMigrationAnswer(PrepareForMigrationCommand cmd) {
- super(cmd, true, null);
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/PrepareForMigrationCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PrepareForMigrationCommand.java b/api/src/com/cloud/agent/api/PrepareForMigrationCommand.java
deleted file mode 100644
index c0e1368..0000000
--- a/api/src/com/cloud/agent/api/PrepareForMigrationCommand.java
+++ /dev/null
@@ -1,39 +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;
-
-import com.cloud.agent.api.to.VirtualMachineTO;
-
-public class PrepareForMigrationCommand extends Command {
- VirtualMachineTO vm;
-
- protected PrepareForMigrationCommand() {
- }
-
- public PrepareForMigrationCommand(VirtualMachineTO vm) {
- this.vm = vm;
- }
-
- public VirtualMachineTO getVirtualMachine() {
- return vm;
- }
-
- @Override
- public boolean executeInSequence() {
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/PrepareOCFS2NodesCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PrepareOCFS2NodesCommand.java b/api/src/com/cloud/agent/api/PrepareOCFS2NodesCommand.java
deleted file mode 100755
index 0c80bfa..0000000
--- a/api/src/com/cloud/agent/api/PrepareOCFS2NodesCommand.java
+++ /dev/null
@@ -1,44 +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;
-
-import java.util.List;
-
-import com.cloud.utils.Ternary;
-
-public class PrepareOCFS2NodesCommand extends Command {
- List<Ternary<Integer, String, String>> nodes;
- String clusterName;
-
- @Override
- public boolean executeInSequence() {
- return true;
- }
-
- public PrepareOCFS2NodesCommand(String clusterName, List<Ternary<Integer, String, String>> nodes) {
- this.nodes = nodes;
- this.clusterName = clusterName;
- }
-
- public List<Ternary<Integer, String, String>> getNodes() {
- return nodes;
- }
-
- public String getClusterName() {
- return clusterName;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/PropagateResourceEventCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/PropagateResourceEventCommand.java b/api/src/com/cloud/agent/api/PropagateResourceEventCommand.java
deleted file mode 100755
index 45cd4b3..0000000
--- a/api/src/com/cloud/agent/api/PropagateResourceEventCommand.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;
-
-import com.cloud.resource.ResourceState;
-
-public class PropagateResourceEventCommand extends Command {
- long hostId;
- ResourceState.Event event;
-
- protected PropagateResourceEventCommand() {
-
- }
-
- public PropagateResourceEventCommand(long hostId, ResourceState.Event event) {
- this.hostId = hostId;
- this.event = event;
- }
-
- public long getHostId() {
- return hostId;
- }
-
- public ResourceState.Event getEvent() {
- return event;
- }
-
- @Override
- public boolean executeInSequence() {
- // TODO Auto-generated method stub
- return false;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/ReadyAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ReadyAnswer.java b/api/src/com/cloud/agent/api/ReadyAnswer.java
deleted file mode 100644
index b5dd0b7..0000000
--- a/api/src/com/cloud/agent/api/ReadyAnswer.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;
-
-public class ReadyAnswer extends Answer {
- protected ReadyAnswer() {
- }
-
- public ReadyAnswer(ReadyCommand cmd) {
- super(cmd, true, null);
- }
-
- public ReadyAnswer(ReadyCommand cmd, String details) {
- super(cmd, false, details);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/ReadyCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ReadyCommand.java b/api/src/com/cloud/agent/api/ReadyCommand.java
deleted file mode 100644
index c6ca799..0000000
--- a/api/src/com/cloud/agent/api/ReadyCommand.java
+++ /dev/null
@@ -1,58 +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;
-
-public class ReadyCommand extends Command {
- private String _details;
- public ReadyCommand() {
- super();
- }
-
- private Long dcId;
- private Long hostId;
-
- public ReadyCommand(Long dcId) {
- super();
- this.dcId = dcId;
- }
-
- public ReadyCommand(Long dcId, Long hostId) {
- this(dcId);
- this.hostId = hostId;
- }
-
- public void setDetails(String details) {
- _details = details;
- }
-
- public String getDetails() {
- return _details;
- }
-
- public Long getDataCenterId() {
- return dcId;
- }
-
- @Override
- public boolean executeInSequence() {
- return true;
- }
-
- public Long getHostId() {
- return hostId;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/RebootAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/RebootAnswer.java b/api/src/com/cloud/agent/api/RebootAnswer.java
deleted file mode 100644
index 244bf1e..0000000
--- a/api/src/com/cloud/agent/api/RebootAnswer.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;
-
-public class RebootAnswer extends Answer {
- Integer vncPort;
-
- protected RebootAnswer() {
- }
-
- public RebootAnswer(RebootCommand cmd, String details, Integer vncport) {
- super(cmd, true, details);
- this.vncPort = vncport;
- }
-
- public RebootAnswer(RebootCommand cmd, String details, boolean success) {
- super(cmd, success, details);
- this.vncPort = null;
- }
-
- public RebootAnswer(RebootCommand cmd, Exception e) {
- super(cmd, e);
- }
-
- public Integer getVncPort() {
- return vncPort;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/RebootCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/RebootCommand.java b/api/src/com/cloud/agent/api/RebootCommand.java
deleted file mode 100755
index 49712b6..0000000
--- a/api/src/com/cloud/agent/api/RebootCommand.java
+++ /dev/null
@@ -1,45 +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;
-
-import com.cloud.hypervisor.Hypervisor;
-import com.cloud.vm.VirtualMachine;
-
-public class RebootCommand extends Command {
- String vmName;
-
- protected RebootCommand() {
- }
-
- public RebootCommand(VirtualMachine vm) {
- vmName = vm.getInstanceName();
- }
-
- public RebootCommand(String vmName) {
- this.vmName = vmName;
- }
-
- 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/RebootRouterCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/RebootRouterCommand.java b/api/src/com/cloud/agent/api/RebootRouterCommand.java
deleted file mode 100644
index c5027b3..0000000
--- a/api/src/com/cloud/agent/api/RebootRouterCommand.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;
-
-
-public class RebootRouterCommand extends RebootCommand {
-
- protected String privateIp;
-
- protected RebootRouterCommand() {
- }
-
-
- public RebootRouterCommand(String vmName, String privateIp) {
- super(vmName);
- this.privateIp=privateIp;
- }
-
-
- public String getPrivateIpAddress() {
- return privateIp;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/RevertToVMSnapshotAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/RevertToVMSnapshotAnswer.java b/api/src/com/cloud/agent/api/RevertToVMSnapshotAnswer.java
deleted file mode 100644
index 848ffc0..0000000
--- a/api/src/com/cloud/agent/api/RevertToVMSnapshotAnswer.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;
-
-import java.util.List;
-
-import com.cloud.agent.api.to.VolumeTO;
-import com.cloud.vm.VirtualMachine;
-
-public class RevertToVMSnapshotAnswer extends Answer {
-
- private List<VolumeTO> volumeTOs;
- private VirtualMachine.State vmState;
-
- public RevertToVMSnapshotAnswer(RevertToVMSnapshotCommand cmd, boolean result,
- String message) {
- super(cmd, result, message);
- }
-
- public RevertToVMSnapshotAnswer() {
- super();
- }
-
- public RevertToVMSnapshotAnswer(RevertToVMSnapshotCommand cmd,
- List<VolumeTO> volumeTOs,
- VirtualMachine.State vmState) {
- super(cmd, true, "");
- this.volumeTOs = volumeTOs;
- this.vmState = vmState;
- }
-
- public VirtualMachine.State getVmState() {
- return vmState;
- }
-
- public List<VolumeTO> getVolumeTOs() {
- return volumeTOs;
- }
-
- public void setVolumeTOs(List<VolumeTO> volumeTOs) {
- this.volumeTOs = volumeTOs;
- }
-
- public void setVmState(VirtualMachine.State vmState) {
- this.vmState = vmState;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/RevertToVMSnapshotCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/RevertToVMSnapshotCommand.java b/api/src/com/cloud/agent/api/RevertToVMSnapshotCommand.java
deleted file mode 100644
index 429a186..0000000
--- a/api/src/com/cloud/agent/api/RevertToVMSnapshotCommand.java
+++ /dev/null
@@ -1,29 +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;
-
-import java.util.List;
-
-import com.cloud.agent.api.to.VolumeTO;
-
-public class RevertToVMSnapshotCommand extends VMSnapshotBaseCommand {
-
- public RevertToVMSnapshotCommand(String vmName, VMSnapshotTO snapshot, List<VolumeTO> volumeTOs, String guestOSType) {
- super(vmName, snapshot, volumeTOs, guestOSType);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/ScaleVmAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ScaleVmAnswer.java b/api/src/com/cloud/agent/api/ScaleVmAnswer.java
deleted file mode 100644
index 31d6e44..0000000
--- a/api/src/com/cloud/agent/api/ScaleVmAnswer.java
+++ /dev/null
@@ -1,28 +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;
-
-public class ScaleVmAnswer extends Answer {
-
- protected ScaleVmAnswer() {
- }
-
- public ScaleVmAnswer(ScaleVmCommand cmd, boolean result, String detail) {
- super(cmd, result, detail);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/ScaleVmCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ScaleVmCommand.java b/api/src/com/cloud/agent/api/ScaleVmCommand.java
deleted file mode 100644
index 35d22ad..0000000
--- a/api/src/com/cloud/agent/api/ScaleVmCommand.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 com.cloud.agent.api;
-
-import com.cloud.agent.api.to.VirtualMachineTO;
-
-public class ScaleVmCommand extends Command {
-
- VirtualMachineTO vm;
- String vmName;
- int cpus;
- Integer speed;
- long minRam;
- long maxRam;
-
- public VirtualMachineTO getVm() {
- return vm;
- }
-
- public void setVm(VirtualMachineTO vm) {
- this.vm = vm;
- }
-
- public int getCpus() {
- return cpus;
- }
-
- public ScaleVmCommand(String vmName, int cpus,
- Integer speed, long minRam, long maxRam, boolean limitCpuUse) {
- super();
- this.vmName = vmName;
- this.cpus = cpus;
- this.speed = speed;
- this.minRam = minRam;
- this.maxRam = maxRam;
- this.vm = new VirtualMachineTO(1L, vmName, null, cpus, speed, minRam, maxRam, null, null, false, false, null);
- /*vm.setName(vmName);
- vm.setCpus(cpus);
- vm.setRam(minRam, maxRam);*/
- }
-
- public void setCpus(int cpus) {
- this.cpus = cpus;
- }
-
- public Integer getSpeed() {
- return speed;
- }
-
- public void setSpeed(Integer speed) {
- this.speed = speed;
- }
-
- public long getMinRam() {
- return minRam;
- }
-
- public void setMinRam(long minRam) {
- this.minRam = minRam;
- }
-
- public long getMaxRam() {
- return maxRam;
- }
-
- public void setMaxRam(long maxRam) {
- this.maxRam = maxRam;
- }
-
- public String getVmName() {
- return vmName;
- }
-
- public void setVmName(String vmName) {
- this.vmName = vmName;
- }
-
- public VirtualMachineTO getVirtualMachine() {
- return vm;
- }
-
- @Override
- public boolean executeInSequence() {
- return true;
- }
-
- protected ScaleVmCommand() {
- }
-
- public ScaleVmCommand(VirtualMachineTO vm) {
- this.vm = vm;
- }
-
- public boolean getLimitCpuUse() {
- // TODO Auto-generated method stub
- return false;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/ScheduleHostScanTaskCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/ScheduleHostScanTaskCommand.java b/api/src/com/cloud/agent/api/ScheduleHostScanTaskCommand.java
deleted file mode 100755
index e938de7..0000000
--- a/api/src/com/cloud/agent/api/ScheduleHostScanTaskCommand.java
+++ /dev/null
@@ -1,32 +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;
-
-/*
- * This is used to schedule an explicit host scan in MS peers. Currently used during
- * add host operation so that correct MS can take host ownership. On receiving the
- * command the scan is scheduled immediately.
- */
-public class ScheduleHostScanTaskCommand extends Command {
- public ScheduleHostScanTaskCommand() {
- }
-
- @Override
- public boolean executeInSequence() {
- return false; // standalone command and can be executed independent of other commands
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/SecStorageFirewallCfgCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/SecStorageFirewallCfgCommand.java b/api/src/com/cloud/agent/api/SecStorageFirewallCfgCommand.java
deleted file mode 100755
index 41a779b..0000000
--- a/api/src/com/cloud/agent/api/SecStorageFirewallCfgCommand.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 com.cloud.agent.api;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class SecStorageFirewallCfgCommand extends Command {
-
- public static class PortConfig {
- boolean add;
- String sourceIp;
- String port;
- String intf;
- public PortConfig(String sourceIp, String port, boolean add, String intf) {
- this.add = add;
- this.sourceIp = sourceIp;
- this.port = port;
- this.intf = intf;
- }
- public PortConfig() {
-
- }
- public boolean isAdd() {
- return add;
- }
- public String getSourceIp() {
- return sourceIp;
- }
- public String getPort() {
- return port;
- }
- public String getIntf() {
- return intf;
- }
- }
-
- private List<PortConfig> portConfigs = new ArrayList<PortConfig>();
- private boolean isAppendAIp = false;
-
- public SecStorageFirewallCfgCommand() {
-
- }
-
- public SecStorageFirewallCfgCommand(boolean isAppend) {
- this.isAppendAIp = isAppend;
- }
-
- public void addPortConfig(String sourceIp, String port, boolean add, String intf) {
- PortConfig pc = new PortConfig(sourceIp, port, add, intf);
- this.portConfigs.add(pc);
-
- }
-
- public boolean getIsAppendAIp() {
- return isAppendAIp;
- }
-
- @Override
- public boolean executeInSequence() {
- return false;
- }
-
-
- public List<PortConfig> getPortConfigs() {
- return portConfigs;
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/SecStorageSetupAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/SecStorageSetupAnswer.java b/api/src/com/cloud/agent/api/SecStorageSetupAnswer.java
deleted file mode 100644
index bb0c016..0000000
--- a/api/src/com/cloud/agent/api/SecStorageSetupAnswer.java
+++ /dev/null
@@ -1,33 +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;
-
-public class SecStorageSetupAnswer extends Answer {
- private String _dir;
- protected SecStorageSetupAnswer() {
- }
-
- public SecStorageSetupAnswer(String dir) {
- super(null, true, "success");
- this._dir = dir;
- }
-
- public String get_dir() {
- return _dir;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/SecStorageSetupCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/SecStorageSetupCommand.java b/api/src/com/cloud/agent/api/SecStorageSetupCommand.java
deleted file mode 100644
index 50c06cf..0000000
--- a/api/src/com/cloud/agent/api/SecStorageSetupCommand.java
+++ /dev/null
@@ -1,83 +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;
-
-import com.cloud.agent.api.LogLevel.Log4jLevel;
-
-public class SecStorageSetupCommand extends Command {
- private String secUrl;
- private Certificates certs;
-
- public static class Certificates {
- @LogLevel(Log4jLevel.Off)
- private String privKey;
- @LogLevel(Log4jLevel.Off)
- private String privCert;
- @LogLevel(Log4jLevel.Off)
- private String certChain;
-
- public Certificates() {
-
- }
-
- public Certificates(String prvKey, String privCert, String certChain) {
- this.privKey = prvKey;
- this.privCert = privCert;
- this.certChain = certChain;
- }
-
- public String getPrivKey() {
- return this.privKey;
- }
-
- public String getPrivCert() {
- return this.privCert;
- }
-
- public String getCertChain() {
- return this.certChain;
- }
- }
-
- public SecStorageSetupCommand() {
- super();
- }
-
- public SecStorageSetupCommand(String secUrl, Certificates certs) {
- super();
- this.secUrl = secUrl;
- this.certs = certs;
- }
-
- @Override
- public boolean executeInSequence() {
- return true;
- }
-
- public String getSecUrl() {
- return secUrl;
- }
-
- public Certificates getCerts() {
- return this.certs;
- }
-
- public void setSecUrl(String secUrl) {
- this.secUrl = secUrl;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/SecStorageVMSetupCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/SecStorageVMSetupCommand.java b/api/src/com/cloud/agent/api/SecStorageVMSetupCommand.java
deleted file mode 100644
index be97709..0000000
--- a/api/src/com/cloud/agent/api/SecStorageVMSetupCommand.java
+++ /dev/null
@@ -1,57 +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;
-
-public class SecStorageVMSetupCommand extends Command {
- String [] allowedInternalSites = new String[0];
- String copyUserName;
- String copyPassword;
-
- public SecStorageVMSetupCommand() {
- super();
- }
-
- @Override
- public boolean executeInSequence() {
- return true;
- }
-
- public String[] getAllowedInternalSites() {
- return allowedInternalSites;
- }
-
- public void setAllowedInternalSites(String[] allowedInternalSites) {
- this.allowedInternalSites = allowedInternalSites;
- }
-
- public String getCopyUserName() {
- return copyUserName;
- }
-
- public void setCopyUserName(String copyUserName) {
- this.copyUserName = copyUserName;
- }
-
- public String getCopyPassword() {
- return copyPassword;
- }
-
- public void setCopyPassword(String copyPassword) {
- this.copyPassword = copyPassword;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/SecurityGroupRuleAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/SecurityGroupRuleAnswer.java b/api/src/com/cloud/agent/api/SecurityGroupRuleAnswer.java
deleted file mode 100644
index 144fea2..0000000
--- a/api/src/com/cloud/agent/api/SecurityGroupRuleAnswer.java
+++ /dev/null
@@ -1,70 +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;
-
-public class SecurityGroupRuleAnswer extends Answer {
- public static enum FailureReason {
- NONE,
- UNKNOWN,
- PROGRAMMING_FAILED,
- CANNOT_BRIDGE_FIREWALL
- }
- Long logSequenceNumber = null;
- Long vmId = null;
- FailureReason reason = FailureReason.NONE;
-
-
- protected SecurityGroupRuleAnswer() {
- }
-
- public SecurityGroupRuleAnswer(SecurityGroupRulesCmd cmd) {
- super(cmd);
- this.logSequenceNumber = cmd.getSeqNum();
- this.vmId = cmd.getVmId();
- }
-
- public SecurityGroupRuleAnswer(SecurityGroupRulesCmd cmd, boolean result, String detail) {
- super(cmd, result, detail);
- this.logSequenceNumber = cmd.getSeqNum();
- this.vmId = cmd.getVmId();
- reason = FailureReason.PROGRAMMING_FAILED;
- }
-
- public SecurityGroupRuleAnswer(SecurityGroupRulesCmd cmd, boolean result, String detail, FailureReason r) {
- super(cmd, result, detail);
- this.logSequenceNumber = cmd.getSeqNum();
- this.vmId = cmd.getVmId();
- reason = r;
- }
-
- public Long getLogSequenceNumber() {
- return logSequenceNumber;
- }
-
- public Long getVmId() {
- return vmId;
- }
-
- public FailureReason getReason() {
- return reason;
- }
-
- public void setReason(FailureReason reason) {
- this.reason = reason;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/SecurityGroupRulesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/SecurityGroupRulesCmd.java b/api/src/com/cloud/agent/api/SecurityGroupRulesCmd.java
deleted file mode 100644
index 4336b4c..0000000
--- a/api/src/com/cloud/agent/api/SecurityGroupRulesCmd.java
+++ /dev/null
@@ -1,304 +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;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.List;
-import java.util.zip.DeflaterOutputStream;
-
-import org.apache.commons.codec.binary.Base64;
-import org.apache.commons.codec.digest.DigestUtils;
-import org.apache.log4j.Logger;
-
-import com.cloud.agent.api.LogLevel.Log4jLevel;
-import com.cloud.utils.net.NetUtils;
-
-
-public class SecurityGroupRulesCmd extends Command {
- private static Logger s_logger = Logger.getLogger(SecurityGroupRulesCmd.class);
- public static class IpPortAndProto {
- private String proto;
- private int startPort;
- private int endPort;
- @LogLevel(Log4jLevel.Trace)
- private String [] allowedCidrs;
-
- public IpPortAndProto() { }
-
- public IpPortAndProto(String proto, int startPort, int endPort,
- String[] allowedCidrs) {
- super();
- this.proto = proto;
- this.startPort = startPort;
- this.endPort = endPort;
- this.allowedCidrs = allowedCidrs;
- }
-
- public String[] getAllowedCidrs() {
- return allowedCidrs;
- }
-
- public void setAllowedCidrs(String[] allowedCidrs) {
- this.allowedCidrs = allowedCidrs;
- }
-
- public String getProto() {
- return proto;
- }
-
- public int getStartPort() {
- return startPort;
- }
-
- public int getEndPort() {
- return endPort;
- }
-
- }
-
-
- String guestIp;
- String vmName;
- String guestMac;
- String signature;
- Long seqNum;
- Long vmId;
- Long msId;
- IpPortAndProto [] ingressRuleSet;
- IpPortAndProto [] egressRuleSet;
- private List<String> secIps;
-
- public SecurityGroupRulesCmd() {
- super();
- }
-
-
- public SecurityGroupRulesCmd(String guestIp, String guestMac, String vmName, Long vmId, String signature, Long seqNum, IpPortAndProto[] ingressRuleSet, IpPortAndProto[] egressRuleSet) {
- super();
- this.guestIp = guestIp;
- this.vmName = vmName;
- this.ingressRuleSet = ingressRuleSet;
- this.egressRuleSet = egressRuleSet;
- this.guestMac = guestMac;
- this.signature = signature;
- this.seqNum = seqNum;
- this.vmId = vmId;
- if (signature == null) {
- String stringified = stringifyRules();
- this.signature = DigestUtils.md5Hex(stringified);
- }
- }
-
-
- public SecurityGroupRulesCmd(String guestIp, String guestMac, String vmName, Long vmId, String signature, Long seqNum, IpPortAndProto[] ingressRuleSet, IpPortAndProto[] egressRuleSet, List<String> secIps) {
- super();
- this.guestIp = guestIp;
- this.vmName = vmName;
- this.ingressRuleSet = ingressRuleSet;
- this.egressRuleSet = egressRuleSet;
- this.guestMac = guestMac;
- this.signature = signature;
- this.seqNum = seqNum;
- this.vmId = vmId;
- if (signature == null) {
- String stringified = stringifyRules();
- this.signature = DigestUtils.md5Hex(stringified);
- }
- this.secIps = secIps;
- }
-
- @Override
- public boolean executeInSequence() {
- return true;
- }
-
-
- public IpPortAndProto[] getIngressRuleSet() {
- return ingressRuleSet;
- }
-
-
- public void setIngressRuleSet(IpPortAndProto[] ingressRuleSet) {
- this.ingressRuleSet = ingressRuleSet;
- }
-
- public IpPortAndProto[] getEgressRuleSet() {
- return egressRuleSet;
- }
-
-
- public void setEgressRuleSet(IpPortAndProto[] egressRuleSet) {
- this.egressRuleSet = egressRuleSet;
- }
-
- public String getGuestIp() {
- return guestIp;
- }
-
- public List<String> getSecIps() {
- return secIps;
- }
-
-
- public String getVmName() {
- return vmName;
- }
-
- public String stringifyRules() {
- StringBuilder ruleBuilder = new StringBuilder();
- for (SecurityGroupRulesCmd.IpPortAndProto ipPandP: getIngressRuleSet()) {
- ruleBuilder.append("I:").append(ipPandP.getProto()).append(":").append(ipPandP.getStartPort()).append(":").append(ipPandP.getEndPort()).append(":");
- for (String cidr: ipPandP.getAllowedCidrs()) {
- ruleBuilder.append(cidr).append(",");
- }
- ruleBuilder.append("NEXT");
- ruleBuilder.append(" ");
- }
- for (SecurityGroupRulesCmd.IpPortAndProto ipPandP: getEgressRuleSet()) {
- ruleBuilder.append("E:").append(ipPandP.getProto()).append(":").append(ipPandP.getStartPort()).append(":").append(ipPandP.getEndPort()).append(":");
- for (String cidr: ipPandP.getAllowedCidrs()) {
- ruleBuilder.append(cidr).append(",");
- }
- ruleBuilder.append("NEXT");
- ruleBuilder.append(" ");
- }
- return ruleBuilder.toString();
- }
-
- //convert cidrs in the form "a.b.c.d/e" to "hexvalue of 32bit ip/e"
- private String compressCidr(String cidr) {
- String [] toks = cidr.split("/");
- long ipnum = NetUtils.ip2Long(toks[0]);
- return Long.toHexString(ipnum) + "/" + toks[1];
- }
-
-
- public String getSecIpsString() {
- StringBuilder sb = new StringBuilder();
- List<String> ips = getSecIps();
- if (ips == null) {
- return "0:";
- } else {
- for (String ip : ips) {
- sb.append(ip).append(":");
- }
- }
- return sb.toString();
- }
-
-
- public String stringifyCompressedRules() {
- StringBuilder ruleBuilder = new StringBuilder();
- for (SecurityGroupRulesCmd.IpPortAndProto ipPandP : getIngressRuleSet()) {
- ruleBuilder.append("I:").append(ipPandP.getProto()).append(":").append(ipPandP.getStartPort()).append(":").append(ipPandP.getEndPort()).append(":");
- for (String cidr: ipPandP.getAllowedCidrs()) {
- //convert cidrs in the form "a.b.c.d/e" to "hexvalue of 32bit ip/e"
- ruleBuilder.append(compressCidr(cidr)).append(",");
- }
- ruleBuilder.append("NEXT");
- ruleBuilder.append(" ");
- }
- for (SecurityGroupRulesCmd.IpPortAndProto ipPandP : getEgressRuleSet()) {
- ruleBuilder.append("E:").append(ipPandP.getProto()).append(":").append(ipPandP.getStartPort()).append(":").append(ipPandP.getEndPort()).append(":");
- for (String cidr: ipPandP.getAllowedCidrs()) {
- //convert cidrs in the form "a.b.c.d/e" to "hexvalue of 32bit ip/e"
- ruleBuilder.append(compressCidr(cidr)).append(",");
- }
- ruleBuilder.append("NEXT");
- ruleBuilder.append(" ");
- }
- return ruleBuilder.toString();
- }
-
- /*
- * Compress the security group rules using zlib compression to allow the call to the hypervisor
- * to scale beyond 8k cidrs.
- */
- public String compressStringifiedRules() {
- StringBuilder ruleBuilder = new StringBuilder();
- for (SecurityGroupRulesCmd.IpPortAndProto ipPandP: getIngressRuleSet()) {
- ruleBuilder.append("I:").append(ipPandP.getProto()).append(":").append(ipPandP.getStartPort()).append(":").append(ipPandP.getEndPort()).append(":");
- for (String cidr: ipPandP.getAllowedCidrs()) {
- ruleBuilder.append(cidr).append(",");
- }
- ruleBuilder.append("NEXT");
- ruleBuilder.append(" ");
- }
- for (SecurityGroupRulesCmd.IpPortAndProto ipPandP: getEgressRuleSet()) {
- ruleBuilder.append("E:").append(ipPandP.getProto()).append(":").append(ipPandP.getStartPort()).append(":").append(ipPandP.getEndPort()).append(":");
- for (String cidr: ipPandP.getAllowedCidrs()) {
- ruleBuilder.append(cidr).append(",");
- }
- ruleBuilder.append("NEXT");
- ruleBuilder.append(" ");
- }
- String stringified = ruleBuilder.toString();
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- try {
- //Note : not using GZipOutputStream since that is for files
- //GZipOutputStream gives a different header, although the compression is the same
- DeflaterOutputStream dzip = new DeflaterOutputStream(out);
- dzip.write(stringified.getBytes());
- dzip.close();
- } catch (IOException e) {
- s_logger.warn("Exception while compressing security group rules");
- return null;
- }
- return Base64.encodeBase64String(out.toByteArray());
- }
-
- public String getSignature() {
- return signature;
- }
-
-
- public String getGuestMac() {
- return guestMac;
- }
-
-
- public Long getSeqNum() {
- return seqNum;
- }
-
-
- public Long getVmId() {
- return vmId;
- }
-
- public int getTotalNumCidrs() {
- //useful for logging
- int count = 0;
- for (IpPortAndProto i: ingressRuleSet) {
- count += i.allowedCidrs.length;
- }
- for (IpPortAndProto i: egressRuleSet) {
- count += i.allowedCidrs.length;
- }
- return count;
- }
-
- public void setMsId(long msId) {
- this.msId = msId;
- }
-
- public Long getMsId() {
- return msId;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/SetupAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/SetupAnswer.java b/api/src/com/cloud/agent/api/SetupAnswer.java
deleted file mode 100644
index 97252a2..0000000
--- a/api/src/com/cloud/agent/api/SetupAnswer.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;
-
-public class SetupAnswer extends Answer {
- // indicate if agent reconnect is needed after setup command
- private boolean _reconnect;
- public SetupAnswer() {}
-
- public SetupAnswer(SetupCommand cmd, boolean reconnect) {
- super(cmd, true, null);
- _reconnect = reconnect;
- }
-
- public SetupAnswer(SetupCommand cmd, String details) {
- super(cmd, false, details);
- _reconnect = true;
- }
- public boolean needReconnect() {
- return _reconnect;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c11dbad9/api/src/com/cloud/agent/api/SetupCommand.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/SetupCommand.java b/api/src/com/cloud/agent/api/SetupCommand.java
deleted file mode 100644
index ee43c59..0000000
--- a/api/src/com/cloud/agent/api/SetupCommand.java
+++ /dev/null
@@ -1,60 +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;
-
-import com.cloud.host.HostEnvironment;
-
-public class SetupCommand extends Command {
-
- HostEnvironment env;
- boolean multipath;
- boolean needSetup;
-
- public boolean needSetup() {
- return needSetup;
- }
-
- public void setNeedSetup(boolean setup) {
- this.needSetup = setup;
- }
-
- public SetupCommand(HostEnvironment env) {
- this.env = env;
- this.multipath = false;
- this.needSetup = false;
- }
-
- public HostEnvironment getEnvironment() {
- return env;
- }
-
- protected SetupCommand() {
- }
-
- public void setMultipathOn() {
- this.multipath = true;
- }
-
- public boolean useMultipath() {
- return multipath;
- }
-
- @Override
- public boolean executeInSequence() {
- return true;
- }
-}