cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [2/8] git commit: updated refs/heads/vpc_simulator to 930ca7f
Date Tue, 04 Jun 2013 16:11:48 GMT
Enable the bean for network manager

Signed-off-by: Prasanna Santhanam <tsp@apache.org>


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

Branch: refs/heads/vpc_simulator
Commit: 6318e6468df4b6e4d3f03ba33e2c3630a8ba65a8
Parents: 0cba360
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Tue Jun 4 19:47:23 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Tue Jun 4 21:41:34 2013 +0530

----------------------------------------------------------------------
 client/tomcatconf/applicationContext.xml.in        |    1 +
 .../cloud/agent/manager/MockNetworkManager.java    |   77 +++++++++
 .../agent/manager/MockNetworkManagerImpl.java      |  130 +++++++++++++++
 3 files changed, 208 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6318e646/client/tomcatconf/applicationContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in
index e2bde8f..049e483 100644
--- a/client/tomcatconf/applicationContext.xml.in
+++ b/client/tomcatconf/applicationContext.xml.in
@@ -803,6 +803,7 @@
   <bean id="mockAgentManagerImpl" class="com.cloud.agent.manager.MockAgentManagerImpl"
/>
   <bean id="mockStorageManagerImpl" class="com.cloud.agent.manager.MockStorageManagerImpl"
/>
   <bean id="mockVmManagerImpl" class="com.cloud.agent.manager.MockVmManagerImpl" />
+  <bean id="mockNetworkManagerImpl" class="com.cloud.agent.manager.MockNetworkManagerImpl"
/>
   <bean id="simulatorManagerImpl" class="com.cloud.agent.manager.SimulatorManagerImpl"
/>
   <bean id="vMSnapshotManagerImpl" class="com.cloud.vm.snapshot.VMSnapshotManagerImpl"
/>
   <bean id="volumeManagerImpl" class="com.cloud.storage.VolumeManagerImpl" />

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6318e646/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockNetworkManager.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockNetworkManager.java
b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockNetworkManager.java
new file mode 100644
index 0000000..61a556a
--- /dev/null
+++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockNetworkManager.java
@@ -0,0 +1,77 @@
+/*
+ * 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.manager;
+
+import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.CheckS2SVpnConnectionsCommand;
+import com.cloud.agent.api.NetworkUsageCommand;
+import com.cloud.agent.api.PlugNicCommand;
+import com.cloud.agent.api.PvlanSetupCommand;
+import com.cloud.agent.api.UnPlugNicCommand;
+import com.cloud.agent.api.routing.DhcpEntryCommand;
+import com.cloud.agent.api.routing.IpAssocCommand;
+import com.cloud.agent.api.routing.IpAssocVpcCommand;
+import com.cloud.agent.api.routing.LoadBalancerConfigCommand;
+import com.cloud.agent.api.routing.SetFirewallRulesCommand;
+import com.cloud.agent.api.routing.SetNetworkACLCommand;
+import com.cloud.agent.api.routing.SetPortForwardingRulesCommand;
+import com.cloud.agent.api.routing.SetPortForwardingRulesVpcCommand;
+import com.cloud.agent.api.routing.SetSourceNatCommand;
+import com.cloud.agent.api.routing.SetStaticNatRulesCommand;
+import com.cloud.agent.api.routing.SetStaticRouteCommand;
+import com.cloud.agent.api.routing.Site2SiteVpnCfgCommand;
+import com.cloud.utils.component.Manager;
+
+public interface MockNetworkManager extends Manager {
+
+    Answer SetStaticNatRules(SetStaticNatRulesCommand cmd);
+
+    Answer SetPortForwardingRules(SetPortForwardingRulesCommand cmd);
+
+    Answer SetFirewallRules(SetFirewallRulesCommand cmd);
+
+    Answer getNetworkUsage(NetworkUsageCommand cmd);
+
+    Answer IpAssoc(IpAssocCommand cmd);
+
+    Answer LoadBalancerConfig(LoadBalancerConfigCommand cmd);
+
+    Answer AddDhcpEntry(DhcpEntryCommand cmd);
+
+    Answer setupPVLAN(PvlanSetupCommand cmd);
+
+    Answer plugNic(PlugNicCommand cmd);
+
+    Answer unplugNic(UnPlugNicCommand cmd);
+
+    Answer ipAssoc(IpAssocVpcCommand cmd);
+
+    Answer setSourceNat(SetSourceNatCommand cmd);
+
+    Answer setNetworkAcl(SetNetworkACLCommand cmd);
+
+    Answer setVpcPortForwards(SetPortForwardingRulesVpcCommand cmd);
+
+    Answer setStaticRoute(SetStaticRouteCommand cmd);
+
+    Answer siteToSiteVpn(Site2SiteVpnCfgCommand cmd);
+
+    Answer checkSiteToSiteVpnConnection(CheckS2SVpnConnectionsCommand cmd);
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6318e646/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockNetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockNetworkManagerImpl.java
b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockNetworkManagerImpl.java
new file mode 100644
index 0000000..232146a
--- /dev/null
+++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockNetworkManagerImpl.java
@@ -0,0 +1,130 @@
+/*
+ * 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.manager;
+
+import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.CheckS2SVpnConnectionsCommand;
+import com.cloud.agent.api.NetworkUsageAnswer;
+import com.cloud.agent.api.NetworkUsageCommand;
+import com.cloud.agent.api.PlugNicCommand;
+import com.cloud.agent.api.PvlanSetupCommand;
+import com.cloud.agent.api.UnPlugNicCommand;
+import com.cloud.agent.api.routing.DhcpEntryCommand;
+import com.cloud.agent.api.routing.IpAssocCommand;
+import com.cloud.agent.api.routing.IpAssocVpcCommand;
+import com.cloud.agent.api.routing.LoadBalancerConfigCommand;
+import com.cloud.agent.api.routing.SetFirewallRulesCommand;
+import com.cloud.agent.api.routing.SetNetworkACLCommand;
+import com.cloud.agent.api.routing.SetPortForwardingRulesCommand;
+import com.cloud.agent.api.routing.SetPortForwardingRulesVpcCommand;
+import com.cloud.agent.api.routing.SetSourceNatCommand;
+import com.cloud.agent.api.routing.SetStaticNatRulesCommand;
+import com.cloud.agent.api.routing.SetStaticRouteCommand;
+import com.cloud.agent.api.routing.Site2SiteVpnCfgCommand;
+import com.cloud.utils.component.ManagerBase;
+
+public class MockNetworkManagerImpl extends ManagerBase implements MockNetworkManager {
+
+    @Override
+    public Answer SetStaticNatRules(SetStaticNatRulesCommand cmd) {
+        return new Answer(cmd);
+    }
+
+    @Override
+    public Answer SetPortForwardingRules(SetPortForwardingRulesCommand cmd) {
+        return new Answer(cmd);
+    }
+
+    @Override
+    public Answer SetFirewallRules(SetFirewallRulesCommand cmd) {
+        return new Answer(cmd);
+    }
+
+
+    @Override
+    public NetworkUsageAnswer getNetworkUsage(NetworkUsageCommand cmd) {
+        return new NetworkUsageAnswer(cmd, null, 100L, 100L);
+    }
+
+    @Override
+    public Answer IpAssoc(IpAssocCommand cmd) {
+        return new Answer(cmd);
+    }
+
+    @Override
+    public Answer LoadBalancerConfig(LoadBalancerConfigCommand cmd) {
+        return new Answer(cmd);
+    }
+
+    @Override
+    public Answer AddDhcpEntry(DhcpEntryCommand cmd) {
+        return new Answer(cmd);
+    }
+
+    @Override
+    public Answer setupPVLAN(PvlanSetupCommand cmd) {
+        return new Answer(cmd);
+    }
+
+    @Override
+    public Answer plugNic(PlugNicCommand cmd) {
+        return new Answer(cmd);
+    }
+
+    @Override
+    public Answer unplugNic(UnPlugNicCommand cmd) {
+        return new Answer(cmd);
+    }
+
+    @Override
+    public Answer ipAssoc(IpAssocVpcCommand cmd) {
+        return new Answer(cmd);
+    }
+
+    @Override
+    public Answer setSourceNat(SetSourceNatCommand cmd) {
+        return new Answer(cmd);
+    }
+
+    @Override
+    public Answer setNetworkAcl(SetNetworkACLCommand cmd) {
+        return new Answer(cmd);
+    }
+
+    @Override
+    public Answer setVpcPortForwards(SetPortForwardingRulesVpcCommand cmd) {
+        return new Answer(cmd);
+    }
+
+    @Override
+    public Answer setStaticRoute(SetStaticRouteCommand cmd) {
+        return new Answer(cmd);
+    }
+
+    @Override
+    public Answer siteToSiteVpn(Site2SiteVpnCfgCommand cmd) {
+        return new Answer(cmd);
+    }
+
+    @Override
+    public Answer checkSiteToSiteVpnConnection(CheckS2SVpnConnectionsCommand cmd) {
+        return new Answer(cmd);
+    }
+}


Mime
View raw message