You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ko...@apache.org on 2013/02/11 19:40:16 UTC

[5/7] git commit: refs/heads/cisco-vnmc-api-integration - Added new commands for the following: a. Logical edge firewall creation in VNMC b. Asa1kv vservice node creation and updating asa1kv inside port profile with guest network vlan id in n1kv VSM

Added new commands for the following:
a. Logical edge firewall creation in VNMC
b. Asa1kv vservice node creation and updating asa1kv inside port profile with guest network vlan id in n1kv VSM


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

Branch: refs/heads/cisco-vnmc-api-integration
Commit: dc402eaa7a67c1b457ccf2243a0e53371a0bcfa9
Parents: d6cdfe3
Author: Koushik Das <ko...@citrix.com>
Authored: Mon Feb 11 23:35:19 2013 +0530
Committer: Koushik Das <ko...@citrix.com>
Committed: Mon Feb 11 23:35:19 2013 +0530

----------------------------------------------------------------------
 .../agent/api/ConfigureNexusVsmForAsaCommand.java  |   95 +++++++++++++++
 .../api/CreateLogicalEdgeFirewallCommand.java      |   84 +++++++++++++
 2 files changed, 179 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/dc402eaa/plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/ConfigureNexusVsmForAsaCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/ConfigureNexusVsmForAsaCommand.java b/plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/ConfigureNexusVsmForAsaCommand.java
new file mode 100755
index 0000000..3f62096
--- /dev/null
+++ b/plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/ConfigureNexusVsmForAsaCommand.java
@@ -0,0 +1,95 @@
+// 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;
+
+/*
+ * Command for configuring n1kv VSM for asa1kv device. It does the following in VSM:
+ * a. creating vservice node for asa1kv
+ * b. updating vlan of inside port profile associated with asa1kv
+ */
+public class ConfigureNexusVsmForAsaCommand extends Command {
+    private long _vlanId;
+    private String _ipAddress;
+    private String _vsmUsername;
+    private String _vsmPassword;
+    private String _vsmIp;
+    private String _asaInPortProfile;
+
+    public ConfigureNexusVsmForAsaCommand(long vlanId, String ipAddress,
+    		String vsmUsername, String vsmPassword, String vsmIp, String asaInPortProfile) {
+        super();
+        this._vlanId = vlanId;
+        this._ipAddress = ipAddress;
+        this._vsmUsername = vsmUsername;
+        this._vsmPassword = vsmPassword;
+        this._vsmIp = vsmIp;
+        this._asaInPortProfile = asaInPortProfile;
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+    public long getVlanId() {
+        return _vlanId;
+    }
+
+    public void setVlanId(long _vlanId) {
+        this._vlanId = _vlanId;
+    }
+
+    public String getIpAddress() {
+        return _ipAddress;
+    }
+
+    public void setIpAddress(String _ipAddress) {
+        this._ipAddress = _ipAddress;
+    }
+
+	public String getVsmUsername() {
+		return _vsmUsername;
+	}
+
+	public void setVsmUsername(String _vsmUsername) {
+		this._vsmUsername = _vsmUsername;
+	}
+
+	public String getVsmPassword() {
+		return _vsmPassword;
+	}
+
+	public void setVsmPassword(String _vsmPassword) {
+		this._vsmPassword = _vsmPassword;
+	}
+
+	public String getVsmIp() {
+		return _vsmIp;
+	}
+
+	public void setVsmIp(String _vsmIp) {
+		this._vsmIp = _vsmIp;
+	}
+
+	public String getAsaInPortProfile() {
+		return _asaInPortProfile;
+	}
+
+	public void setAsaInPortProfile(String _asaInPortProfile) {
+		this._asaInPortProfile = _asaInPortProfile;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/dc402eaa/plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/CreateLogicalEdgeFirewallCommand.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/CreateLogicalEdgeFirewallCommand.java b/plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/CreateLogicalEdgeFirewallCommand.java
new file mode 100755
index 0000000..9c0310b
--- /dev/null
+++ b/plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/CreateLogicalEdgeFirewallCommand.java
@@ -0,0 +1,84 @@
+// 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;
+
+/*
+ * Command for creating a logical edge firewall in VNMC
+ */
+public class CreateLogicalEdgeFirewallCommand extends Command {
+    private long _vlanId;
+    private String _publicIp;
+    private String _internalIp;
+    private String _publicSubnet;
+    private String _internalSubnet;
+
+    public CreateLogicalEdgeFirewallCommand(long vlanId,
+            String publicIp, String internalIp,
+            String publicSubnet, String internalSubnet) {
+        super();
+        this._vlanId = vlanId;
+        this._publicIp = publicIp;
+        this._internalIp = internalIp;
+        this._publicSubnet = publicSubnet;
+        this.setInternalSubnet(internalSubnet);
+    }
+
+    @Override
+    public boolean executeInSequence() {
+        return false;
+    }
+
+    public long getVlanId() {
+        return _vlanId;
+    }
+
+    public void setVlanId(long vlanId) {
+        this._vlanId = vlanId;
+    }
+
+    public String getPublicIp() {
+        return _publicIp;
+    }
+
+    public void setPublicIp(String publicIp) {
+        this._publicIp = publicIp;
+    }
+
+    public String getInternalIp() {
+        return _internalIp;
+    }
+
+    public void setInternalIp(String internalIp) {
+        this._internalIp = internalIp;
+    }
+
+    public String getPublicSubnet() {
+        return _publicSubnet;
+    }
+
+    public void setPublicSubnet(String publicSubnet) {
+        this._publicSubnet = publicSubnet;
+    }
+
+    public String getInternalSubnet() {
+        return _internalSubnet;
+    }
+
+    public void setInternalSubnet(String _internalSubnet) {
+        this._internalSubnet = _internalSubnet;
+    }
+}