Merge branch 'api_refactoring' into javelin

This commit is contained in:
Alex Huang 2013-01-08 12:36:04 -08:00
commit 30f2565d98
2016 changed files with 98466 additions and 36127 deletions

15
.gitignore vendored
View File

@ -33,6 +33,9 @@ dist/
cloud-*.tar.bz2 cloud-*.tar.bz2
*.log *.log
*.pyc *.pyc
*.egginfo/
*.egg-info/
*.prefs
build.number build.number
api.log.*.gz api.log.*.gz
cloud.log.*.* cloud.log.*.*
@ -45,6 +48,10 @@ deps/awsapi-lib/
git-remote-https.exe.stackdump git-remote-https.exe.stackdump
*.swp *.swp
tools/devcloud/devcloudbox/.vagrant tools/devcloud/devcloudbox/.vagrant
tools/cli/cloudmonkey/marvin/
tools/cli/cloudmonkey/precache.py
tools/marvin/marvin/cloudstackAPI/
tools/cli/build/
*.jar *.jar
*.war *.war
*.mar *.mar
@ -59,3 +66,11 @@ awsapi/modules/*
.settings.xml .settings.xml
.settings/ .settings/
db.properties.override db.properties.override
awsapi/overlays/
tools/marvin/marvin/cloudstackAPI/*
*.egg-info/
docs/tmp
docs/publish
docs/runbook/tmp
docs/runbook/publish
Gemfile.lock

37
CHANGES Normal file
View File

@ -0,0 +1,37 @@
Apache CloudStack (Incubating) CHANGES
======================================
Full release notes for each release are located in the project's documentation website: http://incubator.apache.org/cloudstack/docs
Version 4.0.0-incubating
------------------------
This is the first release of CloudStack from within the Apache Software Foundation.
Build Tool Changes:
* The project now uses a combination of maven3 and ant for building
* License header auditing is now implemented via the Apache RAT Maven plugin
* Some integrations have been disabled in the default build, due to the license types of our dependencies (See README.md for details on how to build with the optional capabilities)
New Features:
* Inter-VLAN Routing (VPC)
* Site-to-Site VPN
* Local Storage Support for Data Volumes
* Virtual Resource Tagging
* Secure Console Access on XenServer
* Added the ability to create a VM without immediately starting it (via API)
* Upload an Existing Volume to a Virtual Machine
* Dedicated High-Availability Hosts
* Support for Amazon Web Services API (formerly a separate package)
* AWS API Extensions to include Tagging
* Support for Nicira NVP (L2)
* Ceph RBD Support for KVM
* Support for Caringo as Secondary Storage
* KVM Hypervisor support upgraded to work with Ubuntu 12.04 and RHEL 6.3
Security Fixes:
* CVE-2012-4501: Apache CloudStack configuration vulnerability

View File

@ -1,19 +1,16 @@
This document describes how to set up and configure a single server CloudStack This document describes how to develop, build, package and install Apache CloudStack
development environment. If you aren't looking for a development environment, (Incubating). For more information please refer to the project's website:
the easiest way to deploy CloudStack is by using RPM or DEB packages from:
- http://cloudstack.org/download.html http://incubator.apache.org/cloudstack
- http://jenkins.cloudstack.org (CI/Build server)
- http://cloudstack.apt-get.eu (Debian repository)
CloudStack developers use various platforms for development, this guide will Apache CloudStack developers use various platforms for development, this guide
focus on CentOS and was tested against a CentOS 6.2 x86_64 setup. was tested against a CentOS 6.2 x86_64 setup.
Refer to the [wiki](http://cwiki.apache.org/confluence/display/CLOUDSTACK/Index) Refer to the [wiki](http://cwiki.apache.org/confluence/display/CLOUDSTACK/Index)
for the latest information, especially: for the latest information, especially:
- [Setting up development environment](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+CloudStack+Development+Environment) for CloudStack. - [Setting up development environment](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+CloudStack+Development+Environment) for Apache CloudStack.
- [Building](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building+with+Maven) CloudStack. - [Building](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Building) Apache CloudStack.
## Setting up Development Environment ## Setting up Development Environment
@ -32,7 +29,7 @@ Set up Maven (3.0.4):
$ echo export M2_HOME=/usr/local/apache-maven-3.0.4 >> ~/.bashrc # or .zshrc or .profile $ echo export M2_HOME=/usr/local/apache-maven-3.0.4 >> ~/.bashrc # or .zshrc or .profile
$ echo export PATH=${M2_HOME}/bin:${PATH} >> ~/.bashrc # or .zshrc or .profile $ echo export PATH=${M2_HOME}/bin:${PATH} >> ~/.bashrc # or .zshrc or .profile
Note: Tomcat 6.0.35 has some known issue with CloudStack, please use Tomcat Note: Tomcat 6.0.35 has some known issue with Apache CloudStack, please use Tomcat
6.0.33 from http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.33/bin 6.0.33 from http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.33/bin
### Configure Environment ### Configure Environment
@ -50,22 +47,22 @@ Generate you ssh keys, useful for ssh-ing to your hosts and vm etc.:
$ ssh-keygen -t rsa -q $ ssh-keygen -t rsa -q
CloudStack uses some ports, make sure at least those used by the management Apache CloudStack uses some ports, make sure at least those used by the management
server are available and not blocked by any local firewall. Following ports are server are available and not blocked by any local firewall. Following ports are
used by CloudStack and its entities: used by Apache CloudStack and its entities:
8787: CloudStack (Tomcat) debug socket 8787: Apache CloudStack (Tomcat) debug socket
9090, 8250: CloudStack Management Server, User/Client API 9090, 8250: Apache CloudStack Management Server, User/Client API
8096: User/Client to CloudStack Management Server (unauthenticated) 8096: User/Client to CloudStack Management Server (unauthenticated)
3306: MySQL Server 3306: MySQL Server
3922, 8250, 80/443, 111/2049, 53: Secondary Storage VM 3922, 8250, 80/443, 111/2049, 53: Secondary Storage VM
3922, 8250, 53: Console Proxy VM 3922, 8250, 53: Console Proxy VM
3922, 8250, 53: Virtual Router 3922, 8250, 53: Virtual Router
22, 80, 443: XenServer, XAPI 22, 80, 443: XenServer, XAPI
22: KVM 22: KVM
443: vCenter 443: vCenter
DNS: 53 DNS: 53
NFS: 111/2049 NFS: 111/2049
### Configuring MySQL Server ### Configuring MySQL Server
@ -92,33 +89,45 @@ For example, for master:
## Building ## Building
Populate the dependencies using Maven:
$ mvn -P deps Clean and build:
Clean previous build, if needed:
$ mvn clean $ mvn clean
$ ant clean-all $ mvn install
$ ant clean-tomcat
Build all sub-modules: In case you want support for VMWare, SRX and other non-Apache (referred to as nonoss)
compliant libs, you may download the following jar artifacts from respective vendors:
$ ant build-all deps/cloud-iControl.jar
deps/cloud-manageontap.jar
deps/cloud-netscaler-sdx.jar
deps/cloud-netscaler.jar
deps/vmware-apputils.jar
deps/vmware-vim.jar
deps/vmware-vim25.jar
Deploy the built project on tomcat: Install them to ~/.m2 so maven can get them as dependencies:
$ ant deploy-server $ cd deps
$ ./install-non-oss.sh
And build them with the nonoss flag:
$ mvn install -Dnonoss
Clear old database (if any) and deploy the database schema: Clear old database (if any) and deploy the database schema:
$ ant deploydb $ mvn -P developer -pl developer -Ddeploydb
Start the management server in debug mode: Export the following variable if you need to run and debug the management server:
$ ant debug $ export MAVEN_OPTS="-Xmx1024m -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
If this works, you've successfully setup a single server CloudStack installation. Start the management server:
$ mvn -pl :cloud-client-ui jetty:run
If this works, you've successfully setup a single server Apache CloudStack installation.
Open the following URL on your browser to access the Management Server UI: Open the following URL on your browser to access the Management Server UI:
@ -131,13 +140,87 @@ Or,
The default credentials are; user: admin, password: password and the domain The default credentials are; user: admin, password: password and the domain
field should be left blank which is defaulted to the ROOT domain. field should be left blank which is defaulted to the ROOT domain.
## Packaging If you want to contribute your changes, send your [git formatted patch](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Git) to:
https://reviews.apache.org/groups/cloudstack or contact on the developer mailing list.
To create rpms: ## Packaging and Installation
$ mvn -P deps && ./waf rpm Before packaging, please make sure you go through the "Building" section above.
This section describes packaging and installation.
### Debian/Ubuntu
To create debs: To create debs:
$ mvn -P deps && dpkg-buildpackage $ mvn -P deps # -D nonoss, for nonoss as described in the "Building" section above
$ dpkg-buildpackage
All the deb packages will be created in ../$PWD
To create an apt repo: (assuming appropriate user privileges)
$ path=/path/to/your/webserver/cloudstack
$ mv ../*.deb $path
$ dpkg-scanpackages $path /dev/null | gzip -9c > $path/Packages.gz
Configure your system to use your new apt repo:
$ echo "deb $path ./" >> /etc/apt/sources.list.d/cloudstack.list
Installation:
Install needed packages, apt-get upgrade for upgrading:
$ apt-get update
$ apt-get install cloud-client # management server
$ apt-get install mysql-server # mysql server
$ apt-get install cloud-agent cloud-system-iso # agent (kvm)
$ apt-get install cloud-awsapi # awsapi server
$ apt-get install cloud-usage # usage server
### RHEL/CentOS
To create rpms:
$ mvn -P deps # -D nonoss, for nonoss as described in the "Building" section above
$ ./waf rpm
All the rpm packages will be create in artifacts/rpmbuild/RPMS/x86_64
To create a yum repo: (assuming appropriate user privileges)
$ path=/path/to/your/webserver/cloudstack
$ cd artifacts/rpmbuild/RPMS/x86_64
$ mv *.rpm $path
$ createrepo $path
Configure your system to use your new yum repo, add the following to /etc/yum.repos.d/cloudstack.repo:
[apache-cloudstack]
name=Apache CloudStack
baseurl=http://webserver.tld/path/to/repo
enabled=1
gpgcheck=0
Installation:
Install needed packages:
$ yum update
$ yum install cloud-client # management server
$ yum install mysql-server # mysql server
$ yum install cloud-agent # agent (kvm)
$ yum install cloud-usage # usage server
## Notes
If you will be using Xen as your hypervisor, please download [vhd-util](http://download.cloud.com.s3.amazonaws.com/tools/vhd-util)
If management server is installed on RHEL/CentOS, then copy vhd-util into:
/usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/
If management server is installed on Ubuntu, then put vhd-util into:
/usr/lib/cloud/common/scripts/vm/hypervisor/xenserver/vhd-util
Once, you've successfully installed Apache CloudStack you may read the user manuals
and guides which contains technical documentation for Apache CloudStack.

288
KEYS
View File

@ -1,288 +0,0 @@
This file contains the PGP keys of various developers.
Users: pgp < KEYS
gpg --import KEYS
Developers:
pgp -kxa <your name> and append it to this file.
(pgpk -ll <your name> && pgpk -xa <your name>)
>> this file.
(gpg --list-sigs <your name>
&& gpg --armor --export <your name>) >>
this file.
Type Bits/KeyID Date User ID
pub 4096R/CC56CEA8 2012-08-06 [expires: 2016-08-06]
uid Chip Childers <chipchilders@apache.org>
sig 3 CC56CEA8 2012-08-06 Chip Childers <chipchilders@apache.org>
sub 4096R/A99A5D58 2012-08-06 [expires: 2016-08-06]
sig CC56CEA8 2012-08-06 Chip Childers <chipchilders@apache.org>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
Comment: GPGTools - http://gpgtools.org
mQINBFAgC58BEADAGUU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JMU+PHrfBvO2Ql
4BZ1kmmTaWmGXrgQgpJeWiirF8Ptg2Mq8rCfXnFbOp89ZRNyFDV2Fgyw3BPbPPXE
aygCwpRgHgUrp32gBAGdsdghNn8kN0DFygZKE0kRc6hR7ALiQWoTbA/G/BJjpJQt
RhR4k58e2kWh1uuyFaxcB+Vp/6HXYIe6o8fhX8jwVM47WbINFGbvaz1gGpGzJCY1
HJBwTMu5IgQ8n69Gs7DCDTVqBOqiDKtdQyZBheWCsIJUkvBHtxkUb7K0kcIA3Fet
46k2GFOEkHCxbKpjeFhcW4atmEShOViiGKVR+g689feVQB6+mI9O4fXmsGO4Zq/k
mEku0Eg95q3+ugVpz8DLctnlvIHVdf6RPieojBKbqPu/34iJqenHmeQUy1TkRKIx
ZEX2mjtW/Tz5VnUX/MUFA67sGIpGJMsvr2sk3Zyovl7GVfsq5K2UqK5pRc2rO8zt
QHVJ58ybqkmx2NgDgmi1gvsoV51mn6TTVs1S/stCtW4=
=eCNG
-----END PGP PUBLIC KEY BLOCK-----
Type Bits/KeyID Date User ID
pub 4096R/DB3ECA42 2012-08-07 [expires: 2017-08-06]
uid Wido den Hollander <wido@widodh.nl>
sig 3 DB3ECA42 2012-08-07 Wido den Hollander <wido@widodh.nl>
sub 4096R/50E9D98F 2012-08-07
sig DB3ECA42 2012-08-07 Wido den Hollander <wido@widodh.nl>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.11 (GNU/Linux)
mQINBFAg4ogBEADPUAOmj/KdLjp5Wz8oW5+fnx3gnhVABh1Xg5Uf36tDCLogSMya
Y9S8lZb8PgvtkK6fOqUCoViUvXAWM5/k7JbIv70cWGc+M4XgZTnI6GWlz08EkzNT
/DX4Y+OAks602KYLXVepI4SdpCKaZJK14Az48cfzFEZDmzMuNtS/sQhXQZSXe7pu
7pBPpQ2GP1aYqGRBYTkMD9fjQAM2U3qJ/5K0AzeIciOI6QxD+h2fIBMnu+XV0g0C
2SG6UVy1RBVYzylWZ1p63br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EQBac2oCIVCBtTbsjkQlXPs+Q2SaJ
kyL8rbdmt06Tsc3iwN+ZjPGIluifaacvurJH8tntCWdhnFKwSwfsa3ZfJwuf3O2Q
J1q7JwYOwQbTR3K5CAyZ0HVYksiIoUqy6IzYvNmilAx2hkVCm2HjWXEvTwjSd709
yXBbm7X9JkB0RYSzpHEBqL1aB7GMe/pCeGLgcGRoA0ZyYXMoM7/gnE/ZCDG2fWGm
JZZ0LJ8QVlZq4nG4lkco7mZqDOycyA68nfbpGaSXhJ7iKbdk4DT0OMr//RlHsiif
AZFM2ppJ5cOmJ9USMkgyHziS6zexM0bYzzPJsLgoq2rjelmzE0pu7NoIcOu3KlkS
HCLDLqIZEYg7EySBVgqJ67FlnpAMY1IaUJN4rYQ4LQEq0uUfmmhZnlp4qQQnZjFR
MrkLZNjHiv8v6JGklVurAQstvZBQXrUUH+/JhJM0U6gsPzgsn4DlpxFyr3nM1aaJ
uHR4OoUFg2G1Hbm7k4eb1SFT1jPEe3is4Oc8t1ORRfSBIH0FfLF1ylLFpSma5q+3
HpWraBFdP78=
=I9dG
-----END PGP PUBLIC KEY BLOCK-----
pub 4096R/2908DED2 2012-06-29
uid John Kinsella <jlk@stratosec.co>
sig 3 2908DED2 2012-08-07 John Kinsella <jlk@stratosec.co>
sub 4096R/26F845B7 2012-06-29
sig 2908DED2 2012-08-07 John Kinsella <jlk@stratosec.co>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
mQINBE/uBAgBEAC9f6Cjh4vS1eY8g5O9rX1P6qhUWfoh8e1stAuKWVUsNfR3C4w3
BZef4dDTMMHaXfJnZ7oFsMUghjzKI1/Fy2rhJ99ZEf8NgxYyy5nR4TUfHdlXAat0
tF3amfGzruJoVorybFEiGVIsYcuDPVxC7jVXGgkaMZ9PD1pyD4cSGYafObDuVr5z
MM0P6X1C4dT/pShiKOBhuX4XJdGk910uEtniWHWaIHIN3KB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
ZUx1FBjjDBz5/EThV/f7N9bBrKtJN0DkzzqnGoNbpSsoP+CTk7kxeRmhXlK8lrr/
ekVt6gtqi2y+sqwWfJXN955oy5aT2c+bQFsBOoKMt/bpLEDD7giVXgKfKJ6+X/Qe
3jW36aPxtW26TTXUBZr6FmhBwmXyCt6tv+/5VeP5R68CK8q10EYDGgjcWmsa8wrr
Xe2ILFA3oUMytXGp3+WbT1MUXDaHUhE+PCugGwyMPw+pXf+ADZMIjESa2lk+mmE4
Worss4fFHIpXICMkJKRo7P9NAPUMC6u34EMuNEv4XfBd/zalTpAq/vvy6cMPaeAa
Iik1ML6E8YZ3TeKbQoZ++ZQT/MEwSOjrsx61a4yf/bzLvcqppKBxVdtCBsePPgHA
bOXIAKv3iqD9Cq5GxLpSAH9E+KlQpJmVDsR1b15G6jceGyZ20NP2Mf6O8pqY1qfC
p7S7eSiSwAZT56oHx9ULzBAKYvwyyoIVOnc0ddwhLeGq2flP7xSo54oDw4KRlFuu
rHMalutU5/Bc0tFZtdm6DnSnwtg3fBnwgFBeINJCc31xuX474+071mfaQUVO7g==
=BzOC
-----END PGP PUBLIC KEY BLOCK-----
pub 4096R/6FE50F1C 2012-05-11 [expires: 2017-05-10]
uid David Nalley (Code signing key) <ke4qqq@apache.org>
sig 3 6FE50F1C 2012-05-11 David Nalley (Code signing key) <ke4qqq@apache.org>
sig F2EFD0F0 2012-05-21 Christopher David Schultz (Christopher David Schultz) <chris@christopherschultz.net>
sig A67F707E 2012-05-21 Christopher Schultz <chris@christopherschultz.net>
sig 4C75EA05 2012-05-31 Kevin A. McGrail (CODE SIGNING KEY) <kmcgrail@apache.org>
sig E70D2357 2012-08-09 David Nalley <david@gnsa.us>
sub 4096R/1E5F6D9D 2012-05-11 [expires: 2017-05-10]
sig 6FE50F1C 2012-05-11 David Nalley (Code signing key) <ke4qqq@apache.org>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.12 (GNU/Linux)
mQINBE+tml4BEADjjxemcI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BvlNzqNc1iCKcXghV8euwNyTF++UwDCT1x5bcAntl3wYHSHKasae3omvmja+Wdfs
iFZHQtzZXgFjPm0C1Y5v1uG+YmzLa0gDX3Lol0n+ANzZNKFSw/zXacyl9wavnUjh
ITiT9WbmXiEc575jUIlkqxP0Sqg8Afpk/tB5PGyan8GbsTVX7EE/l6724ZLyvH4/
Zuvhhqa4HA6hYwiNuXxoUBmabiMULIBZYdsn9znjRKeh6oeoqRa2C2El46o05sy+
woXtbjtbPIeSV1o7KUax0tkg2VqeKBW/qXBkyzLbRSC+vsYVpnO5pPqjaBPoqgIw
vWtDEroKvHDVC+T76U+BlKTooOU0sdWGS8x25HbFVUaxOOFEybkZiFZ2cOlADgcj
R5fTvoVeebaUFoTe
=d4EI
-----END PGP PUBLIC KEY BLOCK-----

4701
LICENSE

File diff suppressed because it is too large Load Diff

161
NOTICE
View File

@ -6,9 +6,84 @@
This distribution contains third party resources requiring the following notices: Source code distribution if this software contains third party resources requiring
the following notices:
For
jquery.md5.js
jQuery MD5 Plugin 1.2.1
https://github.com/blueimp/jQuery-MD5
Copyright 2010, Sebastian Tschan
https://blueimp.net
Licensed under the MIT license:
http://creativecommons.org/licenses/MIT/
Based on
A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
Digest Algorithm, as defined in RFC 1321.
Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
Distributed under the BSD License
See http://pajhome.org.uk/crypt/md5 for more info.
For
jquery.js
jQuery JavaScript Library v1.3.2
http://jquery.com/
Copyright (c) 2009 John Resig
Dual licensed under the MIT and GPL licenses.
http://docs.jquery.com/License
Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
Revision: 6246
For
jquery.js
jQuery JavaScript Library v1.6.1
http://jquery.com/
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes Sizzle.js
http://sizzlejs.com/
Copyright 2011, The Dojo Foundation
Released under the MIT, BSD, and GPL Licenses.
Date: Thu May 12 15:04:36 2011 -0400
For
jquery.colorhelpers.js
Plugin for jQuery for working with colors.
Version 1.1.
Inspiration from jQuery color animation plugin by John Resig.
Released under the MIT license by Ole Laursen, October 2009.
********************************************************************************
Binary or packaged versions of this software (including versions built from source)
contains third party resources requiring the following notices:
For For
cloud-ejb-api-3.0.jar cloud-ejb-api-3.0.jar
cloud-email.jar cloud-email.jar
@ -337,28 +412,6 @@
without prior written authorization of the copyright holder. without prior written authorization of the copyright holder.
For
jquery.md5.js
jQuery MD5 Plugin 1.2.1
https://github.com/blueimp/jQuery-MD5
Copyright 2010, Sebastian Tschan
https://blueimp.net
Licensed under the MIT license:
http://creativecommons.org/licenses/MIT/
Based on
A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
Digest Algorithm, as defined in RFC 1321.
Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
Distributed under the BSD License
See http://pajhome.org.uk/crypt/md5 for more info.
For For
XmlSchema-1.4.3.jar XmlSchema-1.4.3.jar
@ -430,25 +483,11 @@
THE SOFTWARE. THE SOFTWARE.
For
jquery.js
jQuery JavaScript Library v1.3.2
http://jquery.com/
Copyright (c) 2009 John Resig
Dual licensed under the MIT and GPL licenses.
http://docs.jquery.com/License
Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
Revision: 6246
For For
axis2-1.5.1.jar axis2-1.5.1.jar
axis2-adb-1.5.1.jar axis2-adb-1.5.1.jar
axis2-ant-plugin-1.5.1.jar axis2-ant-plugin-1.5.1.jar
axis2-codegen-1.4.1.jar
axis2-jaxbri-1.5.1.jar axis2-jaxbri-1.5.1.jar
axis2-jaxws-1.5.1.jar axis2-jaxws-1.5.1.jar
axis2-jibx-1.5.1.jar axis2-jibx-1.5.1.jar
@ -531,25 +570,6 @@
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
For
jquery.js
jQuery JavaScript Library v1.6.1
http://jquery.com/
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes Sizzle.js
http://sizzlejs.com/
Copyright 2011, The Dojo Foundation
Released under the MIT, BSD, and GPL Licenses.
Date: Thu May 12 15:04:36 2011 -0400
For For
rampart-lib rampart-lib
@ -587,19 +607,6 @@
software copyright (c) 1999. software copyright (c) 1999.
For
jquery.colorhelpers.js
Plugin for jQuery for working with colors.
Version 1.1.
Inspiration from jQuery color animation plugin by John Resig.
Released under the MIT license by Ole Laursen, October 2009.
For For
woden-api-1.0M8.jar woden-api-1.0M8.jar
woden-impl-dom-1.0M8.jar woden-impl-dom-1.0M8.jar
@ -672,3 +679,17 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================================================ ================================================================================
For
wss4j-1.5.8.jar
Apache WebServices - WSS4J
Copyright 2004-2011 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
This product includes software Copyright University of Southampton IT
Innovation Centre, 2006 (http://www.it-innovation.soton.ac.uk).

View File

@ -45,67 +45,7 @@ under the License.
# Building CloudStack # Building CloudStack
By default, CloudStack will only build with supporting packages See the INSTALL file.
that are appropved by the ASF as being compatible with the Apache
Software License Version 2.
## Default build
To build the default build target, use maven3 and execute:
mvn install
## Including optional third party libraries in your build
If you want to build this software against one of the optional
third party libraries, follow the instructions below:
These third parties jars are non available in Maven central, and
need to be located and downloaded by the developer themselves.
The libraries to download are listed below, by the feature that
they support.
For F5 load balancing support:
cloud-iControl.jar
For Netscaler support:
cloud-netscaler.jar
cloud-netscaler-sdx.jar
For NetApp Storage Support:
cloud-manageontap.jar
For VMware Support:
vmware-vim.jar
vmware-vim25.jar
vmware-apputils.jar
Once downloaded (and named the same as listed above), they can be
installed into your local maven repository with the following command:
cd deps&&sh ./install-non-oss.sh
To perform the build, run the following command:
mvn -Dnonoss install
## Running a developer environment
To run the webapp client:
mvn org.apache.tomcat.maven:tomcat7-maven-plugin:2.0-beta-1:run -pl :cloud-client-ui -am -Pclient
Then hit: http://localhost:8080/cloud-client-ui/
or add in your ~/.m2/settings.xml
<pluginGroups>
<pluginGroup>org.apache.tomcat.maven</pluginGroup>
</pluginGroups>
and save your fingers with mvn tomcat7:run -pl :cloud-client-ui -am -Pclient
Optionally add -Dnonoss to either of the commands above.
If you want to use ide debug: replace mvn with mvnDebug and attach your ide debugger to port 8000
# Notice of Cryptographic Software # Notice of Cryptographic Software
@ -126,5 +66,15 @@ Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Sec
The following provides more details on the included cryptographic software: The following provides more details on the included cryptographic software:
TODO CloudStack makes use of JaSypt cryptographic libraries
CloudStack has a system requirement of MySQL, and uses native database encryption
functionality.
CloudStack makes use of the Bouncy Castle general-purpose encryption library.
CloudStack can optionally interacts with and controls OpenSwan-based VPNs.
CloudStack has a dependency on Apache WSS4J as part of the AWSAPI implementation.
CloudStack has a dependency on and makes use of JSch - a java SSH2 implementation.

260
README.tools.md Normal file
View File

@ -0,0 +1,260 @@
> 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.
---------------------------------------------------------------------------
This README describes the various tools available with Apache Cloudstack -
for compiling, deploying, building and testing the project
---------------------------------------------------------------------------
DevCloud
=========================================================
Under tools/devcloud
NOTE - DevCloud (tools/devcloud) is a work in progress. The project has not
determined how to best establish a nightly DevCloud build process, or how to
distribute the image.
#### Contents: ####
Under tools/devcloud are various scripts used to build the devcloud image.
devcloudsetup.sh - the origional devcloud build script (assumes an Ubuntu 12.04
VM image)
$ cd tools/devcloud
* build_vagrant_basebox.sh - a script that uses VirtualBox, VeeWee, Vagrant
(patched) and puppet to create a devcloud basebox
* veewee - configuration files used to build a basic Ubuntu 12.04 vagrant box
via VeeWee
* basebuild - The Vagrantfile and puppet module that gets applied to the basic
Ubuntu 12.04 box
* devcloudbox - The Vagrantfile and puppet module that is used with the
[hopefully] distributed devcloud base box
#### Instructions: ####
To build a "devcloud base box", run you need a system with VirtualBox and rvm
installed (use ruby 1.9.2). Run build_vagrant_basebox.sh to build the base
box.
To use the "devcloud base box" that is created in the previous step, you need
to have installed a forked version of Vagrant (until we make the changes
plugins instead of direct source patches) that can be found here:
Once installed per the Vagrant installation process, run:
$ vagrant box add devcloud [path to devcloud.box]
Then, either go into the devcloudbox folder of your checked out version of the
CloudStack code (incubator-cloudstack/tools/devcloud/devcloudbox), or copy the
contents of that folder to another location.
Assuming the patched Vagrant installation is working, you then
simply run "vagrant up" from within that directory.
#### Installation ####
Install DevCloud Base system:
1. get code from https://github.com/jedi4ever/veewee, and install
2. veewee vbox define devcloud ubuntu-12.04-server-i386
3. put these two files(definition.rb and preseed.cfg) under ./definition/devcloud/
3. veewee vbox build devcloud
Marvin
=========================================================
Under tools/marvin
Marvin is the functional testing framework for CloudStack written in python.
Writing of unittests and functional tests with Marvin makes testing with
cloudstack easier
Visit the
[wiki](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Testing+with+Python)
for the most updated information
#### Dependencies ####
Marvin will require the following dependencies, these will be automatically
downloaded from the python cheeseshop when you install Marvin.
- mysql-connector-python,
- paramiko,
- nose,
- unittest-xml-reporting,
#### Installation ####
$ untar Marvin-0.1.0.tar.gz
$ cd Marvin-0.1.0
$ python setup.py install
#### Features ####
1. very handy cloudstack API python wrapper
2. support async job executing in parallel
3. remote ssh login/execute command
4. mysql query
#### Examples ####
Examples on how to develop your own configuration can be found in the marvin sandbox.
Under tools/marvin/marvin/sandbox
To generate the config for a deployment. Alter the .properties file in the sandbox. For example the
simualtordemo.properties after modification can generate the config file as
shown below
$ python simulator_setup.py -i simulatordemo.properties -o simulatordemo.cfg
To deploy the environment and run the tests
$ python -m marvin.deployAndRun -c simulatordemo.cfg -t /tmp/t.log -r /tmp/r.log -d testcase
#### Tests ####
Functional Tests written using marvin can be found under test/integration
folder. These are tests that are written to be run against a live deployed
system.
To run the tests - you should have marvin installed and correctly importable.
The tests are long running and are best monitored by external hudson jobs.
Also you will have to point marvin to the right configuration file that has
details about your cloudstack deployment. For more help on how to write the
config file and run tests check the tutorial at :
[] (https://cwiki.apache.org/confluence/display/CLOUDSTACK/Testing+with+Python)
#### Build Verification Testing (BVT) ####
These test cases are the core functionality tests that ensure the application
is stable and can be tested thoroughly. These BVT cases definitions are
located at :
[] (https://docs.google.com/a/cloud.com/spreadsheet/ccc?key=0Ak8acbfxQG8ndEppOGZSLV9mUF9idjVkTkZkajhTZkE&invite=CPij0K0L)
##### Guidelines on tests #####
BVT test cases are being developed using Python unittests2. Following are
certain guidelines being followed
1. Tests exercised for the same resource should ideally be present under a
single suite or file.
2. Time-consuming operations that create new cloud resources like server
creation, volume creation etc should not necessarily be exercised per unit
test. The resources can be shared by creating them at the class-level using
setUpClass and shared across all instances during a single run.
3. Certain tests pertaining to NAT, Firewall and Load Balancing warrant fresh
resources per test. Hence a call should be taken by the stakeholders regarding
sharing resources.
4. Ensure that the tearDown/tearDownClass functions clean up all the resources
created during the test run.
For more information about unittests: [] (http://docs.python.org/library/unittest.html)
##### BVT Tests #####
Under test/integration/smoke
The following files contain these BVT cases:
1. test_vm_life_cycle.py - VM Life Cycle tests
2. test_volumes.py - Volumes related tests
3. test_snapshots.py - Snapshots related tests
4. test_disk_offerings.py - Disk Offerings related tests
5. test_service_offerings.py - Service Offerings related tests
6. test_hosts.py - Hosts and Clusters related tests
7. test_iso.py - ISO related tests
8. test_network.py - Network related tests
9. test_primary_storage.py - Primary storage related tests
10. test_secondary_storage.py - Secondary storage related tests
11. test_ssvm.py - SSVM & CPVM related tests
12. test_templates.py - Templates related tests
13. test_routers.py - Router related tests
##### P1 Tests #####
Under test/integration/component
These test cases are the core functionality tests that ensure the application
is stable and can be tested thoroughly. These P1 cases definitions are located
at :
[] (https://docs.google.com/a/clogeny.com/spreadsheet/ccc?key=0Aq5M2ldK6eyedDJBa0EzM0RPNmdVNVZOWnFnOVJJcHc&hl=en_US)
The following files contain these P1 cases:
1. test_snapshots.py - Snapshots related tests
2. test_routers.py - Router related tests
3. test_usage.py - Usage realted tests
4. test_account.py - Account related tests
5. test_resource_limits.py - Resource limits tests
6. test_security_groups.py - Security groups related tests
7. test_templates.py - templates related tests
8. test_volumes.py - Volumes related tests
9. test_blocker_bugs.py - Blocker bugs tests
10. test_project_configs.py - Project global configuration related tests
11. test_project_limits.py - Project resource limits related tests
12. test_project_resources.py - Project resource creation related tests
13. test_project_usage.py - Project usage related tests
14. test_projects - Projects functionality tests
Marvin Sandbox
=========================================================
In: tools/marvin/marvin/sandbox
In here you should find a few common deployment models of CloudStack that you
can configure with properties files to suit your own deployment. One deployment
model for each of - advanced zone, basic zone and a simulator demo are given.
$ ls -
basic/
advanced/
simulator/
Each property file is divided into logical sections and should be familiar to
those who have deployed CloudStack before. Once you have your properties file
you will have to create a JSON configuration of your deployment using the
python script provided in the respective folder.
The demo files are from the tutorial for testing with python that can be found at
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Testing+with+Python
A common deployment model of a simulator.cfg that can be used for debugging is
included. This will configure an advanced zone with simulators that can be used
for debugging purposes when you do not have hardware to debug with.
To do this:
$ cd cloudstack-oss/
$ ant run-simulator #This will start up the mgmt server with the simulator seeded
## In another shell
$ ant run-simulator
test/conf - EC2 script
=========================================================
To run submitCertEC2 and deleteCertEC2 scripts, update parameters in conf/tool.properties file:
* host - ip address of the host where cloud-bridge software is installed
* port - port cloud-bridge software is listening to
* accesspoint - access point for cloud-bridge REST request
* version - Amazon EC2 api version supported by cloud-bridge
* signaturemethod - HmacSHA1 or HmacSHA256
* expires - the date when certificate expires

View File

@ -1,3 +1,4 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file # or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information # distributed with this work for additional information
@ -15,17 +16,4 @@
# specific language governing permissions and limitations # specific language governing permissions and limitations
# under the License. # under the License.
host=127.0.0.1 ssh -i /root/.ssh/id_rsa.cloud -p 3922 root@$1
port=8250
workers=3
zone=1
pod=1
run=13
sequence=r
agent.save.path=/tmp/agents
latency=2
latency.start.range=2
latency.end.range=2
delay.distribution={(5,10); (5,10); (5,10); (5,10); (5,10); (5,10); (5,10); (5,10); (5,10); (10,120)}
property.scan.enabled=1
property.scan.interval=300

View File

@ -31,11 +31,6 @@
<artifactId>cloud-core</artifactId> <artifactId>cloud-core</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>6.1.26</version>
</dependency>
<dependency> <dependency>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-utils</artifactId> <artifactId>cloud-utils</artifactId>
@ -60,6 +55,57 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>generate-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<copy
todir="${basedir}/target/transformed">
<fileset dir="${basedir}/conf">
<include name="agent.properties" />
</fileset>
</copy>
<copy overwrite="true"
todir="${basedir}/target/transformed">
<fileset dir="${basedir}/conf">
<include name="*.in" />
</fileset>
<globmapper from="*.in" to="*" />
<filterchain>
<filterreader
classname="org.apache.tools.ant.filters.ReplaceTokens">
<param type="propertiesfile"
value="${basedir}/../build/replace.properties" />
</filterreader>
</filterchain>
</copy>
<copy overwrite="true"
todir="${basedir}/target/transformed">
<fileset dir="${basedir}/bindir">
<include name="*.in" />
</fileset>
<globmapper from="*.in" to="*" />
<filterchain>
<filterreader
classname="org.apache.tools.ant.filters.ReplaceTokens">
<param type="propertiesfile"
value="${basedir}/../build/replace.properties" />
</filterreader>
</filterchain>
</copy>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

View File

@ -27,7 +27,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Timer; import java.util.Timer;
import java.util.TimerTask; import java.util.TimerTask;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.SynchronousQueue; import java.util.concurrent.SynchronousQueue;
@ -48,6 +47,7 @@ import com.cloud.agent.api.MaintainAnswer;
import com.cloud.agent.api.MaintainCommand; import com.cloud.agent.api.MaintainCommand;
import com.cloud.agent.api.ModifySshKeysCommand; import com.cloud.agent.api.ModifySshKeysCommand;
import com.cloud.agent.api.PingCommand; import com.cloud.agent.api.PingCommand;
import com.cloud.agent.api.ReadyCommand;
import com.cloud.agent.api.ShutdownCommand; import com.cloud.agent.api.ShutdownCommand;
import com.cloud.agent.api.StartupAnswer; import com.cloud.agent.api.StartupAnswer;
import com.cloud.agent.api.StartupCommand; import com.cloud.agent.api.StartupCommand;
@ -491,6 +491,10 @@ public class Agent implements HandlerFactory, IAgentControl {
cancelTasks(); cancelTasks();
_reconnectAllowed = false; _reconnectAllowed = false;
answer = new Answer(cmd, true, null); answer = new Answer(cmd, true, null);
} else if (cmd instanceof ReadyCommand && ((ReadyCommand)cmd).getDetails() != null) {
s_logger.debug("Not ready to connect to mgt server: " + ((ReadyCommand)cmd).getDetails());
System.exit(1);
return;
} else if (cmd instanceof MaintainCommand) { } else if (cmd instanceof MaintainCommand) {
s_logger.debug("Received maintainCommand" ); s_logger.debug("Received maintainCommand" );
cancelTasks(); cancelTasks();
@ -513,6 +517,9 @@ public class Agent implements HandlerFactory, IAgentControl {
} }
} else { } else {
if (cmd instanceof ReadyCommand) {
processReadyCommand((ReadyCommand)cmd);
}
_inProgress.incrementAndGet(); _inProgress.incrementAndGet();
try { try {
answer = _resource.executeRequest(cmd); answer = _resource.executeRequest(cmd);
@ -576,6 +583,19 @@ public class Agent implements HandlerFactory, IAgentControl {
setLastPingResponseTime(); setLastPingResponseTime();
} }
} }
public void processReadyCommand(Command cmd) {
final ReadyCommand ready = (ReadyCommand) cmd;
s_logger.info("Proccess agent ready command, agent id = " + ready.getHostId());
if (ready.getHostId() != null) {
setId(ready.getHostId());
}
s_logger.info("Ready command is processed: agent id = " + getId());
}
public void processOtherTask(Task task) { public void processOtherTask(Task task) {
final Object obj = task.get(); final Object obj = task.get();
@ -601,6 +621,7 @@ public class Agent implements HandlerFactory, IAgentControl {
} catch (final ClosedChannelException e) { } catch (final ClosedChannelException e) {
s_logger.warn("Unable to send request: " + request.toString()); s_logger.warn("Unable to send request: " + request.toString());
} }
} else if (obj instanceof Request) { } else if (obj instanceof Request) {
final Request req = (Request) obj; final Request req = (Request) obj;
final Command command = req.getCommand(); final Command command = req.getCommand();

View File

@ -39,6 +39,7 @@ import java.util.UUID;
import javax.naming.ConfigurationException; import javax.naming.ConfigurationException;
import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
@ -61,6 +62,7 @@ import com.cloud.utils.script.Script;
public class AgentShell implements IAgentShell { public class AgentShell implements IAgentShell {
private static final Logger s_logger = Logger.getLogger(AgentShell.class private static final Logger s_logger = Logger.getLogger(AgentShell.class
.getName()); .getName());
private static final MultiThreadedHttpConnectionManager s_httpClientManager = new MultiThreadedHttpConnectionManager();
private final Properties _properties = new Properties(); private final Properties _properties = new Properties();
private final Map<String, Object> _cmdLineProperties = new HashMap<String, Object>(); private final Map<String, Object> _cmdLineProperties = new HashMap<String, Object>();
@ -224,11 +226,12 @@ public class AgentShell implements IAgentShell {
} }
public static void wget(String url, File file) throws IOException { public static void wget(String url, File file) throws IOException {
final HttpClient client = new HttpClient(); final HttpClient client = new HttpClient(s_httpClientManager);
final GetMethod method = new GetMethod(url); final GetMethod method = new GetMethod(url);
int response; int response;
response = client.executeMethod(method); response = client.executeMethod(method);
if (response != HttpURLConnection.HTTP_OK) { if (response != HttpURLConnection.HTTP_OK) {
method.releaseConnection();
s_logger.warn("Retrieving from " + url + " gives response code: " s_logger.warn("Retrieving from " + url + " gives response code: "
+ response); + response);
throw new CloudRuntimeException("Unable to download from " + url throw new CloudRuntimeException("Unable to download from " + url
@ -251,6 +254,7 @@ public class AgentShell implements IAgentShell {
s_logger.warn("Exception while closing download stream from " s_logger.warn("Exception while closing download stream from "
+ url + ", ", e); + url + ", ", e);
} }
method.releaseConnection();
} }
private void loadProperties() throws ConfigurationException { private void loadProperties() throws ConfigurationException {

View File

@ -40,5 +40,6 @@
<build> <build>
<defaultGoal>install</defaultGoal> <defaultGoal>install</defaultGoal>
<sourceDirectory>src</sourceDirectory> <sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
</build> </build>
</project> </project>

View File

@ -19,11 +19,11 @@ package com.cloud.agent.api;
public class AgentControlAnswer extends Answer { public class AgentControlAnswer extends Answer {
public AgentControlAnswer() { public AgentControlAnswer() {
} }
public AgentControlAnswer(Command command) { public AgentControlAnswer(Command command) {
super(command); super(command);
} }
public AgentControlAnswer(Command command, boolean success, String details) { public AgentControlAnswer(Command command, boolean success, String details) {
super(command, success, details); super(command, success, details);
} }

View File

@ -17,10 +17,10 @@
package com.cloud.agent.api; package com.cloud.agent.api;
public class AgentControlCommand extends Command { public class AgentControlCommand extends Command {
public AgentControlCommand() { public AgentControlCommand() {
} }
public boolean executeInSequence() { public boolean executeInSequence() {
return false; return false;
} }

View File

@ -21,40 +21,40 @@ import com.cloud.utils.exception.ExceptionUtil;
public class Answer extends Command { public class Answer extends Command {
protected boolean result; protected boolean result;
protected String details; protected String details;
protected Answer() { protected Answer() {
} }
public Answer(Command command) { public Answer(Command command) {
this(command, true, null); this(command, true, null);
} }
public Answer(Command command, boolean success, String details) { public Answer(Command command, boolean success, String details) {
result = success; result = success;
this.details = details; this.details = details;
} }
public Answer(Command command, Exception e) { public Answer(Command command, Exception e) {
this(command, false, ExceptionUtil.toString(e)); this(command, false, ExceptionUtil.toString(e));
} }
public boolean getResult() { public boolean getResult() {
return result; return result;
} }
public String getDetails() { public String getDetails() {
return details; return details;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return false; return false;
} }
public static UnsupportedAnswer createUnsupportedCommandAnswer(Command cmd) { public static UnsupportedAnswer createUnsupportedCommandAnswer(Command cmd) {
return new UnsupportedAnswer(cmd, "Unsupported command issued:" + cmd.toString() + ". Are you sure you got the right type of server?"); return new UnsupportedAnswer(cmd, "Unsupported command issued:" + cmd.toString() + ". Are you sure you got the right type of server?");
} }
public static UnsupportedAnswer createUnsupportedVersionAnswer(Command cmd) { public static UnsupportedAnswer createUnsupportedVersionAnswer(Command cmd) {
return new UnsupportedAnswer(cmd, "Unsuppored Version."); return new UnsupportedAnswer(cmd, "Unsuppored Version.");
} }

View File

@ -48,11 +48,11 @@ public class AttachIsoCommand extends Command {
public boolean isAttach() { public boolean isAttach() {
return attach; return attach;
} }
public String getStoreUrl() { public String getStoreUrl() {
return storeUrl; return storeUrl;
} }
public void setStoreUrl(String url) { public void setStoreUrl(String url) {
storeUrl = url; storeUrl = url;
} }

View File

@ -20,38 +20,38 @@ package com.cloud.agent.api;
public class AttachVolumeAnswer extends Answer { public class AttachVolumeAnswer extends Answer {
private Long deviceId; private Long deviceId;
private String chainInfo; private String chainInfo;
protected AttachVolumeAnswer() { protected AttachVolumeAnswer() {
} }
public AttachVolumeAnswer(AttachVolumeCommand cmd, String result) { public AttachVolumeAnswer(AttachVolumeCommand cmd, String result) {
super(cmd, false, result); super(cmd, false, result);
this.deviceId = null; this.deviceId = null;
} }
public AttachVolumeAnswer(AttachVolumeCommand cmd, Long deviceId) { public AttachVolumeAnswer(AttachVolumeCommand cmd, Long deviceId) {
super(cmd); super(cmd);
this.deviceId = deviceId; this.deviceId = deviceId;
} }
public AttachVolumeAnswer(AttachVolumeCommand cmd) { public AttachVolumeAnswer(AttachVolumeCommand cmd) {
super(cmd); super(cmd);
this.deviceId = null; this.deviceId = null;
} }
/** /**
* @return the deviceId * @return the deviceId
*/ */
public Long getDeviceId() { public Long getDeviceId() {
return deviceId; return deviceId;
} }
public void setChainInfo(String chainInfo) { public void setChainInfo(String chainInfo) {
this.chainInfo = chainInfo; this.chainInfo = chainInfo;
} }
public String getChainInfo() { public String getChainInfo() {
return chainInfo; return chainInfo;
} }

View File

@ -19,7 +19,7 @@ package com.cloud.agent.api;
import com.cloud.storage.Storage.StoragePoolType; import com.cloud.storage.Storage.StoragePoolType;
public class AttachVolumeCommand extends Command { public class AttachVolumeCommand extends Command {
boolean attach; boolean attach;
String vmName; String vmName;
StoragePoolType pooltype; StoragePoolType pooltype;
@ -29,10 +29,10 @@ public class AttachVolumeCommand extends Command {
String volumeName; String volumeName;
Long deviceId; Long deviceId;
String chainInfo; String chainInfo;
protected AttachVolumeCommand() { protected AttachVolumeCommand() {
} }
public AttachVolumeCommand(boolean attach, String vmName, StoragePoolType pooltype, String volumeFolder, String volumePath, String volumeName, Long deviceId, String chainInfo) { public AttachVolumeCommand(boolean attach, String vmName, StoragePoolType pooltype, String volumeFolder, String volumePath, String volumeName, Long deviceId, String chainInfo) {
this.attach = attach; this.attach = attach;
this.vmName = vmName; this.vmName = vmName;
@ -43,20 +43,20 @@ public class AttachVolumeCommand extends Command {
this.deviceId = deviceId; this.deviceId = deviceId;
this.chainInfo = chainInfo; this.chainInfo = chainInfo;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return true; return true;
} }
public boolean getAttach() { public boolean getAttach() {
return attach; return attach;
} }
public String getVmName() { public String getVmName() {
return vmName; return vmName;
} }
public StoragePoolType getPooltype() { public StoragePoolType getPooltype() {
return pooltype; return pooltype;
} }
@ -68,11 +68,11 @@ public class AttachVolumeCommand extends Command {
public String getVolumeFolder() { public String getVolumeFolder() {
return volumeFolder; return volumeFolder;
} }
public String getVolumePath() { public String getVolumePath() {
return volumePath; return volumePath;
} }
public String getVolumeName() { public String getVolumeName() {
return volumeName; return volumeName;
} }
@ -84,15 +84,15 @@ public class AttachVolumeCommand extends Command {
public void setDeviceId(Long deviceId) { public void setDeviceId(Long deviceId) {
this.deviceId = deviceId; this.deviceId = deviceId;
} }
public String getPoolUuid() { public String getPoolUuid() {
return poolUuid; return poolUuid;
} }
public void setPoolUuid(String poolUuid) { public void setPoolUuid(String poolUuid) {
this.poolUuid = poolUuid; this.poolUuid = poolUuid;
} }
public String getChainInfo() { public String getChainInfo() {
return chainInfo; return chainInfo;
} }

View File

@ -20,11 +20,11 @@ package com.cloud.agent.api;
public class BackupSnapshotAnswer extends Answer { public class BackupSnapshotAnswer extends Answer {
private String backupSnapshotName; private String backupSnapshotName;
private boolean full; private boolean full;
protected BackupSnapshotAnswer() { protected BackupSnapshotAnswer() {
} }
public BackupSnapshotAnswer(BackupSnapshotCommand cmd, boolean success, String result, String backupSnapshotName, boolean full) { public BackupSnapshotAnswer(BackupSnapshotCommand cmd, boolean success, String result, String backupSnapshotName, boolean full) {
super(cmd, success, result); super(cmd, success, result);
this.backupSnapshotName = backupSnapshotName; this.backupSnapshotName = backupSnapshotName;
@ -37,7 +37,7 @@ public class BackupSnapshotAnswer extends Answer {
public String getBackupSnapshotName() { public String getBackupSnapshotName() {
return backupSnapshotName; return backupSnapshotName;
} }
public boolean isFull() { public boolean isFull() {
return full; return full;
} }

View File

@ -17,12 +17,13 @@
package com.cloud.agent.api; package com.cloud.agent.api;
import com.cloud.agent.api.LogLevel.Log4jLevel; import com.cloud.agent.api.LogLevel.Log4jLevel;
import com.cloud.agent.api.to.S3TO;
import com.cloud.agent.api.to.StorageFilerTO; import com.cloud.agent.api.to.StorageFilerTO;
import com.cloud.agent.api.to.SwiftTO; import com.cloud.agent.api.to.SwiftTO;
import com.cloud.storage.StoragePool; import com.cloud.storage.StoragePool;
/** /**
* This currently assumes that both primary and secondary storage are mounted on the XenServer. * This currently assumes that both primary and secondary storage are mounted on the XenServer.
*/ */
public class BackupSnapshotCommand extends SnapshotCommand { public class BackupSnapshotCommand extends SnapshotCommand {
private String prevSnapshotUuid; private String prevSnapshotUuid;
@ -32,24 +33,24 @@ public class BackupSnapshotCommand extends SnapshotCommand {
private Long snapshotId; private Long snapshotId;
@LogLevel(Log4jLevel.Off) @LogLevel(Log4jLevel.Off)
private SwiftTO swift; private SwiftTO swift;
private S3TO s3;
StorageFilerTO pool; StorageFilerTO pool;
protected BackupSnapshotCommand() { protected BackupSnapshotCommand() {
} }
/** /**
* @param primaryStoragePoolNameLabel The UUID of the primary storage Pool * @param primaryStoragePoolNameLabel The UUID of the primary storage Pool
* @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage. * @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage.
* @param snapshotUuid The UUID of the snapshot which is going to be backed up * @param snapshotUuid The UUID of the snapshot which is going to be backed up
* @param prevSnapshotUuid The UUID of the previous snapshot for this volume. This will be destroyed on the primary storage. * @param prevSnapshotUuid The UUID of the previous snapshot for this volume. This will be destroyed on the primary storage.
* @param prevBackupUuid This is the UUID of the vhd file which was last backed up on secondary storage. * @param prevBackupUuid This is the UUID of the vhd file which was last backed up on secondary storage.
* @param firstBackupUuid This is the backup of the first ever snapshot taken by the volume. * @param firstBackupUuid This is the backup of the first ever snapshot taken by the volume.
* @param isFirstSnapshotOfRootVolume true if this is the first snapshot of a root volume. Set the parent of the backup to null. * @param isFirstSnapshotOfRootVolume true if this is the first snapshot of a root volume. Set the parent of the backup to null.
* @param isVolumeInactive True if the volume belongs to a VM that is not running or is detached. * @param isVolumeInactive True if the volume belongs to a VM that is not running or is detached.
*/ */
public BackupSnapshotCommand(String primaryStoragePoolNameLabel, public BackupSnapshotCommand(String secondaryStoragePoolURL,
String secondaryStoragePoolURL,
Long dcId, Long dcId,
Long accountId, Long accountId,
Long volumeId, Long volumeId,
@ -62,19 +63,18 @@ public class BackupSnapshotCommand extends SnapshotCommand {
String prevBackupUuid, String prevBackupUuid,
boolean isVolumeInactive, boolean isVolumeInactive,
String vmName, String vmName,
int wait) int wait)
{ {
super(primaryStoragePoolNameLabel, secondaryStoragePoolURL, snapshotUuid, snapshotName, dcId, accountId, volumeId); super(pool, secondaryStoragePoolURL, snapshotUuid, snapshotName, dcId, accountId, volumeId);
this.snapshotId = snapshotId; this.snapshotId = snapshotId;
this.prevSnapshotUuid = prevSnapshotUuid; this.prevSnapshotUuid = prevSnapshotUuid;
this.prevBackupUuid = prevBackupUuid; this.prevBackupUuid = prevBackupUuid;
this.isVolumeInactive = isVolumeInactive; this.isVolumeInactive = isVolumeInactive;
this.vmName = vmName; this.vmName = vmName;
this.pool = new StorageFilerTO(pool);
setVolumePath(volumePath); setVolumePath(volumePath);
setWait(wait); setWait(wait);
} }
public String getPrevSnapshotUuid() { public String getPrevSnapshotUuid() {
return prevSnapshotUuid; return prevSnapshotUuid;
} }
@ -82,13 +82,13 @@ public class BackupSnapshotCommand extends SnapshotCommand {
public String getPrevBackupUuid() { public String getPrevBackupUuid() {
return prevBackupUuid; return prevBackupUuid;
} }
public boolean isVolumeInactive() { public boolean isVolumeInactive() {
return isVolumeInactive; return isVolumeInactive;
} }
public String getVmName() { public String getVmName() {
return vmName; return vmName;
} }
public SwiftTO getSwift() { public SwiftTO getSwift() {
@ -99,11 +99,16 @@ public class BackupSnapshotCommand extends SnapshotCommand {
this.swift = swift; this.swift = swift;
} }
public S3TO getS3() {
return s3;
}
public void setS3(S3TO s3) {
this.s3 = s3;
}
public Long getSnapshotId() { public Long getSnapshotId() {
return snapshotId; return snapshotId;
} }
public StorageFilerTO getPool() { }
return pool;
}
}

View File

@ -21,19 +21,19 @@ package com.cloud.agent.api;
public class CancelCommand extends Command { public class CancelCommand extends Command {
protected long sequence; protected long sequence;
protected String reason; protected String reason;
protected CancelCommand() { protected CancelCommand() {
} }
public CancelCommand(long sequence, String reason) { public CancelCommand(long sequence, String reason) {
this.sequence = sequence; this.sequence = sequence;
this.reason = reason; this.reason = reason;
} }
public long getSequence() { public long getSequence() {
return sequence; return sequence;
} }
public String getReason() { public String getReason() {
return reason; return reason;
} }

View File

@ -19,7 +19,7 @@ package com.cloud.agent.api;
public class ChangeAgentAnswer extends Answer { public class ChangeAgentAnswer extends Answer {
protected ChangeAgentAnswer() { protected ChangeAgentAnswer() {
} }
public ChangeAgentAnswer(ChangeAgentCommand cmd, boolean result) { public ChangeAgentAnswer(ChangeAgentCommand cmd, boolean result) {
super(cmd, result, null); super(cmd, result, null);
} }

View File

@ -21,19 +21,19 @@ import com.cloud.host.Status.Event;
public class ChangeAgentCommand extends Command { public class ChangeAgentCommand extends Command {
long agentId; long agentId;
Event event; Event event;
protected ChangeAgentCommand() { protected ChangeAgentCommand() {
} }
public ChangeAgentCommand(long agentId, Event event) { public ChangeAgentCommand(long agentId, Event event) {
this.agentId = agentId; this.agentId = agentId;
this.event = event; this.event = event;
} }
public long getAgentId() { public long getAgentId() {
return agentId; return agentId;
} }
public Event getEvent() { public Event getEvent() {
return event; return event;
} }

View File

@ -22,7 +22,7 @@ public class CheckHealthCommand extends Command {
setWait(50); setWait(50);
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return false; return false;

View File

@ -20,7 +20,7 @@ public class CheckNetworkAnswer extends Answer {
// indicate if agent reconnect is needed after setupNetworkNames command // indicate if agent reconnect is needed after setupNetworkNames command
private boolean _reconnect; private boolean _reconnect;
public CheckNetworkAnswer() {} public CheckNetworkAnswer() {}
public CheckNetworkAnswer(CheckNetworkCommand cmd, boolean result, String details, boolean reconnect) { public CheckNetworkAnswer(CheckNetworkCommand cmd, boolean result, String details, boolean reconnect) {
super(cmd, result, details); super(cmd, result, details);
@ -34,5 +34,5 @@ public class CheckNetworkAnswer extends Answer {
public boolean needReconnect() { public boolean needReconnect() {
return _reconnect; return _reconnect;
} }
} }

View File

@ -23,18 +23,18 @@ import com.cloud.network.PhysicalNetworkSetupInfo;
public class CheckNetworkCommand extends Command { public class CheckNetworkCommand extends Command {
List<PhysicalNetworkSetupInfo> networkInfoList; List<PhysicalNetworkSetupInfo> networkInfoList;
public CheckNetworkCommand(List<PhysicalNetworkSetupInfo> networkInfoList) { public CheckNetworkCommand(List<PhysicalNetworkSetupInfo> networkInfoList) {
this.networkInfoList = networkInfoList; this.networkInfoList = networkInfoList;
} }
public List<PhysicalNetworkSetupInfo> getPhysicalNetworkInfoList() { public List<PhysicalNetworkSetupInfo> getPhysicalNetworkInfoList() {
return networkInfoList; return networkInfoList;
} }
protected CheckNetworkCommand() { protected CheckNetworkCommand() {
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return true; return true;

View File

@ -19,10 +19,10 @@ package com.cloud.agent.api;
public class CheckOnHostAnswer extends Answer { public class CheckOnHostAnswer extends Answer {
boolean determined; boolean determined;
boolean alive; boolean alive;
protected CheckOnHostAnswer() { protected CheckOnHostAnswer() {
} }
public CheckOnHostAnswer(CheckOnHostCommand cmd, Boolean alive, String details) { public CheckOnHostAnswer(CheckOnHostCommand cmd, Boolean alive, String details) {
super(cmd, true, details); super(cmd, true, details);
if (alive == null) { if (alive == null) {
@ -32,7 +32,7 @@ public class CheckOnHostAnswer extends Answer {
this.alive = alive; this.alive = alive;
} }
} }
public CheckOnHostAnswer(CheckOnHostCommand cmd, String details) { public CheckOnHostAnswer(CheckOnHostCommand cmd, String details) {
super(cmd, false, details); super(cmd, false, details);
} }

View File

@ -24,17 +24,17 @@ public class CheckOnHostCommand extends Command {
protected CheckOnHostCommand() { protected CheckOnHostCommand() {
} }
public CheckOnHostCommand(Host host) { public CheckOnHostCommand(Host host) {
this.host = new HostTO(host); this.host = new HostTO(host);
setWait(20); setWait(20);
} }
public HostTO getHost() { public HostTO getHost() {
return host; return host;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return false; return false;

View File

@ -23,10 +23,10 @@ public class CheckRouterAnswer extends Answer {
public static final String ROUTER_IP = "router.ip"; public static final String ROUTER_IP = "router.ip";
RedundantState state; RedundantState state;
boolean isBumped; boolean isBumped;
protected CheckRouterAnswer() { protected CheckRouterAnswer() {
} }
public CheckRouterAnswer(CheckRouterCommand cmd, String details, boolean parse) { public CheckRouterAnswer(CheckRouterCommand cmd, String details, boolean parse) {
super(cmd, true, details); super(cmd, true, details);
if (parse) { if (parse) {
@ -35,7 +35,7 @@ public class CheckRouterAnswer extends Answer {
} }
} }
} }
public CheckRouterAnswer(CheckRouterCommand cmd, String details) { public CheckRouterAnswer(CheckRouterCommand cmd, String details) {
super(cmd, false, details); super(cmd, false, details);
} }
@ -61,11 +61,11 @@ public class CheckRouterAnswer extends Answer {
} }
return true; return true;
} }
public void setState(RedundantState state) { public void setState(RedundantState state) {
this.state = state; this.state = state;
} }
public RedundantState getState() { public RedundantState getState() {
return state; return state;
} }
@ -73,9 +73,9 @@ public class CheckRouterAnswer extends Answer {
public boolean isBumped() { public boolean isBumped() {
return isBumped; return isBumped;
} }
public void setIsBumped(boolean isBumped) { public void setIsBumped(boolean isBumped) {
this.isBumped = isBumped; this.isBumped = isBumped;
} }
} }

View File

@ -5,7 +5,7 @@
// to you under the Apache License, Version 2.0 (the // to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance // "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at // with the License. You may obtain a copy of the License at
// //
// http://www.apache.org/licenses/LICENSE-2.0 // http://www.apache.org/licenses/LICENSE-2.0
// //
// Unless required by applicable law or agreed to in writing, // Unless required by applicable law or agreed to in writing,
@ -23,12 +23,12 @@ public class CheckS2SVpnConnectionsAnswer extends Answer {
Map<String, Boolean> ipToConnected; Map<String, Boolean> ipToConnected;
Map<String, String> ipToDetail; Map<String, String> ipToDetail;
String details; String details;
protected CheckS2SVpnConnectionsAnswer() { protected CheckS2SVpnConnectionsAnswer() {
ipToConnected = new HashMap<String, Boolean>(); ipToConnected = new HashMap<String, Boolean>();
ipToDetail = new HashMap<String, String>(); ipToDetail = new HashMap<String, String>();
} }
public CheckS2SVpnConnectionsAnswer(CheckS2SVpnConnectionsCommand cmd, boolean result, String details) { public CheckS2SVpnConnectionsAnswer(CheckS2SVpnConnectionsCommand cmd, boolean result, String details) {
super(cmd, result, details); super(cmd, result, details);
ipToConnected = new HashMap<String, Boolean>(); ipToConnected = new HashMap<String, Boolean>();
@ -38,7 +38,7 @@ public class CheckS2SVpnConnectionsAnswer extends Answer {
parseDetails(details); parseDetails(details);
} }
} }
protected void parseDetails(String details) { protected void parseDetails(String details) {
String[] lines = details.split("&"); String[] lines = details.split("&");
for (String line : lines) { for (String line : lines) {
@ -54,14 +54,14 @@ public class CheckS2SVpnConnectionsAnswer extends Answer {
ipToDetail.put(ip, detail); ipToDetail.put(ip, detail);
} }
} }
public boolean isConnected(String ip) { public boolean isConnected(String ip) {
if (this.getResult()) { if (this.getResult()) {
return ipToConnected.get(ip); return ipToConnected.get(ip);
} }
return false; return false;
} }
public String getDetail(String ip) { public String getDetail(String ip) {
if (this.getResult()) { if (this.getResult()) {
return ipToDetail.get(ip); return ipToDetail.get(ip);

View File

@ -5,7 +5,7 @@
// to you under the Apache License, Version 2.0 (the // to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance // "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at // with the License. You may obtain a copy of the License at
// //
// http://www.apache.org/licenses/LICENSE-2.0 // http://www.apache.org/licenses/LICENSE-2.0
// //
// Unless required by applicable law or agreed to in writing, // Unless required by applicable law or agreed to in writing,
@ -22,17 +22,17 @@ import com.cloud.agent.api.routing.NetworkElementCommand;
public class CheckS2SVpnConnectionsCommand extends NetworkElementCommand { public class CheckS2SVpnConnectionsCommand extends NetworkElementCommand {
List<String> vpnIps; List<String> vpnIps;
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return true; return true;
} }
public CheckS2SVpnConnectionsCommand(List<String> vpnIps) { public CheckS2SVpnConnectionsCommand(List<String> vpnIps) {
super(); super();
this.vpnIps = vpnIps; this.vpnIps = vpnIps;
} }
public List<String> getVpnIps() { public List<String> getVpnIps() {
return vpnIps; return vpnIps;
} }

View File

@ -28,17 +28,17 @@ public class CheckStateAnswer extends Answer {
public CheckStateAnswer(CheckStateCommand cmd, State state) { public CheckStateAnswer(CheckStateCommand cmd, State state) {
this(cmd, state, null); this(cmd, state, null);
} }
public CheckStateAnswer(CheckStateCommand cmd, String details) { public CheckStateAnswer(CheckStateCommand cmd, String details) {
super(cmd, false, details); super(cmd, false, details);
this.state = null; this.state = null;
} }
public CheckStateAnswer(CheckStateCommand cmd, State state, String details) { public CheckStateAnswer(CheckStateCommand cmd, State state, String details) {
super(cmd, true, details); super(cmd, true, details);
this.state = state; this.state = state;
} }
public State getState() { public State getState() {
return state; return state;
} }

View File

@ -17,7 +17,7 @@
package com.cloud.agent.api; package com.cloud.agent.api;
/** /**
* *
* *
*/ */
public class CheckStateCommand extends Command { public class CheckStateCommand extends Command {
@ -28,12 +28,12 @@ public class CheckStateCommand extends Command {
public CheckStateCommand(String vmName) { public CheckStateCommand(String vmName) {
this.vmName = vmName; this.vmName = vmName;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return true; return true;
} }
public String getVmName() { public String getVmName() {
return vmName; return vmName;
} }

View File

@ -19,33 +19,33 @@ package com.cloud.agent.api;
import com.cloud.vm.VirtualMachine.State; import com.cloud.vm.VirtualMachine.State;
public class CheckVirtualMachineAnswer extends Answer { public class CheckVirtualMachineAnswer extends Answer {
Integer vncPort; Integer vncPort;
State state; State state;
protected CheckVirtualMachineAnswer() { protected CheckVirtualMachineAnswer() {
} }
public CheckVirtualMachineAnswer(CheckVirtualMachineCommand cmd, State state, Integer vncPort, String detail) { public CheckVirtualMachineAnswer(CheckVirtualMachineCommand cmd, State state, Integer vncPort, String detail) {
super(cmd, true, detail); super(cmd, true, detail);
this.state = state; this.state = state;
this.vncPort = vncPort; this.vncPort = vncPort;
} }
public CheckVirtualMachineAnswer(CheckVirtualMachineCommand cmd, State state, Integer vncPort) { public CheckVirtualMachineAnswer(CheckVirtualMachineCommand cmd, State state, Integer vncPort) {
this(cmd, state, vncPort, null); this(cmd, state, vncPort, null);
} }
public CheckVirtualMachineAnswer(CheckVirtualMachineCommand cmd, String detail) { public CheckVirtualMachineAnswer(CheckVirtualMachineCommand cmd, String detail) {
super(cmd, false, detail); super(cmd, false, detail);
} }
public Integer getVncPort() { public Integer getVncPort() {
return vncPort; return vncPort;
} }
public State getState() { public State getState() {
return state; return state;
} }

View File

@ -17,18 +17,18 @@
package com.cloud.agent.api; package com.cloud.agent.api;
public class CheckVirtualMachineCommand extends Command { public class CheckVirtualMachineCommand extends Command {
private String vmName; private String vmName;
protected CheckVirtualMachineCommand() { protected CheckVirtualMachineCommand() {
} }
public CheckVirtualMachineCommand(String vmName) { public CheckVirtualMachineCommand(String vmName) {
this.vmName = vmName; this.vmName = vmName;
setWait(20); setWait(20);
} }
public String getVmName() { public String getVmName() {
return vmName; return vmName;
} }

View File

@ -20,22 +20,22 @@ package com.cloud.agent.api;
public class CleanupNetworkRulesCmd extends Command implements CronCommand { public class CleanupNetworkRulesCmd extends Command implements CronCommand {
private int interval = 10*60; private int interval = 10*60;
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return false; return false;
} }
public CleanupNetworkRulesCmd(int intervalSecs) { public CleanupNetworkRulesCmd(int intervalSecs) {
super(); super();
interval = intervalSecs; interval = intervalSecs;
} }
public CleanupNetworkRulesCmd() { public CleanupNetworkRulesCmd() {
} }

View File

@ -26,20 +26,20 @@ public class CleanupSnapshotBackupCommand extends Command {
private List<String> validBackupUUIDs; private List<String> validBackupUUIDs;
protected CleanupSnapshotBackupCommand() { protected CleanupSnapshotBackupCommand() {
} }
/* /*
* @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage. * @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage.
* In the code, it is present as: In the vmops.host_details table, there is a field mount.parent. This is the value of that field * In the code, it is present as: In the vmops.host_details table, there is a field mount.parent. This is the value of that field
* If you have better ideas on how to get it, you are welcome. * If you have better ideas on how to get it, you are welcome.
* @param validBackupUUID The VHD which are valid * @param validBackupUUID The VHD which are valid
*/ */
public CleanupSnapshotBackupCommand(String secondaryStoragePoolURL, public CleanupSnapshotBackupCommand(String secondaryStoragePoolURL,
Long dcId, Long dcId,
Long accountId, Long accountId,
Long volumeId, Long volumeId,
List<String> validBackupUUIDs) List<String> validBackupUUIDs)
{ {
this.secondaryStoragePoolURL = secondaryStoragePoolURL; this.secondaryStoragePoolURL = secondaryStoragePoolURL;
this.dcId = dcId; this.dcId = dcId;
@ -67,9 +67,9 @@ public class CleanupSnapshotBackupCommand extends Command {
public List<String> getValidBackupUUIDs() { public List<String> getValidBackupUUIDs() {
return validBackupUUIDs; return validBackupUUIDs;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return false; return false;
} }
} }

View File

@ -25,31 +25,31 @@ public class ClusterSyncAnswer extends Answer {
private long _clusterId; private long _clusterId;
private HashMap<String, Pair<String, State>> _newStates; private HashMap<String, Pair<String, State>> _newStates;
private boolean _isExecuted=false; private boolean _isExecuted=false;
// this is here because a cron command answer is being sent twice // this is here because a cron command answer is being sent twice
// AgentAttache.processAnswers // AgentAttache.processAnswers
// AgentManagerImpl.notifyAnswersToMonitors // AgentManagerImpl.notifyAnswersToMonitors
public boolean isExceuted(){ public boolean isExceuted(){
return _isExecuted; return _isExecuted;
} }
public void setExecuted(){ public void setExecuted(){
_isExecuted = true; _isExecuted = true;
} }
public ClusterSyncAnswer(long clusterId, HashMap<String, Pair<String, State>> newStates){ public ClusterSyncAnswer(long clusterId, HashMap<String, Pair<String, State>> newStates){
_clusterId = clusterId; _clusterId = clusterId;
_newStates = newStates; _newStates = newStates;
result = true; result = true;
} }
public long getClusterId() { public long getClusterId() {
return _clusterId; return _clusterId;
} }
public HashMap<String, Pair<String, State>> getNewStates() { public HashMap<String, Pair<String, State>> getNewStates() {
return _newStates; return _newStates;
} }
} }

View File

@ -21,10 +21,10 @@ public class ClusterSyncCommand extends Command implements CronCommand {
int _interval; int _interval;
long _clusterId; long _clusterId;
public ClusterSyncCommand() { public ClusterSyncCommand() {
} }
public ClusterSyncCommand(int interval, long clusterId){ public ClusterSyncCommand(int interval, long clusterId){
_interval = interval; _interval = interval;
_clusterId = clusterId; _clusterId = clusterId;
@ -34,7 +34,7 @@ public class ClusterSyncCommand extends Command implements CronCommand {
public int getInterval() { public int getInterval() {
return _interval; return _interval;
} }
public long getClusterId() { public long getClusterId() {
return _clusterId; return _clusterId;
} }
@ -43,5 +43,5 @@ public class ClusterSyncCommand extends Command implements CronCommand {
public boolean executeInSequence() { public boolean executeInSequence() {
return false; return false;
} }
} }

View File

@ -23,9 +23,9 @@ import com.cloud.agent.api.LogLevel.Log4jLevel;
/** /**
* implemented by classes that extends the Command class. Command specifies * implemented by classes that extends the Command class. Command specifies
* *
*/ */
public abstract class Command { public abstract class Command {
// allow command to carry over hypervisor or other environment related context info // allow command to carry over hypervisor or other environment related context info
@LogLevel(Log4jLevel.Trace) @LogLevel(Log4jLevel.Trace)
@ -63,7 +63,7 @@ public abstract class Command {
public String getContextParam(String name) { public String getContextParam(String name) {
return contextMap.get(name); return contextMap.get(name);
} }
public boolean allowCaching() { public boolean allowCaching() {
return true; return true;
} }

View File

@ -26,12 +26,12 @@ public class ComputeChecksumCommand extends ssCommand {
public ComputeChecksumCommand() { public ComputeChecksumCommand() {
super(); super();
} }
public ComputeChecksumCommand(String secUrl, String templatePath) { public ComputeChecksumCommand(String secUrl, String templatePath) {
super(secUrl); super(secUrl);
this.templatePath = templatePath; this.templatePath = templatePath;
} }
public String getTemplatePath() { public String getTemplatePath() {
return templatePath; return templatePath;
} }

View File

@ -14,75 +14,75 @@
// KIND, either express or implied. See the License for the // KIND, either express or implied. See the License for the
// specific language governing permissions and limitations // specific language governing permissions and limitations
// under the License. // under the License.
package com.cloud.agent.api; package com.cloud.agent.api;
public class ConsoleAccessAuthenticationAnswer extends AgentControlAnswer { public class ConsoleAccessAuthenticationAnswer extends AgentControlAnswer {
private boolean _success; private boolean _success;
private boolean _isReauthenticating; private boolean _isReauthenticating;
private String _host; private String _host;
private int _port; private int _port;
private String _tunnelUrl; private String _tunnelUrl;
private String _tunnelSession; private String _tunnelSession;
public ConsoleAccessAuthenticationAnswer() { public ConsoleAccessAuthenticationAnswer() {
_success = false; _success = false;
_isReauthenticating = false; _isReauthenticating = false;
_port = 0; _port = 0;
}
public ConsoleAccessAuthenticationAnswer(Command cmd, boolean success) {
super(cmd);
_success = success;
}
public boolean succeeded() {
return _success;
} }
public ConsoleAccessAuthenticationAnswer(Command cmd, boolean success) {
super(cmd);
_success = success;
}
public boolean succeeded() {
return _success;
}
public void setSuccess(boolean value) { public void setSuccess(boolean value) {
_success = value; _success = value;
} }
public boolean isReauthenticating() { public boolean isReauthenticating() {
return _isReauthenticating; return _isReauthenticating;
} }
public void setReauthenticating(boolean value) { public void setReauthenticating(boolean value) {
_isReauthenticating = value; _isReauthenticating = value;
} }
public String getHost() { public String getHost() {
return _host; return _host;
} }
public void setHost(String host) { public void setHost(String host) {
_host = host; _host = host;
} }
public int getPort() { public int getPort() {
return _port; return _port;
} }
public void setPort(int port) { public void setPort(int port) {
_port = port; _port = port;
} }
public String getTunnelUrl() { public String getTunnelUrl() {
return _tunnelUrl; return _tunnelUrl;
} }
public void setTunnelUrl(String tunnelUrl) { public void setTunnelUrl(String tunnelUrl) {
_tunnelUrl = tunnelUrl; _tunnelUrl = tunnelUrl;
} }
public String getTunnelSession() { public String getTunnelSession() {
return _tunnelSession; return _tunnelSession;
} }
public void setTunnelSession(String tunnelSession) { public void setTunnelSession(String tunnelSession) {
_tunnelSession = tunnelSession; _tunnelSession = tunnelSession;
} }
} }

View File

@ -17,19 +17,19 @@
package com.cloud.agent.api; package com.cloud.agent.api;
public class ConsoleAccessAuthenticationCommand extends AgentControlCommand { public class ConsoleAccessAuthenticationCommand extends AgentControlCommand {
private String _host; private String _host;
private String _port; private String _port;
private String _vmId; private String _vmId;
private String _sid; private String _sid;
private String _ticket; private String _ticket;
private boolean _isReauthenticating; private boolean _isReauthenticating;
public ConsoleAccessAuthenticationCommand() { public ConsoleAccessAuthenticationCommand() {
_isReauthenticating = false; _isReauthenticating = false;
} }
public ConsoleAccessAuthenticationCommand(String host, String port, String vmId, String sid, String ticket) { public ConsoleAccessAuthenticationCommand(String host, String port, String vmId, String sid, String ticket) {
_host = host; _host = host;
_port = port; _port = port;
@ -37,32 +37,32 @@ public class ConsoleAccessAuthenticationCommand extends AgentControlCommand {
_sid = sid; _sid = sid;
_ticket = ticket; _ticket = ticket;
} }
public String getHost() { public String getHost() {
return _host; return _host;
} }
public String getPort() { public String getPort() {
return _port; return _port;
} }
public String getVmId() { public String getVmId() {
return _vmId; return _vmId;
} }
public String getSid() { public String getSid() {
return _sid; return _sid;
} }
public String getTicket() { public String getTicket() {
return _ticket; return _ticket;
} }
public boolean isReauthenticating() { public boolean isReauthenticating() {
return _isReauthenticating; return _isReauthenticating;
} }
public void setReauthenticating(boolean value) { public void setReauthenticating(boolean value) {
_isReauthenticating = value; _isReauthenticating = value;
} }
} }

View File

@ -17,22 +17,22 @@
package com.cloud.agent.api; package com.cloud.agent.api;
public class ConsoleProxyLoadReportCommand extends AgentControlCommand { public class ConsoleProxyLoadReportCommand extends AgentControlCommand {
private long _proxyVmId; private long _proxyVmId;
private String _loadInfo; private String _loadInfo;
public ConsoleProxyLoadReportCommand() { public ConsoleProxyLoadReportCommand() {
} }
public ConsoleProxyLoadReportCommand(long proxyVmId, String loadInfo) { public ConsoleProxyLoadReportCommand(long proxyVmId, String loadInfo) {
_proxyVmId = proxyVmId; _proxyVmId = proxyVmId;
_loadInfo = loadInfo; _loadInfo = loadInfo;
} }
public long getProxyVmId() { public long getProxyVmId() {
return _proxyVmId; return _proxyVmId;
} }
public String getLoadInfo() { public String getLoadInfo() {
return _loadInfo; return _loadInfo;
} }

View File

@ -16,31 +16,34 @@
// under the License. // under the License.
package com.cloud.agent.api; package com.cloud.agent.api;
import com.cloud.storage.StoragePool;
/** /**
* This currently assumes that both primary and secondary storage are mounted on the XenServer. * This currently assumes that both primary and secondary storage are mounted on the XenServer.
*/ */
public class CreatePrivateTemplateFromSnapshotCommand extends SnapshotCommand { public class CreatePrivateTemplateFromSnapshotCommand extends SnapshotCommand {
private String origTemplateInstallPath; private String origTemplateInstallPath;
private Long newTemplateId; private Long newTemplateId;
private String templateName; private String templateName;
protected CreatePrivateTemplateFromSnapshotCommand() { protected CreatePrivateTemplateFromSnapshotCommand() {
} }
/** /**
* Given the UUID of a backed up snapshot VHD file on the secondary storage, the execute of this command does * Given the UUID of a backed up snapshot VHD file on the secondary storage, the execute of this command does
* 1) Get the parent chain of this VHD all the way up to the root, say VHDList * 1) Get the parent chain of this VHD all the way up to the root, say VHDList
* 2) Copy all the files in the VHDlist to some temp location * 2) Copy all the files in the VHDlist to some temp location
* 3) Coalesce all the VHDs to one VHD which contains all the data of the volume. This invokes the DeletePreviousBackupCommand for each VHD * 3) Coalesce all the VHDs to one VHD which contains all the data of the volume. This invokes the DeletePreviousBackupCommand for each VHD
* 4) Rename the UUID of this VHD * 4) Rename the UUID of this VHD
* @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage. * @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage.
* In the code, it is present as: In the vmops.host_details table, there is a field mount.parent. This is the value of that field * In the code, it is present as: In the vmops.host_details table, there is a field mount.parent. This is the value of that field
* If you have better ideas on how to get it, you are welcome. * If you have better ideas on how to get it, you are welcome.
* It may not be the UUID of the base copy of the snapshot, if no data was written since last snapshot. * It may not be the UUID of the base copy of the snapshot, if no data was written since last snapshot.
* @param origTemplateInstallPath The install path of the original template VHD on the secondary * @param origTemplateInstallPath The install path of the original template VHD on the secondary
*/ */
public CreatePrivateTemplateFromSnapshotCommand(String primaryStoragePoolNameLabel,
public CreatePrivateTemplateFromSnapshotCommand(StoragePool pool,
String secondaryStoragePoolURL, String secondaryStoragePoolURL,
Long dcId, Long dcId,
Long accountId, Long accountId,
@ -50,9 +53,9 @@ public class CreatePrivateTemplateFromSnapshotCommand extends SnapshotCommand {
String origTemplateInstallPath, String origTemplateInstallPath,
Long newTemplateId, Long newTemplateId,
String templateName, String templateName,
int wait) int wait)
{ {
super(primaryStoragePoolNameLabel, secondaryStoragePoolURL, backedUpSnapshotUuid, backedUpSnapshotName, dcId, accountId, volumeId); super(pool, secondaryStoragePoolURL, backedUpSnapshotUuid, backedUpSnapshotName, dcId, accountId, volumeId);
this.origTemplateInstallPath = origTemplateInstallPath; this.origTemplateInstallPath = origTemplateInstallPath;
this.newTemplateId = newTemplateId; this.newTemplateId = newTemplateId;
this.templateName = templateName; this.templateName = templateName;
@ -65,7 +68,7 @@ public class CreatePrivateTemplateFromSnapshotCommand extends SnapshotCommand {
public String getOrigTemplateInstallPath() { public String getOrigTemplateInstallPath() {
return origTemplateInstallPath; return origTemplateInstallPath;
} }
public Long getNewTemplateId() { public Long getNewTemplateId() {
return newTemplateId; return newTemplateId;
} }
@ -76,4 +79,4 @@ public class CreatePrivateTemplateFromSnapshotCommand extends SnapshotCommand {
public String getTemplateName() { public String getTemplateName() {
return templateName; return templateName;
} }
} }

View File

@ -16,6 +16,9 @@
// under the License. // under the License.
package com.cloud.agent.api; package com.cloud.agent.api;
import com.cloud.agent.api.to.StorageFilerTO;
import com.cloud.storage.StoragePool;
public class CreatePrivateTemplateFromVolumeCommand extends SnapshotCommand { public class CreatePrivateTemplateFromVolumeCommand extends SnapshotCommand {
private String _vmName; private String _vmName;
private String _volumePath; private String _volumePath;
@ -23,13 +26,14 @@ public class CreatePrivateTemplateFromVolumeCommand extends SnapshotCommand {
private String _uniqueName; private String _uniqueName;
private long _templateId; private long _templateId;
private long _accountId; private long _accountId;
StorageFilerTO _primaryPool;
// For XenServer // For XenServer
private String _secondaryStorageUrl; private String _secondaryStorageUrl;
public CreatePrivateTemplateFromVolumeCommand() { public CreatePrivateTemplateFromVolumeCommand() {
} }
public CreatePrivateTemplateFromVolumeCommand(String StoragePoolUUID, String secondaryStorageUrl, long templateId, long accountId, String userSpecifiedName, String uniqueName, String volumePath, String vmName, int wait) { public CreatePrivateTemplateFromVolumeCommand(StoragePool pool, String secondaryStorageUrl, long templateId, long accountId, String userSpecifiedName, String uniqueName, String volumePath, String vmName, int wait) {
_secondaryStorageUrl = secondaryStorageUrl; _secondaryStorageUrl = secondaryStorageUrl;
_templateId = templateId; _templateId = templateId;
_accountId = accountId; _accountId = accountId;
@ -37,7 +41,8 @@ public class CreatePrivateTemplateFromVolumeCommand extends SnapshotCommand {
_uniqueName = uniqueName; _uniqueName = uniqueName;
_volumePath = volumePath; _volumePath = volumePath;
_vmName = vmName; _vmName = vmName;
primaryStoragePoolNameLabel = StoragePoolUUID; primaryStoragePoolNameLabel = pool.getUuid();
_primaryPool = new StorageFilerTO(pool);
setWait(wait); setWait(wait);
} }
@ -46,6 +51,10 @@ public class CreatePrivateTemplateFromVolumeCommand extends SnapshotCommand {
return false; return false;
} }
public StorageFilerTO getPool() {
return _primaryPool;
}
public String getSecondaryStorageUrl() { public String getSecondaryStorageUrl() {
return _secondaryStorageUrl; return _secondaryStorageUrl;
} }

View File

@ -20,10 +20,10 @@ import com.cloud.storage.StoragePool;
public class CreateStoragePoolCommand extends ModifyStoragePoolCommand { public class CreateStoragePoolCommand extends ModifyStoragePoolCommand {
public CreateStoragePoolCommand() { public CreateStoragePoolCommand() {
} }
public CreateStoragePoolCommand(boolean add, StoragePool pool) { public CreateStoragePoolCommand(boolean add, StoragePool pool) {
super(add, pool); super(add, pool);
} }

View File

@ -19,11 +19,11 @@ package com.cloud.agent.api;
public class CreateVolumeFromSnapshotAnswer extends Answer { public class CreateVolumeFromSnapshotAnswer extends Answer {
private String vdiUUID; private String vdiUUID;
protected CreateVolumeFromSnapshotAnswer() { protected CreateVolumeFromSnapshotAnswer() {
} }
public CreateVolumeFromSnapshotAnswer(CreateVolumeFromSnapshotCommand cmd, boolean success, String result, String vdiUUID) { public CreateVolumeFromSnapshotAnswer(CreateVolumeFromSnapshotCommand cmd, boolean success, String result, String vdiUUID) {
super(cmd, success, result); super(cmd, success, result);
this.vdiUUID = vdiUUID; this.vdiUUID = vdiUUID;

View File

@ -16,15 +16,17 @@
// under the License. // under the License.
package com.cloud.agent.api; package com.cloud.agent.api;
import com.cloud.storage.StoragePool;
/** /**
* This currently assumes that both primary and secondary storage are mounted on the XenServer. * This currently assumes that both primary and secondary storage are mounted on the XenServer.
*/ */
public class CreateVolumeFromSnapshotCommand extends SnapshotCommand { public class CreateVolumeFromSnapshotCommand extends SnapshotCommand {
protected CreateVolumeFromSnapshotCommand() { protected CreateVolumeFromSnapshotCommand() {
} }
/** /**
* Given the UUID of a backed up snapshot VHD file on the secondary storage, the execute of this command does * Given the UUID of a backed up snapshot VHD file on the secondary storage, the execute of this command does
* 1) Get the parent chain of this VHD all the way up to the root, say VHDList * 1) Get the parent chain of this VHD all the way up to the root, say VHDList
@ -33,13 +35,14 @@ public class CreateVolumeFromSnapshotCommand extends SnapshotCommand {
* 4) Rename the UUID of this VHD * 4) Rename the UUID of this VHD
* 5) Move this VHD to primary storage * 5) Move this VHD to primary storage
* @param primaryStoragePoolNameLabel The primary storage Pool * @param primaryStoragePoolNameLabel The primary storage Pool
* @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage. * @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage.
* In the code, it is present as: In the vmops.host_details table, there is a field mount.parent. This is the value of that field * In the code, it is present as: In the vmops.host_details table, there is a field mount.parent. This is the value of that field
* If you have better ideas on how to get it, you are welcome. * If you have better ideas on how to get it, you are welcome.
* It may not be the UUID of the base copy of the snapshot, if no data was written since last snapshot. * It may not be the UUID of the base copy of the snapshot, if no data was written since last snapshot.
* @param templatePath The install path of the template VHD on the secondary, if this a root volume * @param templatePath The install path of the template VHD on the secondary, if this a root volume
*/ */
public CreateVolumeFromSnapshotCommand(String primaryStoragePoolNameLabel,
public CreateVolumeFromSnapshotCommand(StoragePool pool,
String secondaryStoragePoolURL, String secondaryStoragePoolURL,
Long dcId, Long dcId,
Long accountId, Long accountId,
@ -48,7 +51,7 @@ public class CreateVolumeFromSnapshotCommand extends SnapshotCommand {
String backedUpSnapshotName, String backedUpSnapshotName,
int wait) int wait)
{ {
super(primaryStoragePoolNameLabel, secondaryStoragePoolURL, backedUpSnapshotUuid, backedUpSnapshotName, dcId, accountId, volumeId); super(pool, secondaryStoragePoolURL, backedUpSnapshotUuid, backedUpSnapshotName, dcId, accountId, volumeId);
setWait(wait); setWait(wait);
} }
} }

View File

@ -20,8 +20,8 @@ import com.cloud.agent.api.LogLevel.Log4jLevel;
import com.cloud.agent.api.to.SwiftTO; import com.cloud.agent.api.to.SwiftTO;
/** /**
* *
* *
*/ */
public class DeleteObjectFromSwiftCommand extends Command { public class DeleteObjectFromSwiftCommand extends Command {
@ -31,9 +31,9 @@ public class DeleteObjectFromSwiftCommand extends Command {
private String object; private String object;
protected DeleteObjectFromSwiftCommand() { protected DeleteObjectFromSwiftCommand() {
} }
public DeleteObjectFromSwiftCommand(SwiftTO swift, String container, String object) { public DeleteObjectFromSwiftCommand(SwiftTO swift, String container, String object) {
this.swift = swift; this.swift = swift;
this.container = container; this.container = container;
@ -58,4 +58,4 @@ public class DeleteObjectFromSwiftCommand extends Command {
return true; return true;
} }
} }

View File

@ -18,15 +18,15 @@ package com.cloud.agent.api;
public class DeleteSnapshotBackupAnswer extends Answer { public class DeleteSnapshotBackupAnswer extends Answer {
protected DeleteSnapshotBackupAnswer() { protected DeleteSnapshotBackupAnswer() {
} }
public DeleteSnapshotBackupAnswer(DeleteSnapshotBackupCommand cmd, boolean success, String details) { public DeleteSnapshotBackupAnswer(DeleteSnapshotBackupCommand cmd, boolean success, String details) {
super(cmd, success, details); super(cmd, success, details);
} }
} }

View File

@ -17,15 +17,17 @@
package com.cloud.agent.api; package com.cloud.agent.api;
import com.cloud.agent.api.LogLevel.Log4jLevel; import com.cloud.agent.api.LogLevel.Log4jLevel;
import com.cloud.agent.api.to.S3TO;
import com.cloud.agent.api.to.SwiftTO; import com.cloud.agent.api.to.SwiftTO;
/** /**
* This command encapsulates a primitive operation which enables coalescing the backed up VHD snapshots on the secondary server * This command encapsulates a primitive operation which enables coalescing the backed up VHD snapshots on the secondary server
* This currently assumes that the secondary storage are mounted on the XenServer. * This currently assumes that the secondary storage are mounted on the XenServer.
*/ */
public class DeleteSnapshotBackupCommand extends SnapshotCommand { public class DeleteSnapshotBackupCommand extends SnapshotCommand {
@LogLevel(Log4jLevel.Off) @LogLevel(Log4jLevel.Off)
private SwiftTO swift; private SwiftTO swift;
private S3TO s3;
private Boolean all; private Boolean all;
public SwiftTO getSwift() { public SwiftTO getSwift() {
@ -44,35 +46,40 @@ public class DeleteSnapshotBackupCommand extends SnapshotCommand {
this.swift = swift; this.swift = swift;
} }
public S3TO getS3() {
return s3;
}
protected DeleteSnapshotBackupCommand() { protected DeleteSnapshotBackupCommand() {
} }
/** /**
* Given 2 VHD files on the secondary storage which are linked in a parent chain as follows: * Given 2 VHD files on the secondary storage which are linked in a parent chain as follows:
* backupUUID = parent(childUUID) * backupUUID = parent(childUUID)
* It gets another VHD * It gets another VHD
* previousBackupVHD = parent(backupUUID) * previousBackupVHD = parent(backupUUID)
* *
* And * And
* 1) it coalesces backupUuid into its parent. * 1) it coalesces backupUuid into its parent.
* 2) It deletes the VHD file corresponding to backupUuid * 2) It deletes the VHD file corresponding to backupUuid
* 3) It sets the parent VHD of childUUID to that of previousBackupUuid * 3) It sets the parent VHD of childUUID to that of previousBackupUuid
* *
* It takes care of the cases when * It takes care of the cases when
* 1) childUUID is null. - Step 3 is not done. * 1) childUUID is null. - Step 3 is not done.
* 2) previousBackupUUID is null * 2) previousBackupUUID is null
* - Merge childUUID into its parent backupUUID * - Merge childUUID into its parent backupUUID
* - Set the UUID of the resultant VHD to childUUID * - Set the UUID of the resultant VHD to childUUID
* - Essentially we are deleting the oldest VHD file and setting the current oldest VHD to childUUID * - Essentially we are deleting the oldest VHD file and setting the current oldest VHD to childUUID
* *
* @param volumeName The name of the volume whose snapshot was taken (something like i-3-SV-ROOT) * @param volumeName The name of the volume whose snapshot was taken (something like i-3-SV-ROOT)
* @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage. * @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage.
* In the code, it is present as: In the vmops.host_details table, there is a field mount.parent. This is the value of that field * In the code, it is present as: In the vmops.host_details table, there is a field mount.parent. This is the value of that field
* If you have better ideas on how to get it, you are welcome. * If you have better ideas on how to get it, you are welcome.
* @param backupUUID The VHD which has to be deleted * @param backupUUID The VHD which has to be deleted
* @param childUUID The child VHD file of the backup whose parent is reset to its grandparent. * @param childUUID The child VHD file of the backup whose parent is reset to its grandparent.
*/ */
public DeleteSnapshotBackupCommand(SwiftTO swift, public DeleteSnapshotBackupCommand(SwiftTO swift,
S3TO s3,
String secondaryStoragePoolURL, String secondaryStoragePoolURL,
Long dcId, Long dcId,
Long accountId, Long accountId,
@ -81,6 +88,7 @@ public class DeleteSnapshotBackupCommand extends SnapshotCommand {
{ {
super(null, secondaryStoragePoolURL, backupUUID, null, dcId, accountId, volumeId); super(null, secondaryStoragePoolURL, backupUUID, null, dcId, accountId, volumeId);
setSwift(swift); setSwift(swift);
this.s3 = s3;
setAll(all); setAll(all);
} }
} }

View File

@ -18,18 +18,18 @@ package com.cloud.agent.api;
/** /**
* This command encapsulates a primitive operation which enables coalescing the backed up VHD snapshots on the secondary server * This command encapsulates a primitive operation which enables coalescing the backed up VHD snapshots on the secondary server
* This currently assumes that the secondary storage are mounted on the XenServer. * This currently assumes that the secondary storage are mounted on the XenServer.
*/ */
public class DeleteSnapshotsDirCommand extends Command { public class DeleteSnapshotsDirCommand extends Command {
String secondaryStorageUrl; String secondaryStorageUrl;
Long dcId; Long dcId;
Long accountId; Long accountId;
Long volumeId; Long volumeId;
protected DeleteSnapshotsDirCommand() { protected DeleteSnapshotsDirCommand() {
} }
public DeleteSnapshotsDirCommand(String secondaryStorageUrl, public DeleteSnapshotsDirCommand(String secondaryStorageUrl,
Long dcId, Long accountId, Long volumeId) Long dcId, Long accountId, Long volumeId)
{ {
@ -60,4 +60,4 @@ public class DeleteSnapshotsDirCommand extends Command {
return volumeId; return volumeId;
} }
} }

View File

@ -23,20 +23,20 @@ import com.cloud.agent.api.to.StorageFilerTO;
import com.cloud.storage.StoragePool; import com.cloud.storage.StoragePool;
public class DeleteStoragePoolCommand extends Command { public class DeleteStoragePoolCommand extends Command {
StorageFilerTO pool; StorageFilerTO pool;
public static final String LOCAL_PATH_PREFIX="/mnt/"; public static final String LOCAL_PATH_PREFIX="/mnt/";
String localPath; String localPath;
public DeleteStoragePoolCommand() { public DeleteStoragePoolCommand() {
} }
public DeleteStoragePoolCommand(StoragePool pool, String localPath) { public DeleteStoragePoolCommand(StoragePool pool, String localPath) {
this.pool = new StorageFilerTO(pool); this.pool = new StorageFilerTO(pool);
this.localPath = localPath; this.localPath = localPath;
} }
public DeleteStoragePoolCommand(StoragePool pool) { public DeleteStoragePoolCommand(StoragePool pool) {
this(pool, LOCAL_PATH_PREFIX + File.separator + UUID.nameUUIDFromBytes((pool.getHostAddress() + pool.getPath()).getBytes())); this(pool, LOCAL_PATH_PREFIX + File.separator + UUID.nameUUIDFromBytes((pool.getHostAddress() + pool.getPath()).getBytes()));
} }
@ -48,7 +48,7 @@ public class DeleteStoragePoolCommand extends Command {
public void setPool(StoragePool pool) { public void setPool(StoragePool pool) {
this.pool = new StorageFilerTO(pool); this.pool = new StorageFilerTO(pool);
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return false; return false;
@ -57,5 +57,5 @@ public class DeleteStoragePoolCommand extends Command {
public String getLocalPath() { public String getLocalPath() {
return localPath; return localPath;
} }
} }

View File

@ -0,0 +1,106 @@
/*
* 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.S3TO;
public class DeleteTemplateFromS3Command extends Command {
private S3TO s3;
private Long templateId;
private Long accountId;
protected DeleteTemplateFromS3Command() {
super();
}
public DeleteTemplateFromS3Command(final S3TO s3, final Long accountId,
final Long templateId) {
super();
this.s3 = s3;
this.accountId = accountId;
this.templateId = templateId;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((accountId == null) ? 0 : accountId.hashCode());
result = prime * result + ((s3 == null) ? 0 : s3.hashCode());
result = prime * result
+ ((templateId == null) ? 0 : templateId.hashCode());
return result;
}
@Override
public boolean equals(Object thatObject) {
if (this == thatObject) {
return true;
}
if (thatObject == null) {
return false;
}
if (getClass() != thatObject.getClass()) {
return false;
}
final DeleteTemplateFromS3Command thatCommand = (DeleteTemplateFromS3Command) thatObject;
if (!(accountId == thatCommand.accountId)
|| (this.accountId != null && this.accountId
.equals(thatCommand.accountId))) {
return false;
}
if (!(templateId == thatCommand.templateId)
|| (this.templateId != null && this.templateId
.equals(thatCommand.templateId))) {
return false;
}
return true;
}
public S3TO getS3() {
return s3;
}
public Long getTemplateId() {
return templateId;
}
public Long getAccountId() {
return accountId;
}
@Override
public boolean executeInSequence() {
return true;
}
}

View File

@ -0,0 +1,61 @@
/*
* 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.S3TO;
public class DownloadSnapshotFromS3Command extends SnapshotCommand {
private S3TO s3;
private String parent;
protected DownloadSnapshotFromS3Command() {
super();
}
public DownloadSnapshotFromS3Command(S3TO s3, String parent,
String secondaryStorageUrl, Long dcId, Long accountId,
Long volumeId, String backupUuid, int wait) {
super(null, secondaryStorageUrl, backupUuid, "", dcId, accountId,
volumeId);
this.s3 = s3;
this.parent = parent;
setWait(wait);
}
public S3TO getS3() {
return s3;
}
public void setS3(S3TO s3) {
this.s3 = s3;
}
public String getParent() {
return parent;
}
public void setParent(String parent) {
this.parent = parent;
}
}

View File

@ -0,0 +1,66 @@
/*
* 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.S3TO;
public final class DownloadTemplateFromS3ToSecondaryStorageCommand extends Command {
private final S3TO s3;
private final Long accountId;
private final Long templateId;
private final String storagePath;
public DownloadTemplateFromS3ToSecondaryStorageCommand(final S3TO s3,
final Long accountId, final Long templateId,
final String storagePath, final int wait) {
super();
this.s3 = s3;
this.accountId = accountId;
this.templateId = templateId;
this.storagePath = storagePath;
setWait(wait);
}
public S3TO getS3() {
return this.s3;
}
public Long getAccountId() {
return this.accountId;
}
public Long getTemplateId() {
return this.templateId;
}
public String getStoragePath() {
return this.storagePath;
}
@Override
public boolean executeInSequence() {
return true;
}
}

View File

@ -20,15 +20,15 @@ public class FenceAnswer extends Answer {
public FenceAnswer() { public FenceAnswer() {
super(); super();
} }
public FenceAnswer(FenceCommand cmd) { public FenceAnswer(FenceCommand cmd) {
super(cmd, true, null); super(cmd, true, null);
} }
public FenceAnswer(FenceCommand cmd, String details) { public FenceAnswer(FenceCommand cmd, String details) {
super(cmd, true, details); super(cmd, true, details);
} }
public FenceAnswer(FenceCommand cmd, boolean result, String details) { public FenceAnswer(FenceCommand cmd, boolean result, String details) {
super(cmd, result, details); super(cmd, result, details);
} }

View File

@ -20,16 +20,16 @@ import com.cloud.host.Host;
import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachine;
public class FenceCommand extends Command { public class FenceCommand extends Command {
public FenceCommand() { public FenceCommand() {
super(); super();
} }
String vmName; String vmName;
String hostGuid; String hostGuid;
String hostIp; String hostIp;
boolean inSeq; boolean inSeq;
public FenceCommand(VirtualMachine vm, Host host) { public FenceCommand(VirtualMachine vm, Host host) {
super(); super();
vmName = vm.getInstanceName(); vmName = vm.getInstanceName();
@ -37,19 +37,19 @@ public class FenceCommand extends Command {
hostIp = host.getPrivateIpAddress(); hostIp = host.getPrivateIpAddress();
inSeq = false; inSeq = false;
} }
public void setSeq(boolean inseq) { public void setSeq(boolean inseq) {
inSeq = inseq; inSeq = inseq;
} }
public String getVmName() { public String getVmName() {
return vmName; return vmName;
} }
public String getHostGuid() { public String getHostGuid() {
return hostGuid; return hostGuid;
} }
public String getHostIp() { public String getHostIp() {
return hostIp; return hostIp;
} }

View File

@ -21,24 +21,24 @@ public class GetDomRVersionAnswer extends Answer {
public static final String ROUTER_IP = "router.ip"; public static final String ROUTER_IP = "router.ip";
String templateVersion; String templateVersion;
String scriptsVersion; String scriptsVersion;
protected GetDomRVersionAnswer() { protected GetDomRVersionAnswer() {
} }
public GetDomRVersionAnswer(GetDomRVersionCmd cmd, String details, String templateVersion, String scriptsVersion) { public GetDomRVersionAnswer(GetDomRVersionCmd cmd, String details, String templateVersion, String scriptsVersion) {
super(cmd, true, details); super(cmd, true, details);
this.templateVersion = templateVersion; this.templateVersion = templateVersion;
this.scriptsVersion = scriptsVersion; this.scriptsVersion = scriptsVersion;
} }
public GetDomRVersionAnswer(GetDomRVersionCmd cmd, String details) { public GetDomRVersionAnswer(GetDomRVersionCmd cmd, String details) {
super(cmd, false, details); super(cmd, false, details);
} }
public String getTemplateVersion() { public String getTemplateVersion() {
return this.templateVersion; return this.templateVersion;
} }
public String getScriptsVersion() { public String getScriptsVersion() {
return this.scriptsVersion; return this.scriptsVersion;
} }

View File

@ -19,29 +19,29 @@ package com.cloud.agent.api;
public class GetVncPortAnswer extends Answer { public class GetVncPortAnswer extends Answer {
String address; String address;
int port; int port;
protected GetVncPortAnswer() { protected GetVncPortAnswer() {
} }
public GetVncPortAnswer(GetVncPortCommand cmd, int port) { public GetVncPortAnswer(GetVncPortCommand cmd, int port) {
super(cmd, true, null); super(cmd, true, null);
this.port = port; this.port = port;
} }
public GetVncPortAnswer(GetVncPortCommand cmd, String address, int port) { public GetVncPortAnswer(GetVncPortCommand cmd, String address, int port) {
super(cmd, true, null); super(cmd, true, null);
this.address = address; this.address = address;
this.port = port; this.port = port;
} }
public GetVncPortAnswer(GetVncPortCommand cmd, String details) { public GetVncPortAnswer(GetVncPortCommand cmd, String details) {
super(cmd, false, details); super(cmd, false, details);
} }
public String getAddress() { public String getAddress() {
return address; return address;
} }
public int getPort() { public int getPort() {
return port; return port;
} }

View File

@ -22,21 +22,21 @@ public class GetVncPortCommand extends Command {
public GetVncPortCommand() { public GetVncPortCommand() {
} }
public GetVncPortCommand(long id, String name) { public GetVncPortCommand(long id, String name) {
this.id = id; this.id = id;
this.name = name; this.name = name;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return false; return false;
} }
public String getName() { public String getName() {
return name; return name;
} }
public long getId() { public long getId() {
return id; return id;
} }

View File

@ -19,7 +19,7 @@ package com.cloud.agent.api;
import com.cloud.host.HostStats; import com.cloud.host.HostStats;
public class HostStatsEntry implements HostStats { public class HostStatsEntry implements HostStats {
long hostId; long hostId;
String entityType; String entityType;
double cpuUtilization; double cpuUtilization;
@ -27,12 +27,12 @@ public class HostStatsEntry implements HostStats {
double networkWriteKBs; double networkWriteKBs;
double totalMemoryKBs; double totalMemoryKBs;
double freeMemoryKBs; double freeMemoryKBs;
public HostStatsEntry() { public HostStatsEntry() {
} }
public HostStatsEntry(long hostId,double cpuUtilization, double networkReadKBs, double networkWriteKBs, String entityType, public HostStatsEntry(long hostId,double cpuUtilization, double networkReadKBs, double networkWriteKBs, String entityType,
double totalMemoryKBs, double freeMemoryKBs, double xapiMemoryUsageKBs, double averageLoad) double totalMemoryKBs, double freeMemoryKBs, double xapiMemoryUsageKBs, double averageLoad)
{ {
this.hostId = hostId; this.hostId = hostId;
this.entityType = entityType; this.entityType = entityType;
@ -47,16 +47,16 @@ public class HostStatsEntry implements HostStats {
public double getNetworkReadKBs() { public double getNetworkReadKBs() {
return networkReadKBs; return networkReadKBs;
} }
public void setNetworkReadKBs(double networkReadKBs) { public void setNetworkReadKBs(double networkReadKBs) {
this.networkReadKBs = networkReadKBs; this.networkReadKBs = networkReadKBs;
} }
@Override @Override
public double getNetworkWriteKBs() { public double getNetworkWriteKBs() {
return networkWriteKBs; return networkWriteKBs;
} }
public void setNetworkWriteKBs(double networkWriteKBs) { public void setNetworkWriteKBs(double networkWriteKBs) {
this.networkWriteKBs = networkWriteKBs; this.networkWriteKBs = networkWriteKBs;
} }
@ -65,16 +65,16 @@ public class HostStatsEntry implements HostStats {
public String getEntityType(){ public String getEntityType(){
return this.entityType; return this.entityType;
} }
public void setEntityType(String entityType){ public void setEntityType(String entityType){
this.entityType = entityType; this.entityType = entityType;
} }
@Override @Override
public double getTotalMemoryKBs(){ public double getTotalMemoryKBs(){
return this.totalMemoryKBs; return this.totalMemoryKBs;
} }
public void setTotalMemoryKBs(double totalMemoryKBs){ public void setTotalMemoryKBs(double totalMemoryKBs){
this.totalMemoryKBs = totalMemoryKBs; this.totalMemoryKBs = totalMemoryKBs;
} }
@ -83,11 +83,11 @@ public class HostStatsEntry implements HostStats {
public double getFreeMemoryKBs(){ public double getFreeMemoryKBs(){
return this.freeMemoryKBs; return this.freeMemoryKBs;
} }
public void setFreeMemoryKBs(double freeMemoryKBs){ public void setFreeMemoryKBs(double freeMemoryKBs){
this.freeMemoryKBs = freeMemoryKBs; this.freeMemoryKBs = freeMemoryKBs;
} }
@Override @Override
public double getCpuUtilization() { public double getCpuUtilization() {
return this.cpuUtilization; return this.cpuUtilization;
@ -106,7 +106,7 @@ public class HostStatsEntry implements HostStats {
public HostStats getHostStats() { public HostStats getHostStats() {
return this; return this;
} }
public void setHostId(long hostId) { public void setHostId(long hostId) {
this.hostId = hostId; this.hostId = hostId;
} }

View File

@ -18,28 +18,28 @@ package com.cloud.agent.api;
public class MaintainAnswer extends Answer { public class MaintainAnswer extends Answer {
boolean willMigrate; boolean willMigrate;
public MaintainAnswer() { public MaintainAnswer() {
} }
public MaintainAnswer(MaintainCommand cmd) { public MaintainAnswer(MaintainCommand cmd) {
this(cmd, true, null); this(cmd, true, null);
} }
public MaintainAnswer(MaintainCommand cmd, boolean willMigrate) { public MaintainAnswer(MaintainCommand cmd, boolean willMigrate) {
this(cmd, true, null); this(cmd, true, null);
this.willMigrate = willMigrate; this.willMigrate = willMigrate;
} }
public MaintainAnswer(MaintainCommand cmd, String details) { public MaintainAnswer(MaintainCommand cmd, String details) {
this(cmd, true, details); this(cmd, true, details);
} }
public MaintainAnswer(MaintainCommand cmd, boolean result, String details) { public MaintainAnswer(MaintainCommand cmd, boolean result, String details) {
super(cmd, result, details); super(cmd, result, details);
this.willMigrate = true; this.willMigrate = true;
} }
public boolean getMigrate() { public boolean getMigrate() {
return this.willMigrate; return this.willMigrate;
} }

View File

@ -20,7 +20,7 @@ public class MaintainCommand extends Command {
public MaintainCommand() { public MaintainCommand() {
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return true; return true;

View File

@ -20,13 +20,13 @@ package com.cloud.agent.api;
public class ManageSnapshotAnswer extends Answer { public class ManageSnapshotAnswer extends Answer {
// For create Snapshot // For create Snapshot
private String _snapshotPath; private String _snapshotPath;
public ManageSnapshotAnswer() {} public ManageSnapshotAnswer() {}
public ManageSnapshotAnswer(Command cmd, boolean success, String result) { public ManageSnapshotAnswer(Command cmd, boolean success, String result) {
super(cmd, success, result); super(cmd, success, result);
} }
// For XenServer // For XenServer
public ManageSnapshotAnswer(ManageSnapshotCommand cmd, long snapshotId, String snapshotPath, boolean success, String result) { public ManageSnapshotAnswer(ManageSnapshotCommand cmd, long snapshotId, String snapshotPath, boolean success, String result) {
super(cmd, success, result); super(cmd, success, result);
@ -36,5 +36,5 @@ public class ManageSnapshotAnswer extends Answer {
public String getSnapshotPath() { public String getSnapshotPath() {
return _snapshotPath; return _snapshotPath;
} }
} }

View File

@ -25,9 +25,9 @@ public class ManageSnapshotCommand extends Command {
// XXX: Anyway there is something called inheritance in Java // XXX: Anyway there is something called inheritance in Java
public static String CREATE_SNAPSHOT = "-c"; public static String CREATE_SNAPSHOT = "-c";
public static String DESTROY_SNAPSHOT = "-d"; public static String DESTROY_SNAPSHOT = "-d";
private String _commandSwitch; private String _commandSwitch;
// Information about the volume that the snapshot is based on // Information about the volume that the snapshot is based on
private String _volumePath = null; private String _volumePath = null;
StorageFilerTO _pool; StorageFilerTO _pool;
@ -43,7 +43,7 @@ public class ManageSnapshotCommand extends Command {
public ManageSnapshotCommand(long snapshotId, String volumePath, StoragePool pool, String preSnapshotPath ,String snapshotName, String vmName) { public ManageSnapshotCommand(long snapshotId, String volumePath, StoragePool pool, String preSnapshotPath ,String snapshotName, String vmName) {
_commandSwitch = ManageSnapshotCommand.CREATE_SNAPSHOT; _commandSwitch = ManageSnapshotCommand.CREATE_SNAPSHOT;
_volumePath = volumePath; _volumePath = volumePath;
_pool = new StorageFilerTO(pool); _pool = new StorageFilerTO(pool);
_snapshotPath = preSnapshotPath; _snapshotPath = preSnapshotPath;
_snapshotName = snapshotName; _snapshotName = snapshotName;
_snapshotId = snapshotId; _snapshotId = snapshotId;
@ -54,8 +54,8 @@ public class ManageSnapshotCommand extends Command {
_commandSwitch = ManageSnapshotCommand.DESTROY_SNAPSHOT; _commandSwitch = ManageSnapshotCommand.DESTROY_SNAPSHOT;
_snapshotPath = snapshotPath; _snapshotPath = snapshotPath;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return false; return false;
@ -64,15 +64,15 @@ public class ManageSnapshotCommand extends Command {
public String getCommandSwitch() { public String getCommandSwitch() {
return _commandSwitch; return _commandSwitch;
} }
public String getVolumePath() { public String getVolumePath() {
return _volumePath; return _volumePath;
} }
public StorageFilerTO getPool() { public StorageFilerTO getPool() {
return _pool; return _pool;
} }
public String getSnapshotPath() { public String getSnapshotPath() {
return _snapshotPath; return _snapshotPath;
} }
@ -84,9 +84,9 @@ public class ManageSnapshotCommand extends Command {
public long getSnapshotId() { public long getSnapshotId() {
return _snapshotId; return _snapshotId;
} }
public String getVmName() { public String getVmName() {
return _vmName; return _vmName;
} }
} }

View File

@ -18,15 +18,15 @@ package com.cloud.agent.api;
public class MigrateAnswer extends Answer { public class MigrateAnswer extends Answer {
Integer vncPort = null; Integer vncPort = null;
protected MigrateAnswer() { protected MigrateAnswer() {
} }
public MigrateAnswer(MigrateCommand cmd, boolean result, String detail, Integer vncPort) { public MigrateAnswer(MigrateCommand cmd, boolean result, String detail, Integer vncPort) {
super(cmd, result, detail); super(cmd, result, detail);
this.vncPort = vncPort; this.vncPort = vncPort;
} }
public Integer getVncPort() { public Integer getVncPort() {
return vncPort; return vncPort;
} }

View File

@ -25,29 +25,29 @@ public class MigrateCommand extends Command {
protected MigrateCommand() { protected MigrateCommand() {
} }
public MigrateCommand(String vmName, String destIp, boolean isWindows) { public MigrateCommand(String vmName, String destIp, boolean isWindows) {
this.vmName = vmName; this.vmName = vmName;
this.destIp = destIp; this.destIp = destIp;
this.isWindows = isWindows; this.isWindows = isWindows;
} }
public boolean isWindows() { public boolean isWindows() {
return isWindows; return isWindows;
} }
public String getDestinationIp() { public String getDestinationIp() {
return destIp; return destIp;
} }
public String getVmName() { public String getVmName() {
return vmName; return vmName;
} }
public void setHostGuid(String guid) { public void setHostGuid(String guid) {
this.hostGuid = guid; this.hostGuid = guid;
} }
public String getHostGuid() { public String getHostGuid() {
return this.hostGuid; return this.hostGuid;
} }

View File

@ -30,13 +30,13 @@ public class ModifyStoragePoolAnswer extends Answer {
public ModifyStoragePoolAnswer(ModifyStoragePoolCommand cmd, long capacityBytes, long availableBytes, Map<String, TemplateInfo> tInfo) { public ModifyStoragePoolAnswer(ModifyStoragePoolCommand cmd, long capacityBytes, long availableBytes, Map<String, TemplateInfo> tInfo) {
super(cmd); super(cmd);
this.result = true; this.result = true;
this.poolInfo = new StoragePoolInfo(null, this.poolInfo = new StoragePoolInfo(null,
cmd.getPool().getHost(), cmd.getPool().getPath(), cmd.getLocalPath(), cmd.getPool().getHost(), cmd.getPool().getPath(), cmd.getLocalPath(),
cmd.getPool().getType(), capacityBytes, availableBytes ); cmd.getPool().getType(), capacityBytes, availableBytes );
this.templateInfo = tInfo; this.templateInfo = tInfo;
} }
public StoragePoolInfo getPoolInfo() { public StoragePoolInfo getPoolInfo() {
return poolInfo; return poolInfo;
} }

View File

@ -23,25 +23,25 @@ import com.cloud.agent.api.to.StorageFilerTO;
import com.cloud.storage.StoragePool; import com.cloud.storage.StoragePool;
public class ModifyStoragePoolCommand extends Command { public class ModifyStoragePoolCommand extends Command {
boolean add; boolean add;
StorageFilerTO pool; StorageFilerTO pool;
String localPath; String localPath;
String [] options; String [] options;
public static final String LOCAL_PATH_PREFIX="/mnt/"; public static final String LOCAL_PATH_PREFIX="/mnt/";
public ModifyStoragePoolCommand() { public ModifyStoragePoolCommand() {
} }
public ModifyStoragePoolCommand(boolean add, StoragePool pool, String localPath) { public ModifyStoragePoolCommand(boolean add, StoragePool pool, String localPath) {
this.add = add; this.add = add;
this.pool = new StorageFilerTO(pool); this.pool = new StorageFilerTO(pool);
this.localPath = localPath; this.localPath = localPath;
} }
public ModifyStoragePoolCommand(boolean add, StoragePool pool) { public ModifyStoragePoolCommand(boolean add, StoragePool pool) {
this(add, pool, LOCAL_PATH_PREFIX + File.separator + UUID.nameUUIDFromBytes((pool.getHostAddress() + pool.getPath()).getBytes())); this(add, pool, LOCAL_PATH_PREFIX + File.separator + UUID.nameUUIDFromBytes((pool.getHostAddress() + pool.getPath()).getBytes()));
} }
@ -53,11 +53,11 @@ public class ModifyStoragePoolCommand extends Command {
public void setPool(StoragePool pool) { public void setPool(StoragePool pool) {
this.pool = new StorageFilerTO(pool); this.pool = new StorageFilerTO(pool);
} }
public boolean getAdd() { public boolean getAdd() {
return add; return add;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return false; return false;
@ -71,5 +71,5 @@ public class ModifyStoragePoolCommand extends Command {
this.options = options; this.options = options;
} }
} }

View File

@ -33,7 +33,7 @@ public class NetworkUsageAnswer extends Answer {
this.bytesSent = bytesSent; this.bytesSent = bytesSent;
routerName = cmd.getDomRName(); routerName = cmd.getDomRName();
} }
public NetworkUsageAnswer(Command command, Exception e) { public NetworkUsageAnswer(Command command, Exception e) {
super(command, e); super(command, e);
} }

View File

@ -57,7 +57,7 @@ public class NetworkUsageCommand extends Command {
this.option = "create"; this.option = "create";
this.vpcCIDR = vpcCIDR; this.vpcCIDR = vpcCIDR;
} }
public NetworkUsageCommand(String privateIP, String domRName, String option, boolean forVpc, String gatewayIP) public NetworkUsageCommand(String privateIP, String domRName, String option, boolean forVpc, String gatewayIP)
{ {
this.privateIP = privateIP; this.privateIP = privateIP;
@ -66,7 +66,7 @@ public class NetworkUsageCommand extends Command {
this.gatewayIP = gatewayIP; this.gatewayIP = gatewayIP;
this.option = option; this.option = option;
} }
public String getPrivateIP() { public String getPrivateIP() {
return privateIP; return privateIP;
} }

View File

@ -21,7 +21,7 @@ public class PingAnswer extends Answer {
protected PingAnswer() { protected PingAnswer() {
} }
public PingAnswer(PingCommand cmd) { public PingAnswer(PingCommand cmd) {
super(cmd); super(cmd);
_command = cmd; _command = cmd;

View File

@ -21,23 +21,23 @@ import com.cloud.host.Host;
public class PingCommand extends Command { public class PingCommand extends Command {
Host.Type hostType; Host.Type hostType;
long hostId; long hostId;
protected PingCommand() { protected PingCommand() {
} }
public PingCommand(Host.Type type, long id) { public PingCommand(Host.Type type, long id) {
hostType = type; hostType = type;
hostId = id; hostId = id;
} }
public Host.Type getHostType() { public Host.Type getHostType() {
return hostType; return hostType;
} }
public long getHostId() { public long getHostId() {
return hostId; return hostId;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return false; return false;

View File

@ -25,15 +25,15 @@ public class PingRoutingCommand extends PingCommand {
Map<String, State> newStates; Map<String, State> newStates;
boolean _gatewayAccessible = true; boolean _gatewayAccessible = true;
boolean _vnetAccessible = true; boolean _vnetAccessible = true;
protected PingRoutingCommand() { protected PingRoutingCommand() {
} }
public PingRoutingCommand(Host.Type type, long id, Map<String, State> states) { public PingRoutingCommand(Host.Type type, long id, Map<String, State> states) {
super(type, id); super(type, id);
this.newStates = states; this.newStates = states;
} }
public Map<String, State> getNewStates() { public Map<String, State> getNewStates() {
return newStates; return newStates;
} }

View File

@ -25,17 +25,17 @@ import com.cloud.vm.VirtualMachine.State;
public class PingRoutingWithOvsCommand extends PingRoutingCommand { public class PingRoutingWithOvsCommand extends PingRoutingCommand {
List<Pair<String, Long>> states; List<Pair<String, Long>> states;
protected PingRoutingWithOvsCommand() { protected PingRoutingWithOvsCommand() {
super(); super();
} }
public PingRoutingWithOvsCommand(Host.Type type, long id, public PingRoutingWithOvsCommand(Host.Type type, long id,
Map<String, State> states, List<Pair<String, Long>> ovsStates) { Map<String, State> states, List<Pair<String, Long>> ovsStates) {
super(type, id, states); super(type, id, states);
this.states = ovsStates; this.states = ovsStates;
} }
public List<Pair<String, Long>> getStates() { public List<Pair<String, Long>> getStates() {
return states; return states;
} }

View File

@ -25,12 +25,12 @@ public class PingStorageCommand extends PingCommand {
protected PingStorageCommand() { protected PingStorageCommand() {
} }
public PingStorageCommand(Host.Type type, long id, Map<String, Boolean> changes) { public PingStorageCommand(Host.Type type, long id, Map<String, Boolean> changes) {
super(type, id); super(type, id);
this.changes = changes; this.changes = changes;
} }
public Map<String, Boolean> getChanges() { public Map<String, Boolean> getChanges() {
return changes; return changes;
} }

View File

@ -19,22 +19,22 @@ package com.cloud.agent.api;
import com.cloud.agent.api.to.NicTO; import com.cloud.agent.api.to.NicTO;
public class PlugNicCommand extends Command { public class PlugNicCommand extends Command {
NicTO nic; NicTO nic;
String instanceName; String instanceName;
public NicTO getNic() { public NicTO getNic() {
return nic; return nic;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return true; return true;
} }
protected PlugNicCommand() { protected PlugNicCommand() {
} }
public PlugNicCommand(NicTO nic, String instanceName) { public PlugNicCommand(NicTO nic, String instanceName) {
this.nic = nic; this.nic = nic;
this.instanceName = instanceName; this.instanceName = instanceName;

View File

@ -18,22 +18,22 @@ package com.cloud.agent.api;
public class PoolEjectCommand extends Command { public class PoolEjectCommand extends Command {
private String hostuuid; private String hostuuid;
public String getHostuuid() { public String getHostuuid() {
return hostuuid; return hostuuid;
} }
public void setHostuuid(String hostuuid) { public void setHostuuid(String hostuuid) {
this.hostuuid = hostuuid; this.hostuuid = hostuuid;
} }
public PoolEjectCommand() { public PoolEjectCommand() {
super(); super();
} }
public PoolEjectCommand(String hostuuid) { public PoolEjectCommand(String hostuuid) {
super(); super();
setHostuuid(hostuuid); setHostuuid(hostuuid);
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return true; return true;

View File

@ -19,15 +19,15 @@ package com.cloud.agent.api;
public class PrepareForMigrationAnswer extends Answer { public class PrepareForMigrationAnswer extends Answer {
protected PrepareForMigrationAnswer() { protected PrepareForMigrationAnswer() {
} }
public PrepareForMigrationAnswer(PrepareForMigrationCommand cmd, String detail) { public PrepareForMigrationAnswer(PrepareForMigrationCommand cmd, String detail) {
super(cmd, false, detail); super(cmd, false, detail);
} }
public PrepareForMigrationAnswer(PrepareForMigrationCommand cmd, Exception ex) { public PrepareForMigrationAnswer(PrepareForMigrationCommand cmd, Exception ex) {
super(cmd, ex); super(cmd, ex);
} }
public PrepareForMigrationAnswer(PrepareForMigrationCommand cmd) { public PrepareForMigrationAnswer(PrepareForMigrationCommand cmd) {
super(cmd, true, null); super(cmd, true, null);
} }

View File

@ -20,18 +20,18 @@ import com.cloud.agent.api.to.VirtualMachineTO;
public class PrepareForMigrationCommand extends Command { public class PrepareForMigrationCommand extends Command {
VirtualMachineTO vm; VirtualMachineTO vm;
protected PrepareForMigrationCommand() { protected PrepareForMigrationCommand() {
} }
public PrepareForMigrationCommand(VirtualMachineTO vm) { public PrepareForMigrationCommand(VirtualMachineTO vm) {
this.vm = vm; this.vm = vm;
} }
public VirtualMachineTO getVirtualMachine() { public VirtualMachineTO getVirtualMachine() {
return vm; return vm;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return true; return true;

View File

@ -23,7 +23,7 @@ import com.cloud.utils.Ternary;
public class PrepareOCFS2NodesCommand extends Command { public class PrepareOCFS2NodesCommand extends Command {
List<Ternary<Integer, String, String>> nodes; List<Ternary<Integer, String, String>> nodes;
String clusterName; String clusterName;
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return true; return true;
@ -33,11 +33,11 @@ public class PrepareOCFS2NodesCommand extends Command {
this.nodes = nodes; this.nodes = nodes;
this.clusterName = clusterName; this.clusterName = clusterName;
} }
public List<Ternary<Integer, String, String>> getNodes() { public List<Ternary<Integer, String, String>> getNodes() {
return nodes; return nodes;
} }
public String getClusterName() { public String getClusterName() {
return clusterName; return clusterName;
} }

View File

@ -21,24 +21,24 @@ import com.cloud.resource.ResourceState;
public class PropagateResourceEventCommand extends Command { public class PropagateResourceEventCommand extends Command {
long hostId; long hostId;
ResourceState.Event event; ResourceState.Event event;
protected PropagateResourceEventCommand() { protected PropagateResourceEventCommand() {
} }
public PropagateResourceEventCommand(long hostId, ResourceState.Event event) { public PropagateResourceEventCommand(long hostId, ResourceState.Event event) {
this.hostId = hostId; this.hostId = hostId;
this.event = event; this.event = event;
} }
public long getHostId() { public long getHostId() {
return hostId; return hostId;
} }
public ResourceState.Event getEvent() { public ResourceState.Event getEvent() {
return event; return event;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@ -19,11 +19,11 @@ package com.cloud.agent.api;
public class ReadyAnswer extends Answer { public class ReadyAnswer extends Answer {
protected ReadyAnswer() { protected ReadyAnswer() {
} }
public ReadyAnswer(ReadyCommand cmd) { public ReadyAnswer(ReadyCommand cmd) {
super(cmd, true, null); super(cmd, true, null);
} }
public ReadyAnswer(ReadyCommand cmd, String details) { public ReadyAnswer(ReadyCommand cmd, String details) {
super(cmd, false, details); super(cmd, false, details);
} }

View File

@ -23,27 +23,36 @@ public class ReadyCommand extends Command {
} }
private Long dcId; private Long dcId;
private Long hostId;
public ReadyCommand(Long dcId) { public ReadyCommand(Long dcId) {
super(); super();
this.dcId = dcId; this.dcId = dcId;
} }
public ReadyCommand(Long dcId, Long hostId) {
this(dcId);
this.hostId = hostId;
}
public void setDetails(String details) { public void setDetails(String details) {
_details = details; _details = details;
} }
public String getDetails() { public String getDetails() {
return _details; return _details;
} }
public Long getDataCenterId() { public Long getDataCenterId() {
return dcId; return dcId;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return true; return true;
} }
public Long getHostId() {
return hostId;
}
} }

View File

@ -18,24 +18,24 @@ package com.cloud.agent.api;
public class RebootAnswer extends Answer { public class RebootAnswer extends Answer {
Integer vncPort; Integer vncPort;
protected RebootAnswer() { protected RebootAnswer() {
} }
public RebootAnswer(RebootCommand cmd, String details, Integer vncport) { public RebootAnswer(RebootCommand cmd, String details, Integer vncport) {
super(cmd, true, details); super(cmd, true, details);
this.vncPort = vncport; this.vncPort = vncport;
} }
public RebootAnswer(RebootCommand cmd, String details, boolean success) { public RebootAnswer(RebootCommand cmd, String details, boolean success) {
super(cmd, success, details); super(cmd, success, details);
this.vncPort = null; this.vncPort = null;
} }
public RebootAnswer(RebootCommand cmd, Exception e) { public RebootAnswer(RebootCommand cmd, Exception e) {
super(cmd, e); super(cmd, e);
} }
public Integer getVncPort() { public Integer getVncPort() {
return vncPort; return vncPort;
} }

View File

@ -20,25 +20,25 @@ import com.cloud.vm.VirtualMachine;
public class RebootCommand extends Command { public class RebootCommand extends Command {
String vmName; String vmName;
protected RebootCommand() { protected RebootCommand() {
} }
public RebootCommand(VirtualMachine vm) { public RebootCommand(VirtualMachine vm) {
vmName = vm.getInstanceName(); vmName = vm.getInstanceName();
} }
public RebootCommand(String vmName) { public RebootCommand(String vmName) {
this.vmName = vmName; this.vmName = vmName;
} }
public String getVmName() { public String getVmName() {
return vmName; return vmName;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return true; return true;
} }
} }

View File

@ -18,7 +18,7 @@ package com.cloud.agent.api;
public class RebootRouterCommand extends RebootCommand { public class RebootRouterCommand extends RebootCommand {
protected String privateIp; protected String privateIp;
protected RebootRouterCommand() { protected RebootRouterCommand() {

View File

@ -33,7 +33,7 @@ public class SecStorageFirewallCfgCommand extends Command {
this.intf = intf; this.intf = intf;
} }
public PortConfig() { public PortConfig() {
} }
public boolean isAdd() { public boolean isAdd() {
return add; return add;
@ -48,28 +48,28 @@ public class SecStorageFirewallCfgCommand extends Command {
return intf; return intf;
} }
} }
private List<PortConfig> portConfigs = new ArrayList<PortConfig>(); private List<PortConfig> portConfigs = new ArrayList<PortConfig>();
private boolean isAppendAIp = false; private boolean isAppendAIp = false;
public SecStorageFirewallCfgCommand() { public SecStorageFirewallCfgCommand() {
} }
public SecStorageFirewallCfgCommand(boolean isAppend) { public SecStorageFirewallCfgCommand(boolean isAppend) {
this.isAppendAIp = isAppend; this.isAppendAIp = isAppend;
} }
public void addPortConfig(String sourceIp, String port, boolean add, String intf) { public void addPortConfig(String sourceIp, String port, boolean add, String intf) {
PortConfig pc = new PortConfig(sourceIp, port, add, intf); PortConfig pc = new PortConfig(sourceIp, port, add, intf);
this.portConfigs.add(pc); this.portConfigs.add(pc);
} }
public boolean getIsAppendAIp() { public boolean getIsAppendAIp() {
return isAppendAIp; return isAppendAIp;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return false; return false;

View File

@ -20,12 +20,12 @@ public class SecStorageSetupAnswer extends Answer {
private String _dir; private String _dir;
protected SecStorageSetupAnswer() { protected SecStorageSetupAnswer() {
} }
public SecStorageSetupAnswer(String dir) { public SecStorageSetupAnswer(String dir) {
super(null, true, "success"); super(null, true, "success");
this._dir = dir; this._dir = dir;
} }
public String get_dir() { public String get_dir() {
return _dir; return _dir;
} }

View File

@ -21,7 +21,7 @@ import com.cloud.agent.api.LogLevel.Log4jLevel;
public class SecStorageSetupCommand extends Command { public class SecStorageSetupCommand extends Command {
private String secUrl; private String secUrl;
private Certificates certs; private Certificates certs;
public static class Certificates { public static class Certificates {
@LogLevel(Log4jLevel.Off) @LogLevel(Log4jLevel.Off)
private String privKey; private String privKey;
@ -29,30 +29,30 @@ public class SecStorageSetupCommand extends Command {
private String privCert; private String privCert;
@LogLevel(Log4jLevel.Off) @LogLevel(Log4jLevel.Off)
private String certChain; private String certChain;
public Certificates() { public Certificates() {
} }
public Certificates(String prvKey, String privCert, String certChain) { public Certificates(String prvKey, String privCert, String certChain) {
this.privKey = prvKey; this.privKey = prvKey;
this.privCert = privCert; this.privCert = privCert;
this.certChain = certChain; this.certChain = certChain;
} }
public String getPrivKey() { public String getPrivKey() {
return this.privKey; return this.privKey;
} }
public String getPrivCert() { public String getPrivCert() {
return this.privCert; return this.privCert;
} }
public String getCertChain() { public String getCertChain() {
return this.certChain; return this.certChain;
} }
} }
public SecStorageSetupCommand() { public SecStorageSetupCommand() {
super(); super();
} }
@ -62,7 +62,7 @@ public class SecStorageSetupCommand extends Command {
this.secUrl = secUrl; this.secUrl = secUrl;
this.certs = certs; this.certs = certs;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return true; return true;
@ -71,13 +71,13 @@ public class SecStorageSetupCommand extends Command {
public String getSecUrl() { public String getSecUrl() {
return secUrl; return secUrl;
} }
public Certificates getCerts() { public Certificates getCerts() {
return this.certs; return this.certs;
} }
public void setSecUrl(String secUrl) { public void setSecUrl(String secUrl) {
this.secUrl = secUrl; this.secUrl = secUrl;
} }
} }

View File

@ -20,11 +20,11 @@ public class SecStorageVMSetupCommand extends Command {
String [] allowedInternalSites = new String[0]; String [] allowedInternalSites = new String[0];
String copyUserName; String copyUserName;
String copyPassword; String copyPassword;
public SecStorageVMSetupCommand() { public SecStorageVMSetupCommand() {
super(); super();
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return true; return true;

View File

@ -26,24 +26,24 @@ public class SecurityGroupRuleAnswer extends Answer {
Long logSequenceNumber = null; Long logSequenceNumber = null;
Long vmId = null; Long vmId = null;
FailureReason reason = FailureReason.NONE; FailureReason reason = FailureReason.NONE;
protected SecurityGroupRuleAnswer() { protected SecurityGroupRuleAnswer() {
} }
public SecurityGroupRuleAnswer(SecurityGroupRulesCmd cmd) { public SecurityGroupRuleAnswer(SecurityGroupRulesCmd cmd) {
super(cmd); super(cmd);
this.logSequenceNumber = cmd.getSeqNum(); this.logSequenceNumber = cmd.getSeqNum();
this.vmId = cmd.getVmId(); this.vmId = cmd.getVmId();
} }
public SecurityGroupRuleAnswer(SecurityGroupRulesCmd cmd, boolean result, String detail) { public SecurityGroupRuleAnswer(SecurityGroupRulesCmd cmd, boolean result, String detail) {
super(cmd, result, detail); super(cmd, result, detail);
this.logSequenceNumber = cmd.getSeqNum(); this.logSequenceNumber = cmd.getSeqNum();
this.vmId = cmd.getVmId(); this.vmId = cmd.getVmId();
reason = FailureReason.PROGRAMMING_FAILED; reason = FailureReason.PROGRAMMING_FAILED;
} }
public SecurityGroupRuleAnswer(SecurityGroupRulesCmd cmd, boolean result, String detail, FailureReason r) { public SecurityGroupRuleAnswer(SecurityGroupRulesCmd cmd, boolean result, String detail, FailureReason r) {
super(cmd, result, detail); super(cmd, result, detail);
this.logSequenceNumber = cmd.getSeqNum(); this.logSequenceNumber = cmd.getSeqNum();

View File

@ -126,7 +126,7 @@ public class SecurityGroupRulesCmd extends Command {
public void setEgressRuleSet(IpPortAndProto[] egressRuleSet) { public void setEgressRuleSet(IpPortAndProto[] egressRuleSet) {
this.egressRuleSet = egressRuleSet; this.egressRuleSet = egressRuleSet;
} }
public String getGuestIp() { public String getGuestIp() {
return guestIp; return guestIp;
} }
@ -156,15 +156,15 @@ public class SecurityGroupRulesCmd extends Command {
} }
return ruleBuilder.toString(); return ruleBuilder.toString();
} }
//convert cidrs in the form "a.b.c.d/e" to "hexvalue of 32bit ip/e" //convert cidrs in the form "a.b.c.d/e" to "hexvalue of 32bit ip/e"
private String compressCidr(String cidr) { private String compressCidr(String cidr) {
String [] toks = cidr.split("/"); String [] toks = cidr.split("/");
long ipnum = NetUtils.ip2Long(toks[0]); long ipnum = NetUtils.ip2Long(toks[0]);
return Long.toHexString(ipnum) + "/" + toks[1]; return Long.toHexString(ipnum) + "/" + toks[1];
} }
public String stringifyCompressedRules() { public String stringifyCompressedRules() {
StringBuilder ruleBuilder = new StringBuilder(); StringBuilder ruleBuilder = new StringBuilder();
for (SecurityGroupRulesCmd.IpPortAndProto ipPandP : getIngressRuleSet()) { for (SecurityGroupRulesCmd.IpPortAndProto ipPandP : getIngressRuleSet()) {
@ -187,7 +187,7 @@ public class SecurityGroupRulesCmd extends Command {
} }
return ruleBuilder.toString(); return ruleBuilder.toString();
} }
/* /*
* Compress the security group rules using zlib compression to allow the call to the hypervisor * Compress the security group rules using zlib compression to allow the call to the hypervisor
* to scale beyond 8k cidrs. * to scale beyond 8k cidrs.
@ -243,7 +243,7 @@ public class SecurityGroupRulesCmd extends Command {
public Long getVmId() { public Long getVmId() {
return vmId; return vmId;
} }
public int getTotalNumCidrs() { public int getTotalNumCidrs() {
//useful for logging //useful for logging
int count = 0; int count = 0;
@ -255,11 +255,11 @@ public class SecurityGroupRulesCmd extends Command {
} }
return count; return count;
} }
public void setMsId(long msId) { public void setMsId(long msId) {
this.msId = msId; this.msId = msId;
} }
public Long getMsId() { public Long getMsId() {
return msId; return msId;
} }

View File

@ -33,5 +33,5 @@ public class SetupAnswer extends Answer {
public boolean needReconnect() { public boolean needReconnect() {
return _reconnect; return _reconnect;
} }
} }

View File

@ -23,7 +23,7 @@ public class SetupCommand extends Command {
HostEnvironment env; HostEnvironment env;
boolean multipath; boolean multipath;
boolean needSetup; boolean needSetup;
public boolean needSetup() { public boolean needSetup() {
return needSetup; return needSetup;
} }
@ -37,18 +37,18 @@ public class SetupCommand extends Command {
this.multipath = false; this.multipath = false;
this.needSetup = false; this.needSetup = false;
} }
public HostEnvironment getEnvironment() { public HostEnvironment getEnvironment() {
return env; return env;
} }
protected SetupCommand() { protected SetupCommand() {
} }
public void setMultipathOn() { public void setMultipathOn() {
this.multipath = true; this.multipath = true;
} }
public boolean useMultipath() { public boolean useMultipath() {
return multipath; return multipath;
} }

View File

@ -28,7 +28,7 @@ public class SetupGuestNetworkCommand extends NetworkElementCommand{
Integer priority; Integer priority;
boolean add = true; boolean add = true;
NicTO nic; NicTO nic;
public NicTO getNic() { public NicTO getNic() {
return nic; return nic;
} }
@ -53,12 +53,12 @@ public class SetupGuestNetworkCommand extends NetworkElementCommand{
public boolean executeInSequence() { public boolean executeInSequence() {
return true; return true;
} }
protected SetupGuestNetworkCommand() { protected SetupGuestNetworkCommand() {
} }
public SetupGuestNetworkCommand(String dhcpRange, String networkDomain, boolean isRedundant, Integer priority, public SetupGuestNetworkCommand(String dhcpRange, String networkDomain, boolean isRedundant, Integer priority,
String defaultDns1, String defaultDns2, boolean add, NicTO nic) { String defaultDns1, String defaultDns2, boolean add, NicTO nic) {
this.dhcpRange = dhcpRange; this.dhcpRange = dhcpRange;
this.networkDomain = networkDomain; this.networkDomain = networkDomain;

View File

@ -24,31 +24,31 @@ public class ShutdownCommand extends Command {
public static final String Update = "update"; public static final String Update = "update";
public static final String Unknown = "unknown"; public static final String Unknown = "unknown";
public static final String DeleteHost = "deleteHost"; public static final String DeleteHost = "deleteHost";
private String reason; private String reason;
private String detail; private String detail;
protected ShutdownCommand() { protected ShutdownCommand() {
super(); super();
} }
public ShutdownCommand(String reason, String detail) { public ShutdownCommand(String reason, String detail) {
super(); super();
this.reason = reason; this.reason = reason;
this.detail = detail; this.detail = detail;
} }
/** /**
* @return return the reason the agent shutdown. If Unknown, call getDetail() for any details. * @return return the reason the agent shutdown. If Unknown, call getDetail() for any details.
*/ */
public String getReason() { public String getReason() {
return reason; return reason;
} }
public String getDetail() { public String getDetail() {
return detail; return detail;
} }
@Override @Override
public boolean executeInSequence() { public boolean executeInSequence() {
return true; return true;

Some files were not shown because too many files have changed in this diff Show More