Skip to content

Commit 392ae5c

Browse files
Murali reddyMurali reddy
authored andcommitted
moving out Srx code into Plugins/network-elements
1 parent 422c4ce commit 392ae5c

22 files changed

Lines changed: 166 additions & 32 deletions

build/build-cloud.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@
479479

480480
<target name="build-servers" depends="-init, build-server" />
481481

482-
<target name="build-opensource" depends="-init, build-server, build-agent, build-scripts, build-ui, build-console-proxy, build-ovm, package-oss-systemvm-iso, build-netscaler, build-f5, build-dp-user-dispersing">
482+
<target name="build-opensource" depends="-init, build-server, build-agent, build-scripts, build-ui, build-console-proxy, build-ovm, package-oss-systemvm-iso, build-netscaler, build-f5, build-srx, build-dp-user-dispersing">
483483
<copy overwrite="true" todir="${dist.dir}">
484484
<fileset dir="${base.dir}/build/deploy/">
485485
<include name="deploy-agent.sh" />
@@ -586,7 +586,7 @@
586586
<delete dir="${unittest.dir}"/>
587587
</target>
588588

589-
<target name="compile-all" description="Compile all of the jars" depends="compile-utils, compile-api, compile-core, compile-server, compile-ovm, compile-netscaler, compile-f5"/>
589+
<target name="compile-all" description="Compile all of the jars" depends="compile-utils, compile-api, compile-core, compile-server, compile-ovm, compile-netscaler, compile-f5, compile-srx"/>
590590

591591
<target name="clean-all" depends="clean, clean-awsapi" description="Clean all of the generated files, including dependency cache and javadoc">
592592
<delete dir="${target.dir}" />
@@ -616,4 +616,10 @@
616616
</target>
617617
<target name="build-f5" depends="compile-f5"/>
618618

619+
<!-- ===================== Cloud-Plugin-Srx.Jar ===================== -->
620+
<target name="compile-srx" depends="-init, compile-server" description="Compile SRX plugin">
621+
<ant antfile="${base.dir}/plugins/network-elements/juniper-srx/build.xml" target="build"/>
622+
</target>
623+
<target name="build-srx" depends="compile-srx"/>
624+
619625
</project>

client/tomcatconf/components.xml.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@
160160
<pluggableservice name="VirtualRouterElementService" key="com.cloud.network.element.VirtualRouterElementService" class="com.cloud.network.element.VirtualRouterElement"/>
161161
<pluggableservice name="NetscalerExternalLoadBalancerElementService" key="com.cloud.network.element.NetscalerLoadBalancerElementService" class="com.cloud.network.element.NetscalerElement"/>
162162
<pluggableservice name="F5ExternalLoadBalancerElementService" key="com.cloud.network.element.F5ExternalLoadBalancerElementService" class="com.cloud.network.element.F5ExternalLoadBalancerElement"/>
163+
<pluggableservice name="JuniperSRXFirewallElementService" key="com.cloud.network.element.JuniperSRXFirewallElementService" class="com.cloud.network.element.JuniperSRXExternalFirewallElement"/>
163164
<dao name="NetScalerPodDao" class="com.cloud.network.dao.NetScalerPodDaoImpl" singleton="false"/>
164165
</management-server>
165166

plugins/network-elements/f5/src/com/cloud/api/AddExternalLoadBalancerCmd.java renamed to plugins/network-elements/f5/src/com/cloud/api/commands/AddExternalLoadBalancerCmd.java

File renamed without changes.

plugins/network-elements/f5/src/com/cloud/api/DeleteExternalLoadBalancerCmd.java renamed to plugins/network-elements/f5/src/com/cloud/api/commands/DeleteExternalLoadBalancerCmd.java

File renamed without changes.

plugins/network-elements/f5/src/com/cloud/api/ListExternalLoadBalancersCmd.java renamed to plugins/network-elements/f5/src/com/cloud/api/commands/ListExternalLoadBalancersCmd.java

File renamed without changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
5+
<classpathentry combineaccessrules="false" kind="src" path="/api"/>
6+
<classpathentry combineaccessrules="false" kind="src" path="/core"/>
7+
<classpathentry combineaccessrules="false" kind="src" path="/server"/>
8+
<classpathentry combineaccessrules="false" kind="src" path="/utils"/>
9+
<classpathentry combineaccessrules="false" kind="src" path="/deps"/>
10+
<classpathentry kind="output" path="bin"/>
11+
</classpath>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>srx</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one or more
4+
contributor license agreements. See the NOTICE file distributed with
5+
this work for additional information regarding copyright ownership.
6+
The ASF licenses this file to You under the Apache License, Version 2.0
7+
(the "License"); you may not use this file except in compliance with
8+
the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
19+
20+
<project name="Cloud Stack SRX network element" default="help" basedir=".">
21+
<description>
22+
Cloud Stack ant build file
23+
</description>
24+
25+
<dirname property="srx.base.dir" file="${ant.file.Cloud Stack SRX network element}/"/>
26+
<!-- This directory must be set -->
27+
<property name="top.dir" location="${srx.base.dir}/../../.."/>
28+
<property name="build.dir" location="${top.dir}/build"/>
29+
30+
<echo message="build.dir=${build.dir}; top.dir=${top.dir}; srx.base.dir=${srx.base.dir}"/>
31+
32+
<!-- Import anything that the user wants to set-->
33+
<!-- Import properties files and environment variables here -->
34+
35+
<property environment="env" />
36+
37+
<condition property="build-cloud.properties.file" value="${build.dir}/override/build-cloud.properties" else="${build.dir}/build-cloud.properties">
38+
<available file="${build.dir}/override/build-cloud.properties" />
39+
</condition>
40+
41+
<condition property="cloud.properties.file" value="${build.dir}/override/cloud.properties" else="${build.dir}/cloud.properties">
42+
<available file="${build.dir}/override/cloud.properties" />
43+
</condition>
44+
45+
<condition property="override.file" value="${build.dir}/override/replace.properties" else="${build.dir}/replace.properties">
46+
<available file="${build.dir}/override/replace.properties" />
47+
</condition>
48+
49+
<echo message="Using build parameters from ${build-cloud.properties.file}" />
50+
<property file="${build-cloud.properties.file}" />
51+
52+
<echo message="Using company info from ${cloud.properties.file}" />
53+
<property file="${cloud.properties.file}" />
54+
55+
<echo message="Using override file from ${override.file}" />
56+
<property file="${override.file}" />
57+
58+
<property file="${build.dir}/build.number" />
59+
60+
<!-- In case these didn't get defined in the build-cloud.properties -->
61+
<property name="branding.name" value="default" />
62+
<property name="deprecation" value="off" />
63+
<property name="target.compat.version" value="1.6" />
64+
<property name="source.compat.version" value="1.6" />
65+
<property name="debug" value="true" />
66+
<property name="debuglevel" value="lines,source"/>
67+
68+
<echo message="target.dir=${target.dir}; top.dir=${top.dir}"/>
69+
<!-- directories for build and distribution -->
70+
<property name="target.dir" location="${top.dir}/target" />
71+
<property name="classes.dir" location="${target.dir}/classes" />
72+
<property name="jar.dir" location="${target.dir}/jar" />
73+
<property name="dep.cache.dir" location="${target.dir}/dep-cache" />
74+
<property name="build.log" location="${target.dir}/ant_verbose.txt" />
75+
76+
<property name="deps.dir" location="${top.dir}/deps" />
77+
78+
<property name="cloud-plugin-srx.jar" value="cloud-plugin-srx.jar" />
79+
80+
<import file="${build.dir}/build-common.xml"/>
81+
82+
<echo message="target.dir=${target.dir}; top.dir=${top.dir}"/>
83+
84+
<!-- This section needs to be replaced by some kind of dependency library-->
85+
<path id="deps.classpath">
86+
<!--filelist files="${deps.classpath}" /-->
87+
<fileset dir="${deps.dir}" erroronmissingdir="false">
88+
<include name="*.jar" />
89+
</fileset>
90+
</path>
91+
92+
<path id="cloudstack.classpath">
93+
<fileset dir="${jar.dir}">
94+
<include name="*.jar"/>
95+
</fileset>
96+
</path>
97+
98+
<path id="srx.classpath">
99+
<path refid="deps.classpath"/>
100+
<path refid="cloudstack.classpath"/>
101+
</path>
102+
103+
<!-- This section needs to be replaced by some kind of dependency library-->
104+
105+
<target name="deploy-srx" >
106+
</target>
107+
108+
<target name="init" description="Initialize binaries directory">
109+
<mkdir dir="${classes.dir}/${cloud-plugin-srx.jar}"/>
110+
<mkdir dir="${jar.dir}"/>
111+
</target>
112+
113+
<target name="compile-srx" depends="init" description="Compile Srx">
114+
<compile-java jar.name="${cloud-plugin-srx.jar}" top.dir="${srx.base.dir}" classpath="srx.classpath" />
115+
</target>
116+
117+
<target name="clean-srx">
118+
<delete dir="${classes.dir}/${cloud-plugin-srx.jar}"/>
119+
</target>
120+
121+
<target name="build" depends="compile-srx"/>
122+
<target name="clean" depends="clean-srx"/>
123+
124+
<target name="help" description="help">
125+
<echo level="info" message="This is the build file for F5 network element plugin"/>
126+
<echo level="info" message="You can do a build by doing ant build or clean by doing ant clean" />
127+
</target>
128+
129+
</project>

server/src/com/cloud/api/commands/AddExternalFirewallCmd.java renamed to plugins/network-elements/juniper-srx/src/com/cloud/api/commands/AddExternalFirewallCmd.java

File renamed without changes.

server/src/com/cloud/api/commands/AddSrxFirewallCmd.java renamed to plugins/network-elements/juniper-srx/src/com/cloud/api/commands/AddSrxFirewallCmd.java

File renamed without changes.

0 commit comments

Comments
 (0)