Skip to content

Commit 550b225

Browse files
Murali reddyMurali reddy
authored andcommitted
Moving out XenServer support code into plugins/hypervisors/xen
1 parent 367e32a commit 550b225

19 files changed

Lines changed: 182 additions & 4 deletions

‎build/build-cloud-plugins.xml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,21 @@
198198

199199
<!-- ===================== Hypervisors ========================= -->
200200

201-
<target name="compile-hypervisors" depends="compile-ovm" description="Compile all hypervisors"/>
202-
<target name="build-hypervisors" depends="build-ovm" description="Builds all hypervisors"/>
201+
<target name="compile-hypervisors" depends="compile-ovm, compile-xen" description="Compile all hypervisors"/>
202+
<target name="build-hypervisors" depends="build-ovm, build-xen" description="Builds all hypervisors"/>
203203

204204
<target name="compile-ovm" depends="-init, compile-server" description="Compile OVM">
205205
<ant antfile="${base.dir}/plugins/hypervisors/ovm/build.xml" target="build"/>
206206
</target>
207207
<target name="build-ovm" depends="compile-ovm" />
208208

209209

210+
<target name="compile-xen" depends="-init, compile-server" description="Compiles Xen ">
211+
<ant antfile="${base.dir}/plugins/hypervisors/xen/build.xml" target="build"/>
212+
</target>
213+
<target name="build-xen" depends="compile-xen" />
214+
215+
210216
<!-- ===================== Deployment Planners ================= -->
211217

212218
<target name="compile-deployment-planners" depends="compile-dp-user-dispersing, compile-dp-user-concentrated-pod" description="Compile all dp's"/>

‎plugins/hypervisors/xen/.classpath‎

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="/core"/>
6+
<classpathentry combineaccessrules="false" kind="src" path="/utils"/>
7+
<classpathentry combineaccessrules="false" kind="src" path="/server"/>
8+
<classpathentry combineaccessrules="false" kind="src" path="/api"/>
9+
<classpathentry combineaccessrules="false" kind="src" path="/deps"/>
10+
<classpathentry kind="output" path="bin"/>
11+
</classpath>

‎plugins/hypervisors/xen/.project‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>Xen</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.python.pydev.PyDevBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.jdt.core.javabuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>org.python.pydev.pythonNature</nature>
22+
</natures>
23+
</projectDescription>

‎plugins/hypervisors/xen/build.xml‎

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
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 Xen" default="help" basedir=".">
21+
<description>
22+
Cloud Stack ant build file
23+
</description>
24+
25+
<dirname property="xen.base.dir" file="${ant.file.Cloud Stack Xen}/"/>
26+
<!-- This directory must be set -->
27+
<property name="top.dir" location="${xen.base.dir}/../../.."/>
28+
<property name="build.dir" location="${top.dir}/build"/>
29+
30+
<echo message="build.dir=${build.dir}; top.dir=${top.dir}; xen.base.dir=${xen.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="xen.jar" value="cloud-xen.jar" />
79+
<property name="xen-scripts.dir" location="${base.dir}/plugins/hypervisors/xen/scripts" />
80+
81+
<import file="${build.dir}/build-common.xml"/>
82+
83+
<echo message="target.dir=${target.dir}; top.dir=${top.dir}"/>
84+
85+
<!-- This section needs to be replaced by some kind of dependency library-->
86+
<path id="deps.classpath">
87+
<!--filelist files="${deps.classpath}" /-->
88+
<fileset dir="${deps.dir}" erroronmissingdir="false">
89+
<include name="*.jar" />
90+
</fileset>
91+
</path>
92+
93+
<path id="cloudstack.classpath">
94+
<fileset dir="${jar.dir}">
95+
<include name="*.jar"/>
96+
</fileset>
97+
</path>
98+
99+
<path id="xen.classpath">
100+
<path refid="deps.classpath"/>
101+
<path refid="cloudstack.classpath"/>
102+
</path>
103+
104+
<!-- This section needs to be replaced by some kind of dependency library-->
105+
106+
<target name="deploy-xen" >
107+
<copy todir="${server.deploy.to.dir}/webapps/client/WEB-INF/lib/scripts">
108+
<fileset dir="${xen-scripts.dir}">
109+
<include name="**/*"/>
110+
</fileset>
111+
</copy>
112+
</target>
113+
114+
<target name="init" description="Initialize binaries directory">
115+
<mkdir dir="${classes.dir}/${xen.jar}"/>
116+
<mkdir dir="${jar.dir}"/>
117+
</target>
118+
119+
<target name="compile-xen" depends="init" description="Compiles Xen ">
120+
<compile-java jar.name="${xen.jar}" top.dir="${xen.base.dir}" classpath="xen.classpath" />
121+
</target>
122+
123+
<target name="help" description="help">
124+
<echo level="info" message="This is the build file for xenserver"/>
125+
<echo level="info" message="You can do a build by doing ant build or clean by ant clean" />
126+
</target>
127+
128+
<target name="clean-xen">
129+
<delete dir="${classes.dir}/${xen.jar}"/>
130+
</target>
131+
132+
<target name="build" depends="compile-xen"/>
133+
<target name="clean" depends="clean-xen"/>
134+
135+
</project>
File renamed without changes.

server/src/com/cloud/hypervisor/XenServerGuru.java renamed to plugins/hypervisors/xen/src/com/cloud/hypervisor/XenServerGuru.java

File renamed without changes.

server/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java renamed to plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java

File renamed without changes.

core/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java renamed to plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java

File renamed without changes.

core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java renamed to plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java

File renamed without changes.

core/src/com/cloud/hypervisor/xen/resource/XcpServerResource.java renamed to plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XcpServerResource.java

File renamed without changes.

0 commit comments

Comments
 (0)