mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge branch 'api_refactoring' into javelin
This commit is contained in:
commit
30f2565d98
15
.gitignore
vendored
15
.gitignore
vendored
@ -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
37
CHANGES
Normal 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
|
||||||
|
|
||||||
169
INSTALL.md
169
INSTALL.md
@ -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
288
KEYS
@ -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
|
|
||||||
|
|
||||||
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
|
|
||||||
=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)
|
|
||||||
|
|
||||||
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
|
|
||||||
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
|
|
||||||
|
|
||||||
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
|
|
||||||
=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)
|
|
||||||
|
|
||||||
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
|
|
||||||
R5fTvoVeebaUFoTe
|
|
||||||
=d4EI
|
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
|
||||||
161
NOTICE
161
NOTICE
@ -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).
|
||||||
|
|||||||
74
README.md
74
README.md
@ -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
260
README.tools.md
Normal 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
|
||||||
@ -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
|
|
||||||
@ -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>
|
||||||
|
|||||||
@ -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);
|
||||||
@ -577,6 +584,19 @@ public class Agent implements HandlerFactory, IAgentControl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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();
|
||||||
if (obj instanceof Response) {
|
if (obj instanceof Response) {
|
||||||
@ -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();
|
||||||
|
|||||||
@ -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 {
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
@ -17,6 +17,7 @@
|
|||||||
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;
|
||||||
@ -32,6 +33,7 @@ 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() {
|
||||||
@ -48,8 +50,7 @@ public class BackupSnapshotCommand extends SnapshotCommand {
|
|||||||
* @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,
|
||||||
@ -64,13 +65,12 @@ public class BackupSnapshotCommand extends SnapshotCommand {
|
|||||||
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);
|
||||||
}
|
}
|
||||||
@ -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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -16,6 +16,8 @@
|
|||||||
// 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.
|
||||||
*/
|
*/
|
||||||
@ -40,7 +42,8 @@ public class CreatePrivateTemplateFromSnapshotCommand extends SnapshotCommand {
|
|||||||
* 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,
|
||||||
@ -52,7 +55,7 @@ public class CreatePrivateTemplateFromSnapshotCommand extends SnapshotCommand {
|
|||||||
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;
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,8 @@
|
|||||||
// 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.
|
||||||
*/
|
*/
|
||||||
@ -39,7 +41,8 @@ public class CreateVolumeFromSnapshotCommand extends SnapshotCommand {
|
|||||||
* 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -17,6 +17,7 @@
|
|||||||
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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,6 +27,7 @@ import com.cloud.agent.api.to.SwiftTO;
|
|||||||
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,6 +46,10 @@ public class DeleteSnapshotBackupCommand extends SnapshotCommand {
|
|||||||
this.swift = swift;
|
this.swift = swift;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public S3TO getS3() {
|
||||||
|
return s3;
|
||||||
|
}
|
||||||
|
|
||||||
protected DeleteSnapshotBackupCommand() {
|
protected DeleteSnapshotBackupCommand() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,6 +79,7 @@ public class DeleteSnapshotBackupCommand extends SnapshotCommand {
|
|||||||
* @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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
106
api/src/com/cloud/agent/api/DeleteTemplateFromS3Command.java
Normal file
106
api/src/com/cloud/agent/api/DeleteTemplateFromS3Command.java
Normal 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -23,12 +23,18 @@ 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;
|
||||||
}
|
}
|
||||||
@ -46,4 +52,7 @@ public class ReadyCommand extends Command {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getHostId() {
|
||||||
|
return hostId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,11 +16,16 @@
|
|||||||
// 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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 SnapshotCommand extends Command {
|
public class SnapshotCommand extends Command {
|
||||||
protected String primaryStoragePoolNameLabel;
|
protected String primaryStoragePoolNameLabel;
|
||||||
|
StorageFilerTO primaryPool;
|
||||||
private String snapshotUuid;
|
private String snapshotUuid;
|
||||||
private String snapshotName;
|
private String snapshotName;
|
||||||
private String secondaryStorageUrl;
|
private String secondaryStorageUrl;
|
||||||
@ -34,21 +39,22 @@ public class SnapshotCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param primaryStoragePoolNameLabel The primary storage Pool
|
* @param primaryStoragePoolNameLabel
|
||||||
* @param snapshotUuid The UUID of the snapshot which is going to be backed up
|
* The primary storage Pool
|
||||||
* @param secondaryStoragePoolURL This is what shows up in the UI when you click on Secondary storage.
|
* @param snapshotUuid
|
||||||
* 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
|
* The UUID of the snapshot which is going to be backed up
|
||||||
* If you have better ideas on how to get it, you are welcome.
|
* @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 If you have better ideas on how to
|
||||||
|
* get it, you are welcome.
|
||||||
*/
|
*/
|
||||||
public SnapshotCommand(String primaryStoragePoolNameLabel,
|
public SnapshotCommand(StoragePool pool,
|
||||||
String secondaryStorageUrl,
|
String secondaryStorageUrl, String snapshotUuid,
|
||||||
String snapshotUuid,
|
String snapshotName, Long dcId, Long accountId, Long volumeId) {
|
||||||
String snapshotName,
|
this.primaryStoragePoolNameLabel = pool.getUuid();
|
||||||
Long dcId,
|
this.primaryPool = new StorageFilerTO(pool);
|
||||||
Long accountId,
|
|
||||||
Long volumeId)
|
|
||||||
{
|
|
||||||
this.primaryStoragePoolNameLabel = primaryStoragePoolNameLabel;
|
|
||||||
this.snapshotUuid = snapshotUuid;
|
this.snapshotUuid = snapshotUuid;
|
||||||
this.secondaryStorageUrl = secondaryStorageUrl;
|
this.secondaryStorageUrl = secondaryStorageUrl;
|
||||||
this.dcId = dcId;
|
this.dcId = dcId;
|
||||||
@ -64,6 +70,13 @@ public class SnapshotCommand extends Command {
|
|||||||
return primaryStoragePoolNameLabel;
|
return primaryStoragePoolNameLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the primaryPool
|
||||||
|
*/
|
||||||
|
public StorageFilerTO getPool() {
|
||||||
|
return primaryPool;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the snapshotUuid
|
* @return the snapshotUuid
|
||||||
*/
|
*/
|
||||||
@ -82,7 +95,6 @@ public class SnapshotCommand extends Command {
|
|||||||
return secondaryStorageUrl;
|
return secondaryStorageUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Long getDataCenterId() {
|
public Long getDataCenterId() {
|
||||||
return dcId;
|
return dcId;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,6 +15,8 @@
|
|||||||
// 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;
|
||||||
|
import com.cloud.storage.StoragePool;
|
||||||
|
|
||||||
public class UpgradeSnapshotCommand extends SnapshotCommand {
|
public class UpgradeSnapshotCommand extends SnapshotCommand {
|
||||||
private String version;
|
private String version;
|
||||||
private Long templateId;
|
private Long templateId;
|
||||||
@ -30,7 +32,7 @@ public class UpgradeSnapshotCommand extends SnapshotCommand {
|
|||||||
* @param snapshotUuid The UUID of the snapshot which is going to be upgraded
|
* @param snapshotUuid The UUID of the snapshot which is going to be upgraded
|
||||||
* @param _version version for this snapshot
|
* @param _version version for this snapshot
|
||||||
*/
|
*/
|
||||||
public UpgradeSnapshotCommand(String primaryStoragePoolNameLabel,
|
public UpgradeSnapshotCommand(StoragePool pool,
|
||||||
String secondaryStoragePoolURL,
|
String secondaryStoragePoolURL,
|
||||||
Long dcId,
|
Long dcId,
|
||||||
Long accountId,
|
Long accountId,
|
||||||
@ -42,7 +44,7 @@ public class UpgradeSnapshotCommand extends SnapshotCommand {
|
|||||||
String snapshotName,
|
String snapshotName,
|
||||||
String version)
|
String version)
|
||||||
{
|
{
|
||||||
super(primaryStoragePoolNameLabel, secondaryStoragePoolURL, snapshotUuid, snapshotName, dcId, accountId, volumeId);
|
super(pool, secondaryStoragePoolURL, snapshotUuid, snapshotName, dcId, accountId, volumeId);
|
||||||
this.version = version;
|
this.version = version;
|
||||||
this.templateId = templateId;
|
this.templateId = templateId;
|
||||||
this.tmpltAccountId = tmpltAccountId;
|
this.tmpltAccountId = tmpltAccountId;
|
||||||
|
|||||||
@ -0,0 +1,121 @@
|
|||||||
|
/*
|
||||||
|
* 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 UploadTemplateToS3FromSecondaryStorageCommand extends Command {
|
||||||
|
|
||||||
|
private final S3TO s3;
|
||||||
|
private final String storagePath;
|
||||||
|
private final Long dataCenterId;
|
||||||
|
private final Long accountId;
|
||||||
|
private final Long templateId;
|
||||||
|
|
||||||
|
public UploadTemplateToS3FromSecondaryStorageCommand(final S3TO s3,
|
||||||
|
final String storagePath, final Long dataCenterId, final Long accountId,
|
||||||
|
final Long templateId) {
|
||||||
|
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.s3 = s3;
|
||||||
|
this.storagePath = storagePath;
|
||||||
|
this.dataCenterId = dataCenterId;
|
||||||
|
this.accountId = accountId;
|
||||||
|
this.templateId = templateId;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean executeInSequence() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object thatObject) {
|
||||||
|
|
||||||
|
if (this == thatObject) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (thatObject == null || getClass() != thatObject.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
final UploadTemplateToS3FromSecondaryStorageCommand thatCommand =
|
||||||
|
(UploadTemplateToS3FromSecondaryStorageCommand) thatObject;
|
||||||
|
|
||||||
|
if (this.accountId != null ? !this.accountId.equals(thatCommand
|
||||||
|
.accountId) : thatCommand.accountId != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.dataCenterId != null ? !this.dataCenterId.equals(thatCommand
|
||||||
|
.dataCenterId) : thatCommand.dataCenterId != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.s3 != null ? !this.s3.equals(thatCommand.s3) : thatCommand.s3 != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.storagePath != null ? !this.storagePath.equals(thatCommand
|
||||||
|
.storagePath) : thatCommand.storagePath != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.templateId != null ? !this.templateId.equals(thatCommand.templateId) :
|
||||||
|
thatCommand.templateId != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int result = this.s3 != null ? this.s3.hashCode() : 0;
|
||||||
|
result = 31 * result + (this.storagePath != null ? this.storagePath.hashCode() : 0);
|
||||||
|
result = 31 * result + (this.dataCenterId != null ? this.dataCenterId.hashCode() : 0);
|
||||||
|
result = 31 * result + (this.accountId != null ? this.accountId.hashCode() : 0);
|
||||||
|
result = 31 * result + (this.templateId != null ? this.templateId.hashCode() : 0);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public S3TO getS3() {
|
||||||
|
return this.s3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStoragePath() {
|
||||||
|
return this.storagePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDataCenterId() {
|
||||||
|
return this.dataCenterId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAccountId() {
|
||||||
|
return this.accountId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTemplateId() {
|
||||||
|
return this.templateId;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -34,7 +34,7 @@ public class downloadSnapshotFromSwiftCommand extends SnapshotCommand {
|
|||||||
|
|
||||||
public downloadSnapshotFromSwiftCommand(SwiftTO swift, String secondaryStorageUrl, Long dcId, Long accountId, Long volumeId, String parent, String BackupUuid, int wait) {
|
public downloadSnapshotFromSwiftCommand(SwiftTO swift, String secondaryStorageUrl, Long dcId, Long accountId, Long volumeId, String parent, String BackupUuid, int wait) {
|
||||||
|
|
||||||
super("", secondaryStorageUrl, BackupUuid, "", dcId, accountId, volumeId);
|
super(null, secondaryStorageUrl, BackupUuid, "", dcId, accountId, volumeId);
|
||||||
setParent(parent);
|
setParent(parent);
|
||||||
setSwift(swift);
|
setSwift(swift);
|
||||||
setWait(wait);
|
setWait(wait);
|
||||||
|
|||||||
@ -21,9 +21,10 @@ import java.net.URI;
|
|||||||
import com.cloud.storage.Volume;
|
import com.cloud.storage.Volume;
|
||||||
import com.cloud.storage.Storage.ImageFormat;
|
import com.cloud.storage.Storage.ImageFormat;
|
||||||
import com.cloud.template.VirtualMachineTemplate;
|
import com.cloud.template.VirtualMachineTemplate;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
|
||||||
public class DownloadCommand extends AbstractDownloadCommand {
|
public class DownloadCommand extends AbstractDownloadCommand implements InternalIdentity {
|
||||||
public static class PasswordAuth {
|
public static class PasswordAuth {
|
||||||
String userName;
|
String userName;
|
||||||
String password;
|
String password;
|
||||||
|
|||||||
@ -17,7 +17,8 @@
|
|||||||
package com.cloud.agent.api.storage;
|
package com.cloud.agent.api.storage;
|
||||||
|
|
||||||
import com.cloud.storage.Storage.ImageFormat;
|
import com.cloud.storage.Storage.ImageFormat;
|
||||||
|
import com.cloud.agent.api.to.StorageFilerTO;
|
||||||
|
import com.cloud.storage.StoragePool;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -27,16 +28,19 @@ public class PrimaryStorageDownloadCommand extends AbstractDownloadCommand {
|
|||||||
String poolUuid;
|
String poolUuid;
|
||||||
long poolId;
|
long poolId;
|
||||||
|
|
||||||
|
StorageFilerTO primaryPool;
|
||||||
|
|
||||||
String secondaryStorageUrl;
|
String secondaryStorageUrl;
|
||||||
String primaryStorageUrl;
|
String primaryStorageUrl;
|
||||||
|
|
||||||
protected PrimaryStorageDownloadCommand() {
|
protected PrimaryStorageDownloadCommand() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public PrimaryStorageDownloadCommand(String name, String url, ImageFormat format, long accountId, long poolId, String poolUuid, int wait) {
|
public PrimaryStorageDownloadCommand(String name, String url, ImageFormat format, long accountId, StoragePool pool, int wait) {
|
||||||
super(name, url, format, accountId);
|
super(name, url, format, accountId);
|
||||||
this.poolId = poolId;
|
this.poolId = pool.getId();
|
||||||
this.poolUuid = poolUuid;
|
this.poolUuid = pool.getUuid();
|
||||||
|
this.primaryPool = new StorageFilerTO(pool);
|
||||||
setWait(wait);
|
setWait(wait);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,6 +52,10 @@ public class PrimaryStorageDownloadCommand extends AbstractDownloadCommand {
|
|||||||
return poolId;
|
return poolId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public StorageFilerTO getPool() {
|
||||||
|
return primaryPool;
|
||||||
|
}
|
||||||
|
|
||||||
public void setLocalPath(String path) {
|
public void setLocalPath(String path) {
|
||||||
this.localPath = path;
|
this.localPath = path;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,9 +20,10 @@ import com.cloud.agent.api.storage.DownloadCommand.PasswordAuth;
|
|||||||
import com.cloud.agent.api.to.TemplateTO;
|
import com.cloud.agent.api.to.TemplateTO;
|
||||||
import com.cloud.storage.Upload.Type;
|
import com.cloud.storage.Upload.Type;
|
||||||
import com.cloud.template.VirtualMachineTemplate;
|
import com.cloud.template.VirtualMachineTemplate;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
|
||||||
public class UploadCommand extends AbstractUploadCommand {
|
public class UploadCommand extends AbstractUploadCommand implements InternalIdentity {
|
||||||
|
|
||||||
private TemplateTO template;
|
private TemplateTO template;
|
||||||
private String url;
|
private String url;
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import java.util.List;
|
|||||||
import com.cloud.network.rules.FirewallRule;
|
import com.cloud.network.rules.FirewallRule;
|
||||||
import com.cloud.network.rules.FirewallRule.State;
|
import com.cloud.network.rules.FirewallRule.State;
|
||||||
import com.cloud.utils.net.NetUtils;
|
import com.cloud.utils.net.NetUtils;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FirewallRuleTO transfers a port range for an ip to be opened.
|
* FirewallRuleTO transfers a port range for an ip to be opened.
|
||||||
@ -37,7 +38,7 @@ import com.cloud.utils.net.NetUtils;
|
|||||||
* - protocol: protocol to open for. Usually tcp and udp.
|
* - protocol: protocol to open for. Usually tcp and udp.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class FirewallRuleTO {
|
public class FirewallRuleTO implements InternalIdentity {
|
||||||
long id;
|
long id;
|
||||||
String srcVlanTag;
|
String srcVlanTag;
|
||||||
String srcIp;
|
String srcIp;
|
||||||
@ -58,6 +59,7 @@ public class FirewallRuleTO {
|
|||||||
this(id,null,srcIp,protocol,srcPortStart,srcPortEnd,revoked,alreadyAdded,purpose,sourceCidr,icmpType,icmpCode);
|
this(id,null,srcIp,protocol,srcPortStart,srcPortEnd,revoked,alreadyAdded,purpose,sourceCidr,icmpType,icmpCode);
|
||||||
}
|
}
|
||||||
public FirewallRuleTO(long id,String srcVlanTag, String srcIp, String protocol, Integer srcPortStart, Integer srcPortEnd, boolean revoked, boolean alreadyAdded, FirewallRule.Purpose purpose, List<String> sourceCidr,Integer icmpType,Integer icmpCode) {
|
public FirewallRuleTO(long id,String srcVlanTag, String srcIp, String protocol, Integer srcPortStart, Integer srcPortEnd, boolean revoked, boolean alreadyAdded, FirewallRule.Purpose purpose, List<String> sourceCidr,Integer icmpType,Integer icmpCode) {
|
||||||
|
this.id = id;
|
||||||
this.srcVlanTag = srcVlanTag;
|
this.srcVlanTag = srcVlanTag;
|
||||||
this.srcIp = srcIp;
|
this.srcIp = srcIp;
|
||||||
this.protocol = protocol;
|
this.protocol = protocol;
|
||||||
|
|||||||
@ -17,30 +17,50 @@
|
|||||||
package com.cloud.agent.api.to;
|
package com.cloud.agent.api.to;
|
||||||
|
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.cloud.utils.Pair;
|
|
||||||
|
import com.cloud.network.as.AutoScalePolicy;
|
||||||
|
import com.cloud.network.as.AutoScaleVmGroup;
|
||||||
|
import com.cloud.network.as.AutoScaleVmProfile;
|
||||||
|
import com.cloud.network.as.Condition;
|
||||||
|
import com.cloud.network.as.Counter;
|
||||||
|
import com.cloud.network.lb.LoadBalancingRule.LbAutoScalePolicy;
|
||||||
|
import com.cloud.network.lb.LoadBalancingRule.LbAutoScaleVmGroup;
|
||||||
|
import com.cloud.network.lb.LoadBalancingRule.LbAutoScaleVmProfile;
|
||||||
|
import com.cloud.network.lb.LoadBalancingRule.LbCondition;
|
||||||
import com.cloud.network.lb.LoadBalancingRule.LbDestination;
|
import com.cloud.network.lb.LoadBalancingRule.LbDestination;
|
||||||
import com.cloud.network.lb.LoadBalancingRule.LbStickinessPolicy;
|
import com.cloud.network.lb.LoadBalancingRule.LbStickinessPolicy;
|
||||||
|
import com.cloud.utils.Pair;
|
||||||
|
|
||||||
|
|
||||||
public class LoadBalancerTO {
|
public class LoadBalancerTO {
|
||||||
|
String uuid;
|
||||||
String srcIp;
|
String srcIp;
|
||||||
int srcPort;
|
int srcPort;
|
||||||
String protocol;
|
String protocol;
|
||||||
String algorithm;
|
String algorithm;
|
||||||
boolean revoked;
|
boolean revoked;
|
||||||
boolean alreadyAdded;
|
boolean alreadyAdded;
|
||||||
|
boolean inline;
|
||||||
DestinationTO[] destinations;
|
DestinationTO[] destinations;
|
||||||
private StickinessPolicyTO[] stickinessPolicies;
|
private StickinessPolicyTO[] stickinessPolicies;
|
||||||
|
private AutoScaleVmGroupTO autoScaleVmGroupTO;
|
||||||
final static int MAX_STICKINESS_POLICIES = 1;
|
final static int MAX_STICKINESS_POLICIES = 1;
|
||||||
|
|
||||||
public LoadBalancerTO (String srcIp, int srcPort, String protocol, String algorithm, boolean revoked, boolean alreadyAdded, List<LbDestination> destinations) {
|
public LoadBalancerTO(String uuid, String srcIp, int srcPort, String protocol, String algorithm, boolean revoked, boolean alreadyAdded, boolean inline, List<LbDestination> destinations) {
|
||||||
|
if (destinations == null) { // for autoscaleconfig destinations will be null;
|
||||||
|
destinations = new ArrayList<LbDestination>();
|
||||||
|
}
|
||||||
|
this.uuid = uuid;
|
||||||
this.srcIp = srcIp;
|
this.srcIp = srcIp;
|
||||||
this.srcPort = srcPort;
|
this.srcPort = srcPort;
|
||||||
this.protocol = protocol;
|
this.protocol = protocol;
|
||||||
this.algorithm = algorithm;
|
this.algorithm = algorithm;
|
||||||
this.revoked = revoked;
|
this.revoked = revoked;
|
||||||
this.alreadyAdded = alreadyAdded;
|
this.alreadyAdded = alreadyAdded;
|
||||||
|
this.inline = inline;
|
||||||
this.destinations = new DestinationTO[destinations.size()];
|
this.destinations = new DestinationTO[destinations.size()];
|
||||||
this.stickinessPolicies = null;
|
this.stickinessPolicies = null;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@ -49,10 +69,10 @@ public class LoadBalancerTO {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LoadBalancerTO (String srcIp, int srcPort, String protocol, String algorithm, boolean revoked, boolean alreadyAdded, List<LbDestination> arg_destinations, List<LbStickinessPolicy> stickinessPolicies) {
|
public LoadBalancerTO(String id, String srcIp, int srcPort, String protocol, String algorithm, boolean revoked, boolean alreadyAdded, boolean inline, List<LbDestination> arg_destinations, List<LbStickinessPolicy> stickinessPolicies) {
|
||||||
this(srcIp, srcPort, protocol, algorithm, revoked, alreadyAdded, arg_destinations);
|
this(id, srcIp, srcPort, protocol, algorithm, revoked, alreadyAdded, inline, arg_destinations);
|
||||||
this.stickinessPolicies = null;
|
this.stickinessPolicies = null;
|
||||||
if (stickinessPolicies != null && stickinessPolicies.size()>0) {
|
if (stickinessPolicies != null && stickinessPolicies.size() > 0) {
|
||||||
this.stickinessPolicies = new StickinessPolicyTO[MAX_STICKINESS_POLICIES];
|
this.stickinessPolicies = new StickinessPolicyTO[MAX_STICKINESS_POLICIES];
|
||||||
int index = 0;
|
int index = 0;
|
||||||
for (LbStickinessPolicy stickinesspolicy : stickinessPolicies) {
|
for (LbStickinessPolicy stickinesspolicy : stickinessPolicies) {
|
||||||
@ -70,6 +90,10 @@ public class LoadBalancerTO {
|
|||||||
protected LoadBalancerTO() {
|
protected LoadBalancerTO() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUuid() {
|
||||||
|
return uuid;
|
||||||
|
}
|
||||||
|
|
||||||
public String getSrcIp() {
|
public String getSrcIp() {
|
||||||
return srcIp;
|
return srcIp;
|
||||||
}
|
}
|
||||||
@ -94,6 +118,10 @@ public class LoadBalancerTO {
|
|||||||
return alreadyAdded;
|
return alreadyAdded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isInline() {
|
||||||
|
return inline;
|
||||||
|
}
|
||||||
|
|
||||||
public StickinessPolicyTO[] getStickinessPolicies() {
|
public StickinessPolicyTO[] getStickinessPolicies() {
|
||||||
return stickinessPolicies;
|
return stickinessPolicies;
|
||||||
}
|
}
|
||||||
@ -102,6 +130,18 @@ public class LoadBalancerTO {
|
|||||||
return destinations;
|
return destinations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AutoScaleVmGroupTO getAutoScaleVmGroupTO() {
|
||||||
|
return autoScaleVmGroupTO;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAutoScaleVmGroupTO(AutoScaleVmGroupTO autoScaleVmGroupTO) {
|
||||||
|
this.autoScaleVmGroupTO = autoScaleVmGroupTO;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAutoScaleVmGroupTO() {
|
||||||
|
return this.autoScaleVmGroupTO != null;
|
||||||
|
}
|
||||||
|
|
||||||
public static class StickinessPolicyTO {
|
public static class StickinessPolicyTO {
|
||||||
private String _methodName;
|
private String _methodName;
|
||||||
private List<Pair<String, String>> _paramsList;
|
private List<Pair<String, String>> _paramsList;
|
||||||
@ -151,5 +191,268 @@ public class LoadBalancerTO {
|
|||||||
return alreadyAdded;
|
return alreadyAdded;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public static class CounterTO implements Serializable {
|
||||||
|
private final String name;
|
||||||
|
private final String source;
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
public CounterTO(String name, String source, String value) {
|
||||||
|
this.name = name;
|
||||||
|
this.source = source;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSource() {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ConditionTO implements Serializable {
|
||||||
|
private final long threshold;
|
||||||
|
private final String relationalOperator;
|
||||||
|
private final CounterTO counter;
|
||||||
|
|
||||||
|
public ConditionTO(long threshold, String relationalOperator, CounterTO counter)
|
||||||
|
{
|
||||||
|
this.threshold = threshold;
|
||||||
|
this.relationalOperator = relationalOperator;
|
||||||
|
this.counter = counter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getThreshold() {
|
||||||
|
return threshold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRelationalOperator() {
|
||||||
|
return relationalOperator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CounterTO getCounter() {
|
||||||
|
return counter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class AutoScalePolicyTO implements Serializable {
|
||||||
|
private final long id;
|
||||||
|
private final int duration;
|
||||||
|
private final int quietTime;
|
||||||
|
private String action;
|
||||||
|
boolean revoked;
|
||||||
|
private final List<ConditionTO> conditions;
|
||||||
|
|
||||||
|
public AutoScalePolicyTO(long id, int duration, int quietTime, String action, List<ConditionTO> conditions, boolean revoked) {
|
||||||
|
this.id = id;
|
||||||
|
this.duration = duration;
|
||||||
|
this.quietTime = quietTime;
|
||||||
|
this.conditions = conditions;
|
||||||
|
this.action = action;
|
||||||
|
this.revoked = revoked;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDuration() {
|
||||||
|
return duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getQuietTime() {
|
||||||
|
return quietTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAction() {
|
||||||
|
return action;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isRevoked() {
|
||||||
|
return revoked;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ConditionTO> getConditions() {
|
||||||
|
return conditions;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class AutoScaleVmProfileTO implements Serializable {
|
||||||
|
private final String zoneId;
|
||||||
|
private final String domainId;
|
||||||
|
private final String serviceOfferingId;
|
||||||
|
private final String templateId;
|
||||||
|
private final String otherDeployParams;
|
||||||
|
private final List<Pair<String, String>> counterParamList;
|
||||||
|
private final Integer destroyVmGraceperiod;
|
||||||
|
private final String cloudStackApiUrl;
|
||||||
|
private final String autoScaleUserApiKey;
|
||||||
|
private final String autoScaleUserSecretKey;
|
||||||
|
private final String vmName;
|
||||||
|
private final String networkId;
|
||||||
|
|
||||||
|
public AutoScaleVmProfileTO(String zoneId, String domainId, String cloudStackApiUrl, String autoScaleUserApiKey, String autoScaleUserSecretKey, String serviceOfferingId,
|
||||||
|
String templateId, String vmName, String networkId, String otherDeployParams, List<Pair<String, String>> counterParamList, Integer destroyVmGraceperiod) {
|
||||||
|
this.zoneId = zoneId;
|
||||||
|
this.domainId = domainId;
|
||||||
|
this.serviceOfferingId = serviceOfferingId;
|
||||||
|
this.templateId = templateId;
|
||||||
|
this.otherDeployParams = otherDeployParams;
|
||||||
|
this.counterParamList = counterParamList;
|
||||||
|
this.destroyVmGraceperiod = destroyVmGraceperiod;
|
||||||
|
this.cloudStackApiUrl = cloudStackApiUrl;
|
||||||
|
this.autoScaleUserApiKey = autoScaleUserApiKey;
|
||||||
|
this.autoScaleUserSecretKey = autoScaleUserSecretKey;
|
||||||
|
this.vmName = vmName;
|
||||||
|
this.networkId = networkId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getZoneId() {
|
||||||
|
return zoneId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDomainId() {
|
||||||
|
return domainId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getServiceOfferingId() {
|
||||||
|
return serviceOfferingId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTemplateId() {
|
||||||
|
return templateId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOtherDeployParams() {
|
||||||
|
return otherDeployParams;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Pair<String, String>> getCounterParamList() {
|
||||||
|
return counterParamList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDestroyVmGraceperiod() {
|
||||||
|
return destroyVmGraceperiod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCloudStackApiUrl() {
|
||||||
|
return cloudStackApiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAutoScaleUserApiKey() {
|
||||||
|
return autoScaleUserApiKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAutoScaleUserSecretKey() {
|
||||||
|
return autoScaleUserSecretKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVmName() {
|
||||||
|
return vmName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNetworkId() {
|
||||||
|
return networkId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class AutoScaleVmGroupTO implements Serializable {
|
||||||
|
private final String uuid;
|
||||||
|
private final int minMembers;
|
||||||
|
private final int maxMembers;
|
||||||
|
private final int memberPort;
|
||||||
|
private final int interval;
|
||||||
|
private final List<AutoScalePolicyTO> policies;
|
||||||
|
private final AutoScaleVmProfileTO profile;
|
||||||
|
private final String state;
|
||||||
|
private final String currentState;
|
||||||
|
|
||||||
|
AutoScaleVmGroupTO(String uuid, int minMembers, int maxMembers, int memberPort, int interval, List<AutoScalePolicyTO> policies, AutoScaleVmProfileTO profile, String state, String currentState)
|
||||||
|
{
|
||||||
|
this.uuid = uuid;
|
||||||
|
this.minMembers = minMembers;
|
||||||
|
this.maxMembers = maxMembers;
|
||||||
|
this.memberPort = memberPort;
|
||||||
|
this.interval = interval;
|
||||||
|
this.policies = policies;
|
||||||
|
this.profile = profile;
|
||||||
|
this.state = state;
|
||||||
|
this.currentState = currentState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUuid() {
|
||||||
|
return uuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMinMembers() {
|
||||||
|
return minMembers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMaxMembers() {
|
||||||
|
return maxMembers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMemberPort() {
|
||||||
|
return memberPort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getInterval() {
|
||||||
|
return interval;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<AutoScalePolicyTO> getPolicies() {
|
||||||
|
return policies;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AutoScaleVmProfileTO getProfile() {
|
||||||
|
return profile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getState() {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCurrentState() {
|
||||||
|
return currentState;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAutoScaleVmGroup(LbAutoScaleVmGroup lbAutoScaleVmGroup)
|
||||||
|
{
|
||||||
|
List<LbAutoScalePolicy> lbAutoScalePolicies = lbAutoScaleVmGroup.getPolicies();
|
||||||
|
List<AutoScalePolicyTO> autoScalePolicyTOs = new ArrayList<AutoScalePolicyTO>(lbAutoScalePolicies.size());
|
||||||
|
for (LbAutoScalePolicy lbAutoScalePolicy : lbAutoScalePolicies) {
|
||||||
|
List<LbCondition> lbConditions = lbAutoScalePolicy.getConditions();
|
||||||
|
List<ConditionTO> conditionTOs = new ArrayList<ConditionTO>(lbConditions.size());
|
||||||
|
for (LbCondition lbCondition : lbConditions) {
|
||||||
|
Counter counter = lbCondition.getCounter();
|
||||||
|
CounterTO counterTO = new CounterTO(counter.getName(), counter.getSource().toString(), "" + counter.getValue());
|
||||||
|
Condition condition = lbCondition.getCondition();
|
||||||
|
ConditionTO conditionTO = new ConditionTO(condition.getThreshold(), condition.getRelationalOperator().toString(), counterTO);
|
||||||
|
conditionTOs.add(conditionTO);
|
||||||
|
}
|
||||||
|
AutoScalePolicy autoScalePolicy = lbAutoScalePolicy.getPolicy();
|
||||||
|
autoScalePolicyTOs.add(new AutoScalePolicyTO(autoScalePolicy.getId(), autoScalePolicy.getDuration(),
|
||||||
|
autoScalePolicy.getQuietTime(), autoScalePolicy.getAction(),
|
||||||
|
conditionTOs, lbAutoScalePolicy.isRevoked()));
|
||||||
|
}
|
||||||
|
LbAutoScaleVmProfile lbAutoScaleVmProfile = lbAutoScaleVmGroup.getProfile();
|
||||||
|
AutoScaleVmProfile autoScaleVmProfile = lbAutoScaleVmProfile.getProfile();
|
||||||
|
|
||||||
|
AutoScaleVmProfileTO autoScaleVmProfileTO = new AutoScaleVmProfileTO(lbAutoScaleVmProfile.getZoneId(), lbAutoScaleVmProfile.getDomainId(),
|
||||||
|
lbAutoScaleVmProfile.getCsUrl(), lbAutoScaleVmProfile.getAutoScaleUserApiKey(), lbAutoScaleVmProfile.getAutoScaleUserSecretKey(),
|
||||||
|
lbAutoScaleVmProfile.getServiceOfferingId(), lbAutoScaleVmProfile.getTemplateId(), lbAutoScaleVmProfile.getVmName(),
|
||||||
|
lbAutoScaleVmProfile.getNetworkId(),autoScaleVmProfile.getOtherDeployParams(), autoScaleVmProfile.getCounterParams(),
|
||||||
|
autoScaleVmProfile.getDestroyVmGraceperiod());
|
||||||
|
|
||||||
|
AutoScaleVmGroup autoScaleVmGroup = lbAutoScaleVmGroup.getVmGroup();
|
||||||
|
autoScaleVmGroupTO = new AutoScaleVmGroupTO(autoScaleVmGroup.getUuid(), autoScaleVmGroup.getMinMembers(), autoScaleVmGroup.getMaxMembers(), autoScaleVmGroup.getMemberPort(),
|
||||||
|
autoScaleVmGroup.getInterval(), autoScalePolicyTOs, autoScaleVmProfileTO, autoScaleVmGroup.getState(), lbAutoScaleVmGroup.getCurrentState());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,9 +23,10 @@ import java.util.List;
|
|||||||
import com.cloud.network.rules.FirewallRule;
|
import com.cloud.network.rules.FirewallRule;
|
||||||
import com.cloud.network.rules.FirewallRule.TrafficType;
|
import com.cloud.network.rules.FirewallRule.TrafficType;
|
||||||
import com.cloud.utils.net.NetUtils;
|
import com.cloud.utils.net.NetUtils;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
|
||||||
public class NetworkACLTO {
|
public class NetworkACLTO implements InternalIdentity {
|
||||||
long id;
|
long id;
|
||||||
String vlanTag;
|
String vlanTag;
|
||||||
String protocol;
|
String protocol;
|
||||||
|
|||||||
@ -39,8 +39,8 @@ public class PortForwardingRuleTO extends FirewallRuleTO {
|
|||||||
this.dstPortRange = new int[] { rule.getDestinationPortStart(), rule.getDestinationPortEnd() };
|
this.dstPortRange = new int[] { rule.getDestinationPortStart(), rule.getDestinationPortEnd() };
|
||||||
}
|
}
|
||||||
|
|
||||||
protected PortForwardingRuleTO(long id, String srcIp, int srcPortStart, int srcPortEnd, String dstIp, int dstPortStart, int dstPortEnd, String protocol, boolean revoked, boolean brandNew) {
|
public PortForwardingRuleTO(long id, String srcIp, int srcPortStart, int srcPortEnd, String dstIp, int dstPortStart, int dstPortEnd, String protocol, boolean revoked, boolean alreadyAdded) {
|
||||||
super(id, srcIp,null, protocol, srcPortStart, srcPortEnd, revoked, brandNew, FirewallRule.Purpose.PortForwarding, null,0,0);
|
super(id, null, srcIp, protocol, srcPortStart, srcPortEnd, revoked, alreadyAdded, FirewallRule.Purpose.PortForwarding, null,0,0);
|
||||||
this.dstIp = dstIp;
|
this.dstIp = dstIp;
|
||||||
this.dstPortRange = new int[] { dstPortStart, dstPortEnd };
|
this.dstPortRange = new int[] { dstPortStart, dstPortEnd };
|
||||||
}
|
}
|
||||||
|
|||||||
252
api/src/com/cloud/agent/api/to/S3TO.java
Normal file
252
api/src/com/cloud/agent/api/to/S3TO.java
Normal file
@ -0,0 +1,252 @@
|
|||||||
|
// 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.to;
|
||||||
|
|
||||||
|
import com.cloud.utils.S3Utils;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public final class S3TO implements S3Utils.ClientOptions {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
private String uuid;
|
||||||
|
private String accessKey;
|
||||||
|
private String secretKey;
|
||||||
|
private String endPoint;
|
||||||
|
private String bucketName;
|
||||||
|
private Boolean httpsFlag;
|
||||||
|
private Integer connectionTimeout;
|
||||||
|
private Integer maxErrorRetry;
|
||||||
|
private Integer socketTimeout;
|
||||||
|
private Date created;
|
||||||
|
|
||||||
|
public S3TO() {
|
||||||
|
|
||||||
|
super();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public S3TO(final Long id, final String uuid, final String accessKey,
|
||||||
|
final String secretKey, final String endPoint,
|
||||||
|
final String bucketName, final Boolean httpsFlag,
|
||||||
|
final Integer connectionTimeout, final Integer maxErrorRetry,
|
||||||
|
final Integer socketTimeout, final Date created) {
|
||||||
|
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.id = id;
|
||||||
|
this.uuid = uuid;
|
||||||
|
this.accessKey = accessKey;
|
||||||
|
this.secretKey = secretKey;
|
||||||
|
this.endPoint = endPoint;
|
||||||
|
this.bucketName = bucketName;
|
||||||
|
this.httpsFlag = httpsFlag;
|
||||||
|
this.connectionTimeout = connectionTimeout;
|
||||||
|
this.maxErrorRetry = maxErrorRetry;
|
||||||
|
this.socketTimeout = socketTimeout;
|
||||||
|
this.created = created;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object thatObject) {
|
||||||
|
|
||||||
|
if (this == thatObject)
|
||||||
|
return true;
|
||||||
|
if (thatObject == null || getClass() != thatObject.getClass())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
final S3TO thatS3TO = (S3TO) thatObject;
|
||||||
|
|
||||||
|
if (httpsFlag != null ? !httpsFlag.equals(thatS3TO.httpsFlag)
|
||||||
|
: thatS3TO.httpsFlag != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (accessKey != null ? !accessKey.equals(thatS3TO.accessKey)
|
||||||
|
: thatS3TO.accessKey != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (connectionTimeout != null ? !connectionTimeout
|
||||||
|
.equals(thatS3TO.connectionTimeout)
|
||||||
|
: thatS3TO.connectionTimeout != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (endPoint != null ? !endPoint.equals(thatS3TO.endPoint)
|
||||||
|
: thatS3TO.endPoint != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (id != null ? !id.equals(thatS3TO.id) : thatS3TO.id != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (uuid != null ? !uuid.equals(thatS3TO.uuid) : thatS3TO.uuid != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (maxErrorRetry != null ? !maxErrorRetry
|
||||||
|
.equals(thatS3TO.maxErrorRetry)
|
||||||
|
: thatS3TO.maxErrorRetry != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (secretKey != null ? !secretKey.equals(thatS3TO.secretKey)
|
||||||
|
: thatS3TO.secretKey != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (socketTimeout != null ? !socketTimeout
|
||||||
|
.equals(thatS3TO.socketTimeout)
|
||||||
|
: thatS3TO.socketTimeout != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bucketName != null ? !bucketName.equals(thatS3TO.bucketName)
|
||||||
|
: thatS3TO.bucketName != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (created != null ? !created.equals(thatS3TO.created)
|
||||||
|
: thatS3TO.created != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
|
||||||
|
int result = id != null ? id.hashCode() : 0;
|
||||||
|
|
||||||
|
result = 31 * result + (accessKey != null ? accessKey.hashCode() : 0);
|
||||||
|
result = 31 * result + (secretKey != null ? secretKey.hashCode() : 0);
|
||||||
|
result = 31 * result + (endPoint != null ? endPoint.hashCode() : 0);
|
||||||
|
result = 31 * result + (bucketName != null ? bucketName.hashCode() : 0);
|
||||||
|
result = 31 * result + (httpsFlag ? 1 : 0);
|
||||||
|
result = 31
|
||||||
|
* result
|
||||||
|
+ (connectionTimeout != null ? connectionTimeout.hashCode() : 0);
|
||||||
|
result = 31 * result
|
||||||
|
+ (maxErrorRetry != null ? maxErrorRetry.hashCode() : 0);
|
||||||
|
result = 31 * result
|
||||||
|
+ (socketTimeout != null ? socketTimeout.hashCode() : 0);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(final Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUuid() {
|
||||||
|
return this.uuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUuid(final String uuid) {
|
||||||
|
this.uuid = uuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getAccessKey() {
|
||||||
|
return this.accessKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccessKey(final String accessKey) {
|
||||||
|
this.accessKey = accessKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSecretKey() {
|
||||||
|
return this.secretKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecretKey(final String secretKey) {
|
||||||
|
this.secretKey = secretKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getEndPoint() {
|
||||||
|
return this.endPoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndPoint(final String endPoint) {
|
||||||
|
this.endPoint = endPoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBucketName() {
|
||||||
|
return this.bucketName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBucketName(final String bucketName) {
|
||||||
|
this.bucketName = bucketName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean isHttps() {
|
||||||
|
return this.httpsFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHttps(final Boolean httpsFlag) {
|
||||||
|
this.httpsFlag = httpsFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getConnectionTimeout() {
|
||||||
|
return connectionTimeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConnectionTimeout(final Integer connectionTimeout) {
|
||||||
|
this.connectionTimeout = connectionTimeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getMaxErrorRetry() {
|
||||||
|
return maxErrorRetry;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaxErrorRetry(final Integer maxErrorRetry) {
|
||||||
|
this.maxErrorRetry = maxErrorRetry;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getSocketTimeout() {
|
||||||
|
return socketTimeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSocketTimeout(final Integer socketTimeout) {
|
||||||
|
this.socketTimeout = socketTimeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreated() {
|
||||||
|
return this.created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreated(final Date created) {
|
||||||
|
this.created = created;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -48,6 +48,11 @@ public class StaticNatRuleTO extends FirewallRuleTO{
|
|||||||
this.dstIp = dstIp;
|
this.dstIp = dstIp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public StaticNatRuleTO(long id,String srcVlanTag, String srcIp, Integer srcPortStart, Integer srcPortEnd, String dstIp, Integer dstPortStart, Integer dstPortEnd, String protocol, boolean revoked, boolean alreadyAdded) {
|
||||||
|
super(id, srcVlanTag, srcIp, protocol, srcPortStart, srcPortEnd, revoked, alreadyAdded, FirewallRule.Purpose.StaticNat, null,0,0);
|
||||||
|
this.dstIp = dstIp;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDstIp() {
|
public String getDstIp() {
|
||||||
return dstIp;
|
return dstIp;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,8 +18,9 @@ package com.cloud.agent.api.to;
|
|||||||
|
|
||||||
import com.cloud.storage.Storage.ImageFormat;
|
import com.cloud.storage.Storage.ImageFormat;
|
||||||
import com.cloud.template.VirtualMachineTemplate;
|
import com.cloud.template.VirtualMachineTemplate;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public class TemplateTO {
|
public class TemplateTO implements InternalIdentity {
|
||||||
private long id;
|
private long id;
|
||||||
private String uniqueName;
|
private String uniqueName;
|
||||||
private ImageFormat format;
|
private ImageFormat format;
|
||||||
|
|||||||
@ -19,8 +19,9 @@ package com.cloud.agent.api.to;
|
|||||||
import com.cloud.storage.Storage.StoragePoolType;
|
import com.cloud.storage.Storage.StoragePoolType;
|
||||||
import com.cloud.storage.StoragePool;
|
import com.cloud.storage.StoragePool;
|
||||||
import com.cloud.storage.Volume;
|
import com.cloud.storage.Volume;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public class VolumeTO {
|
public class VolumeTO implements InternalIdentity {
|
||||||
protected VolumeTO() {
|
protected VolumeTO() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -16,10 +16,12 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.alert;
|
package com.cloud.alert;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public interface Alert {
|
public interface Alert extends Identity, InternalIdentity {
|
||||||
long getId();
|
|
||||||
short getType();
|
short getType();
|
||||||
String getSubject();
|
String getSubject();
|
||||||
Long getPodId();
|
Long getPodId();
|
||||||
|
|||||||
@ -16,16 +16,14 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.api.commands;
|
package com.cloud.api.commands;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.api.*;
|
||||||
|
import org.apache.cloudstack.api.response.DomainResponse;
|
||||||
|
import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
|
||||||
|
import org.apache.cloudstack.api.response.ProjectResponse;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import com.cloud.api.ApiConstants;
|
import org.apache.cloudstack.api.APICommand;
|
||||||
import com.cloud.api.BaseAsyncCreateCmd;
|
import org.apache.cloudstack.api.response.NetworkResponse;
|
||||||
import com.cloud.api.BaseCmd;
|
|
||||||
import com.cloud.api.IdentityMapper;
|
|
||||||
import com.cloud.api.Implementation;
|
|
||||||
import com.cloud.api.Parameter;
|
|
||||||
import com.cloud.api.ServerApiException;
|
|
||||||
import com.cloud.api.response.NetworkResponse;
|
|
||||||
import com.cloud.event.EventTypes;
|
import com.cloud.event.EventTypes;
|
||||||
import com.cloud.exception.ConcurrentOperationException;
|
import com.cloud.exception.ConcurrentOperationException;
|
||||||
import com.cloud.exception.InsufficientCapacityException;
|
import com.cloud.exception.InsufficientCapacityException;
|
||||||
@ -33,7 +31,7 @@ import com.cloud.exception.ResourceAllocationException;
|
|||||||
import com.cloud.network.Network;
|
import com.cloud.network.Network;
|
||||||
import com.cloud.user.UserContext;
|
import com.cloud.user.UserContext;
|
||||||
|
|
||||||
@Implementation(description="Creates a private network", responseObject=NetworkResponse.class)
|
@APICommand(description="Creates a private network", responseObject=NetworkResponse.class)
|
||||||
public class CreatePrivateNetworkCmd extends BaseAsyncCreateCmd {
|
public class CreatePrivateNetworkCmd extends BaseAsyncCreateCmd {
|
||||||
public static final Logger s_logger = Logger.getLogger(CreatePrivateNetworkCmd.class.getName());
|
public static final Logger s_logger = Logger.getLogger(CreatePrivateNetworkCmd.class.getName());
|
||||||
|
|
||||||
@ -49,8 +47,8 @@ public class CreatePrivateNetworkCmd extends BaseAsyncCreateCmd {
|
|||||||
@Parameter(name=ApiConstants.DISPLAY_TEXT, type=CommandType.STRING, required=true, description="the display text of the network")
|
@Parameter(name=ApiConstants.DISPLAY_TEXT, type=CommandType.STRING, required=true, description="the display text of the network")
|
||||||
private String displayText;
|
private String displayText;
|
||||||
|
|
||||||
@IdentityMapper(entityTableName="physical_network")
|
@Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.UUID, entityType = PhysicalNetworkResponse.class,
|
||||||
@Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.LONG, required=true, description="the Physical Network ID the network belongs to")
|
required=true, description="the Physical Network ID the network belongs to")
|
||||||
private Long physicalNetworkId;
|
private Long physicalNetworkId;
|
||||||
|
|
||||||
@Parameter(name=ApiConstants.GATEWAY, type=CommandType.STRING, required=true, description="the gateway of the network")
|
@Parameter(name=ApiConstants.GATEWAY, type=CommandType.STRING, required=true, description="the gateway of the network")
|
||||||
@ -72,12 +70,12 @@ public class CreatePrivateNetworkCmd extends BaseAsyncCreateCmd {
|
|||||||
@Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="account who will own the network")
|
@Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="account who will own the network")
|
||||||
private String accountName;
|
private String accountName;
|
||||||
|
|
||||||
@IdentityMapper(entityTableName="projects")
|
@Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.UUID, entityType = ProjectResponse.class,
|
||||||
@Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.LONG, description="an optional project for the ssh key")
|
description="an optional project for the ssh key")
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
@IdentityMapper(entityTableName="domain")
|
@Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType = DomainResponse.class,
|
||||||
@Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="domain ID of the account owning a network")
|
description="domain ID of the account owning a network")
|
||||||
private Long domainId;
|
private Long domainId;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,127 +0,0 @@
|
|||||||
// 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.api.commands;
|
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
import com.cloud.api.ApiConstants;
|
|
||||||
import com.cloud.api.BaseAsyncCmd;
|
|
||||||
import com.cloud.api.BaseCmd;
|
|
||||||
import com.cloud.api.IdentityMapper;
|
|
||||||
import com.cloud.api.Implementation;
|
|
||||||
import com.cloud.api.Parameter;
|
|
||||||
import com.cloud.api.ServerApiException;
|
|
||||||
import com.cloud.api.response.StorageNetworkIpRangeResponse;
|
|
||||||
import com.cloud.dc.StorageNetworkIpRange;
|
|
||||||
import com.cloud.event.EventTypes;
|
|
||||||
import com.cloud.exception.ConcurrentOperationException;
|
|
||||||
import com.cloud.exception.InsufficientCapacityException;
|
|
||||||
import com.cloud.exception.ResourceAllocationException;
|
|
||||||
import com.cloud.exception.ResourceUnavailableException;
|
|
||||||
import com.cloud.user.Account;
|
|
||||||
|
|
||||||
@Implementation(description="Creates a Storage network IP range.", responseObject=StorageNetworkIpRangeResponse.class, since="3.0.0")
|
|
||||||
public class CreateStorageNetworkIpRangeCmd extends BaseAsyncCmd {
|
|
||||||
public static final Logger s_logger = Logger.getLogger(CreateStorageNetworkIpRangeCmd.class);
|
|
||||||
|
|
||||||
private static final String s_name = "createstoragenetworkiprangeresponse";
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
|
||||||
//////////////// API parameters /////////////////////
|
|
||||||
/////////////////////////////////////////////////////
|
|
||||||
@IdentityMapper(entityTableName="host_pod_ref")
|
|
||||||
@Parameter(name=ApiConstants.POD_ID, type=CommandType.LONG, required=true, description="UUID of pod where the ip range belongs to")
|
|
||||||
private Long podId;
|
|
||||||
|
|
||||||
@Parameter(name=ApiConstants.START_IP, type=CommandType.STRING, required=true, description="the beginning IP address")
|
|
||||||
private String startIp;
|
|
||||||
|
|
||||||
@Parameter(name=ApiConstants.END_IP, type=CommandType.STRING, description="the ending IP address")
|
|
||||||
private String endIp;
|
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.VLAN, type = CommandType.INTEGER, description = "Optional. The vlan the ip range sits on, default to Null when it is not specificed which means you network is not on any Vlan. This is mainly for Vmware as other hypervisors can directly reterive bridge from pyhsical network traffic type table")
|
|
||||||
private Integer vlan;
|
|
||||||
|
|
||||||
@Parameter(name=ApiConstants.NETMASK, type=CommandType.STRING, required=true, description="the netmask for storage network")
|
|
||||||
private String netmask;
|
|
||||||
|
|
||||||
@Parameter(name=ApiConstants.GATEWAY, type=CommandType.STRING, required=true, description="the gateway for storage network")
|
|
||||||
private String gateway;
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
|
||||||
/////////////////// Accessors ///////////////////////
|
|
||||||
/////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public String getEndIp() {
|
|
||||||
return endIp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getPodId() {
|
|
||||||
return podId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStartIp() {
|
|
||||||
return startIp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getVlan() {
|
|
||||||
return vlan;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNetmask() {
|
|
||||||
return netmask;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGateWay() {
|
|
||||||
return gateway;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getEventType() {
|
|
||||||
return EventTypes.EVENT_STORAGE_IP_RANGE_CREATE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getEventDescription() {
|
|
||||||
return "Creating storage ip range from " + getStartIp() + " to " + getEndIp() + " with vlan " + getVlan();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
|
|
||||||
ResourceAllocationException {
|
|
||||||
try {
|
|
||||||
StorageNetworkIpRange result = _storageNetworkService.createIpRange(this);
|
|
||||||
StorageNetworkIpRangeResponse response = _responseGenerator.createStorageNetworkIpRangeResponse(result);
|
|
||||||
response.setResponseName(getCommandName());
|
|
||||||
this.setResponseObject(response);
|
|
||||||
} catch (Exception e) {
|
|
||||||
s_logger.warn("Create storage network IP range failed", e);
|
|
||||||
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getCommandName() {
|
|
||||||
return s_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public long getEntityOwnerId() {
|
|
||||||
return Account.ACCOUNT_ID_SYSTEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -16,20 +16,16 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.api.commands;
|
package com.cloud.api.commands;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.api.*;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import com.cloud.api.ApiConstants;
|
import org.apache.cloudstack.api.APICommand;
|
||||||
import com.cloud.api.BaseAsyncCmd;
|
import org.apache.cloudstack.api.response.SuccessResponse;
|
||||||
import com.cloud.api.BaseCmd;
|
|
||||||
import com.cloud.api.Implementation;
|
|
||||||
import com.cloud.api.Parameter;
|
|
||||||
import com.cloud.api.ServerApiException;
|
|
||||||
import com.cloud.api.response.SuccessResponse;
|
|
||||||
import com.cloud.event.EventTypes;
|
import com.cloud.event.EventTypes;
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
import com.cloud.user.UserContext;
|
import com.cloud.user.UserContext;
|
||||||
|
|
||||||
@Implementation(description="Destroys console proxy", responseObject=SuccessResponse.class)
|
@APICommand(description="Destroys console proxy", responseObject=SuccessResponse.class)
|
||||||
public class DestroyConsoleProxyCmd extends BaseAsyncCmd {
|
public class DestroyConsoleProxyCmd extends BaseAsyncCmd {
|
||||||
public static final Logger s_logger = Logger.getLogger(DestroyConsoleProxyCmd.class.getName());
|
public static final Logger s_logger = Logger.getLogger(DestroyConsoleProxyCmd.class.getName());
|
||||||
|
|
||||||
|
|||||||
@ -19,15 +19,15 @@ package com.cloud.api.commands;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.cloud.api.ApiConstants;
|
import org.apache.cloudstack.api.APICommand;
|
||||||
import com.cloud.api.BaseListCmd;
|
import org.apache.cloudstack.api.ApiConstants;
|
||||||
import com.cloud.api.Implementation;
|
import org.apache.cloudstack.api.BaseListCmd;
|
||||||
import com.cloud.api.Parameter;
|
import org.apache.cloudstack.api.Parameter;
|
||||||
import com.cloud.api.response.ListResponse;
|
import org.apache.cloudstack.api.response.ListResponse;
|
||||||
import com.cloud.api.response.SnapshotScheduleResponse;
|
import org.apache.cloudstack.api.response.SnapshotScheduleResponse;
|
||||||
import com.cloud.storage.snapshot.SnapshotSchedule;
|
import com.cloud.storage.snapshot.SnapshotSchedule;
|
||||||
|
|
||||||
@Implementation(description="Lists recurring snapshot schedule", responseObject=SnapshotScheduleResponse.class)
|
@APICommand(description="Lists recurring snapshot schedule", responseObject=SnapshotScheduleResponse.class)
|
||||||
public class ListRecurringSnapshotScheduleCmd extends BaseListCmd {
|
public class ListRecurringSnapshotScheduleCmd extends BaseListCmd {
|
||||||
private static final String s_name = "listrecurringsnapshotscheduleresponse";
|
private static final String s_name = "listrecurringsnapshotscheduleresponse";
|
||||||
|
|
||||||
@ -68,13 +68,7 @@ public class ListRecurringSnapshotScheduleCmd extends BaseListCmd {
|
|||||||
ListResponse<SnapshotScheduleResponse> response = new ListResponse<SnapshotScheduleResponse>();
|
ListResponse<SnapshotScheduleResponse> response = new ListResponse<SnapshotScheduleResponse>();
|
||||||
List<SnapshotScheduleResponse> snapshotScheduleResponses = new ArrayList<SnapshotScheduleResponse>();
|
List<SnapshotScheduleResponse> snapshotScheduleResponses = new ArrayList<SnapshotScheduleResponse>();
|
||||||
for (SnapshotSchedule snapshotSchedule : snapshotSchedules) {
|
for (SnapshotSchedule snapshotSchedule : snapshotSchedules) {
|
||||||
SnapshotScheduleResponse snapSchedResponse = new SnapshotScheduleResponse();
|
SnapshotScheduleResponse snapSchedResponse = _responseGenerator.createSnapshotScheduleResponse(snapshotSchedule);
|
||||||
snapSchedResponse.setId(snapshotSchedule.getId());
|
|
||||||
snapSchedResponse.setVolumeId(snapshotSchedule.getVolumeId());
|
|
||||||
snapSchedResponse.setSnapshotPolicyId(snapshotSchedule.getPolicyId());
|
|
||||||
snapSchedResponse.setScheduled(snapshotSchedule.getScheduledTimestamp());
|
|
||||||
|
|
||||||
snapSchedResponse.setObjectName("snapshot");
|
|
||||||
snapshotScheduleResponses.add(snapSchedResponse);
|
snapshotScheduleResponses.add(snapSchedResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,90 +0,0 @@
|
|||||||
// 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.api.commands;
|
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
import com.cloud.api.ApiConstants;
|
|
||||||
import com.cloud.api.BaseAsyncCmd;
|
|
||||||
import com.cloud.api.BaseCmd;
|
|
||||||
import com.cloud.api.IdentityMapper;
|
|
||||||
import com.cloud.api.Implementation;
|
|
||||||
import com.cloud.api.Parameter;
|
|
||||||
import com.cloud.api.ServerApiException;
|
|
||||||
import com.cloud.api.response.UserVmResponse;
|
|
||||||
import com.cloud.event.EventTypes;
|
|
||||||
import com.cloud.exception.ConcurrentOperationException;
|
|
||||||
import com.cloud.exception.InsufficientCapacityException;
|
|
||||||
import com.cloud.exception.ResourceAllocationException;
|
|
||||||
import com.cloud.exception.ResourceUnavailableException;
|
|
||||||
import com.cloud.user.Account;
|
|
||||||
import com.cloud.user.UserContext;
|
|
||||||
import com.cloud.uservm.UserVm;
|
|
||||||
|
|
||||||
@Implementation(description="Restore a VM to original template or specific snapshot", responseObject=UserVmResponse.class, since="3.0.0")
|
|
||||||
public class RestoreVMCmd extends BaseAsyncCmd {
|
|
||||||
public static final Logger s_logger = Logger.getLogger(RestoreVMCmd.class);
|
|
||||||
private static final String s_name = "restorevmresponse";
|
|
||||||
|
|
||||||
@IdentityMapper(entityTableName="vm_instance")
|
|
||||||
@Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.LONG, required=true, description="Virtual Machine ID")
|
|
||||||
private Long vmId;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getEventType() {
|
|
||||||
return EventTypes.EVENT_VM_RESTORE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getEventDescription() {
|
|
||||||
return "Restore a VM to orignal template or specific snapshot";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
|
|
||||||
ResourceAllocationException {
|
|
||||||
UserVm result;
|
|
||||||
UserContext.current().setEventDetails("Vm Id: " + getVmId());
|
|
||||||
result = _userVmService.restoreVM(this);
|
|
||||||
if (result != null) {
|
|
||||||
UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", result).get(0);
|
|
||||||
response.setResponseName(getCommandName());
|
|
||||||
this.setResponseObject(response);
|
|
||||||
} else {
|
|
||||||
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to restore vm " + getVmId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getCommandName() {
|
|
||||||
return s_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public long getEntityOwnerId() {
|
|
||||||
UserVm vm = _responseGenerator.findUserVmById(getVmId());
|
|
||||||
if (vm == null) {
|
|
||||||
return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked
|
|
||||||
}
|
|
||||||
return vm.getAccountId();
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getVmId() {
|
|
||||||
return vmId;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,108 +0,0 @@
|
|||||||
// 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.api.commands;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
import com.cloud.api.ApiConstants;
|
|
||||||
import com.cloud.api.BaseCmd;
|
|
||||||
import com.cloud.api.BaseListCmd;
|
|
||||||
import com.cloud.api.IdentityMapper;
|
|
||||||
import com.cloud.api.Implementation;
|
|
||||||
import com.cloud.api.Parameter;
|
|
||||||
import com.cloud.api.ServerApiException;
|
|
||||||
import com.cloud.api.response.ListResponse;
|
|
||||||
import com.cloud.api.response.StorageNetworkIpRangeResponse;
|
|
||||||
import com.cloud.dc.StorageNetworkIpRange;
|
|
||||||
import com.cloud.exception.ConcurrentOperationException;
|
|
||||||
import com.cloud.exception.InsufficientCapacityException;
|
|
||||||
import com.cloud.exception.ResourceAllocationException;
|
|
||||||
import com.cloud.exception.ResourceUnavailableException;
|
|
||||||
import com.cloud.user.Account;
|
|
||||||
|
|
||||||
@Implementation(description="List a storage network IP range.", responseObject=StorageNetworkIpRangeResponse.class, since="3.0.0")
|
|
||||||
public class listStorageNetworkIpRangeCmd extends BaseListCmd {
|
|
||||||
public static final Logger s_logger = Logger.getLogger(listStorageNetworkIpRangeCmd.class);
|
|
||||||
|
|
||||||
String s_name = "liststoragenetworkiprangeresponse";
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
|
||||||
//////////////// API parameters /////////////////////
|
|
||||||
/////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
@IdentityMapper(entityTableName="dc_storage_network_ip_range")
|
|
||||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="optional parameter. Storaget network IP range uuid, if specicied, using it to search the range.")
|
|
||||||
private Long rangeId;
|
|
||||||
|
|
||||||
@IdentityMapper(entityTableName="host_pod_ref")
|
|
||||||
@Parameter(name=ApiConstants.POD_ID, type=CommandType.LONG, description="optional parameter. Pod uuid, if specicied and range uuid is absent, using it to search the range.")
|
|
||||||
private Long podId;
|
|
||||||
|
|
||||||
@IdentityMapper(entityTableName="data_center")
|
|
||||||
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="optional parameter. Zone uuid, if specicied and both pod uuid and range uuid are absent, using it to search the range.")
|
|
||||||
private Long zoneId;
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
|
||||||
/////////////////// Accessors ///////////////////////
|
|
||||||
/////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public Long getRangeId() {
|
|
||||||
return rangeId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getPodId() {
|
|
||||||
return podId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getZoneId() {
|
|
||||||
return zoneId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
|
|
||||||
ResourceAllocationException {
|
|
||||||
try {
|
|
||||||
List<StorageNetworkIpRange> results = _storageNetworkService.listIpRange(this);
|
|
||||||
ListResponse<StorageNetworkIpRangeResponse> response = new ListResponse<StorageNetworkIpRangeResponse>();
|
|
||||||
List<StorageNetworkIpRangeResponse> resList = new ArrayList<StorageNetworkIpRangeResponse>(results.size());
|
|
||||||
for (StorageNetworkIpRange r : results) {
|
|
||||||
StorageNetworkIpRangeResponse resp = _responseGenerator.createStorageNetworkIpRangeResponse(r);
|
|
||||||
resList.add(resp);
|
|
||||||
}
|
|
||||||
response.setResponses(resList);
|
|
||||||
response.setResponseName(getCommandName());
|
|
||||||
this.setResponseObject(response);
|
|
||||||
} catch (Exception e) {
|
|
||||||
s_logger.warn("Failed to list storage network ip range for rangeId=" + getRangeId() + " podId=" + getPodId() + " zoneId=" + getZoneId());
|
|
||||||
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getCommandName() {
|
|
||||||
return s_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public long getEntityOwnerId() {
|
|
||||||
return Account.ACCOUNT_ID_SYSTEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,148 +0,0 @@
|
|||||||
// 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.api.response;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import com.cloud.api.ApiConstants;
|
|
||||||
import com.cloud.api.ResponseObject;
|
|
||||||
import com.cloud.async.AsyncJob;
|
|
||||||
import com.cloud.serializer.Param;
|
|
||||||
import com.cloud.utils.IdentityProxy;
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
public class AsyncJobResponse extends BaseResponse {
|
|
||||||
|
|
||||||
@SerializedName("accountid") @Param(description="the account that executed the async command")
|
|
||||||
private IdentityProxy accountId = new IdentityProxy("account");
|
|
||||||
|
|
||||||
@SerializedName(ApiConstants.USER_ID) @Param(description="the user that executed the async command")
|
|
||||||
private IdentityProxy userId = new IdentityProxy("user");
|
|
||||||
|
|
||||||
@SerializedName("cmd") @Param(description="the async command executed")
|
|
||||||
private String cmd;
|
|
||||||
|
|
||||||
@SerializedName("jobstatus") @Param(description="the current job status-should be 0 for PENDING")
|
|
||||||
private Integer jobStatus;
|
|
||||||
|
|
||||||
@SerializedName("jobprocstatus") @Param(description="the progress information of the PENDING job")
|
|
||||||
private Integer jobProcStatus;
|
|
||||||
|
|
||||||
@SerializedName("jobresultcode") @Param(description="the result code for the job")
|
|
||||||
private Integer jobResultCode;
|
|
||||||
|
|
||||||
@SerializedName("jobresulttype") @Param(description="the result type")
|
|
||||||
private String jobResultType;
|
|
||||||
|
|
||||||
@SerializedName("jobresult") @Param(description="the result reason")
|
|
||||||
private ResponseObject jobResult;
|
|
||||||
|
|
||||||
@SerializedName("jobinstancetype") @Param(description="the instance/entity object related to the job")
|
|
||||||
private String jobInstanceType;
|
|
||||||
|
|
||||||
@SerializedName("jobinstanceid") @Param(description="the unique ID of the instance/entity object related to the job")
|
|
||||||
private IdentityProxy jobInstanceId = new IdentityProxy();
|
|
||||||
|
|
||||||
@SerializedName(ApiConstants.CREATED) @Param(description=" the created date of the job")
|
|
||||||
private Date created;
|
|
||||||
|
|
||||||
public void setAccountId(Long accountId) {
|
|
||||||
this.accountId.setValue(accountId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserId(Long userId) {
|
|
||||||
this.userId.setValue(userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCmd(String cmd) {
|
|
||||||
this.cmd = cmd;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJobStatus(Integer jobStatus) {
|
|
||||||
this.jobStatus = jobStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJobProcStatus(Integer jobProcStatus) {
|
|
||||||
this.jobProcStatus = jobProcStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJobResultCode(Integer jobResultCode) {
|
|
||||||
this.jobResultCode = jobResultCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJobResultType(String jobResultType) {
|
|
||||||
this.jobResultType = jobResultType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJobResult(ResponseObject jobResult) {
|
|
||||||
this.jobResult = jobResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJobInstanceType(String jobInstanceType) {
|
|
||||||
this.jobInstanceType = jobInstanceType;
|
|
||||||
|
|
||||||
if(jobInstanceType != null) {
|
|
||||||
if(jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Volume.toString())) {
|
|
||||||
this.jobInstanceId.setTableName("volumes");
|
|
||||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Template.toString())) {
|
|
||||||
this.jobInstanceId.setTableName("vm_template");
|
|
||||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Iso.toString())) {
|
|
||||||
this.jobInstanceId.setTableName("vm_template");
|
|
||||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.VirtualMachine.toString()) || jobInstanceType.equalsIgnoreCase(AsyncJob.Type.ConsoleProxy.toString()) || jobInstanceType.equalsIgnoreCase(AsyncJob.Type.SystemVm.toString()) || jobInstanceType.equalsIgnoreCase(AsyncJob.Type.DomainRouter.toString()) ) {
|
|
||||||
this.jobInstanceId.setTableName("vm_instance");
|
|
||||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Snapshot.toString())) {
|
|
||||||
this.jobInstanceId.setTableName("snapshots");
|
|
||||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Host.toString())) {
|
|
||||||
this.jobInstanceId.setTableName("host");
|
|
||||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.StoragePool.toString())) {
|
|
||||||
this.jobInstanceId.setTableName("storage_pool");
|
|
||||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.IpAddress.toString())) {
|
|
||||||
this.jobInstanceId.setTableName("user_ip_address");
|
|
||||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.SecurityGroup.toString())) {
|
|
||||||
this.jobInstanceId.setTableName("security_group");
|
|
||||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.PhysicalNetwork.toString())) {
|
|
||||||
this.jobInstanceId.setTableName("physical_network");
|
|
||||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.TrafficType.toString())) {
|
|
||||||
this.jobInstanceId.setTableName("physical_network_traffic_types");
|
|
||||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.PhysicalNetworkServiceProvider.toString())) {
|
|
||||||
this.jobInstanceId.setTableName("physical_network_service_providers");
|
|
||||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.FirewallRule.toString())) {
|
|
||||||
this.jobInstanceId.setTableName("firewall_rules");
|
|
||||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.Account.toString())) {
|
|
||||||
this.jobInstanceId.setTableName("account");
|
|
||||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.User.toString())) {
|
|
||||||
this.jobInstanceId.setTableName("user");
|
|
||||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.StaticRoute.toString())) {
|
|
||||||
this.jobInstanceId.setTableName("static_routes");
|
|
||||||
} else if (jobInstanceType.equalsIgnoreCase(AsyncJob.Type.PrivateGateway.toString())) {
|
|
||||||
this.jobInstanceId.setTableName("vpc_gateways");
|
|
||||||
} else if (!jobInstanceType.equalsIgnoreCase(AsyncJob.Type.None.toString())){
|
|
||||||
// TODO : when we hit here, we need to add instanceType -> UUID entity table mapping
|
|
||||||
assert(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJobInstanceId(Long jobInstanceId) {
|
|
||||||
this.jobInstanceId.setValue(jobInstanceId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreated(Date created) {
|
|
||||||
this.created = created;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -18,9 +18,10 @@ package com.cloud.async;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.cloud.api.Identity;
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface AsyncJob extends Identity {
|
public interface AsyncJob extends Identity, InternalIdentity {
|
||||||
public enum Type {
|
public enum Type {
|
||||||
None,
|
None,
|
||||||
VirtualMachine,
|
VirtualMachine,
|
||||||
@ -42,11 +43,14 @@ public interface AsyncJob extends Identity {
|
|||||||
Account,
|
Account,
|
||||||
User,
|
User,
|
||||||
PrivateGateway,
|
PrivateGateway,
|
||||||
StaticRoute
|
StaticRoute,
|
||||||
|
Counter,
|
||||||
|
Condition,
|
||||||
|
AutoScalePolicy,
|
||||||
|
AutoScaleVmProfile,
|
||||||
|
AutoScaleVmGroup
|
||||||
}
|
}
|
||||||
|
|
||||||
Long getId();
|
|
||||||
|
|
||||||
long getUserId();
|
long getUserId();
|
||||||
|
|
||||||
long getAccountId();
|
long getAccountId();
|
||||||
|
|||||||
@ -16,7 +16,9 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.async;
|
package com.cloud.async;
|
||||||
|
|
||||||
|
|
||||||
public interface SyncQueueItem {
|
public interface SyncQueueItem {
|
||||||
|
public final String AsyncJobContentType = "AsyncJob";
|
||||||
|
|
||||||
String getContentType();
|
String getContentType();
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,10 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.capacity;
|
package com.cloud.capacity;
|
||||||
|
|
||||||
public interface Capacity {
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
public interface Capacity extends InternalIdentity, Identity {
|
||||||
public static final short CAPACITY_TYPE_MEMORY = 0;
|
public static final short CAPACITY_TYPE_MEMORY = 0;
|
||||||
public static final short CAPACITY_TYPE_CPU = 1;
|
public static final short CAPACITY_TYPE_CPU = 1;
|
||||||
public static final short CAPACITY_TYPE_STORAGE = 2;
|
public static final short CAPACITY_TYPE_STORAGE = 2;
|
||||||
@ -28,8 +31,6 @@ public interface Capacity {
|
|||||||
public static final short CAPACITY_TYPE_DIRECT_ATTACHED_PUBLIC_IP = 8;
|
public static final short CAPACITY_TYPE_DIRECT_ATTACHED_PUBLIC_IP = 8;
|
||||||
public static final short CAPACITY_TYPE_LOCAL_STORAGE = 9;
|
public static final short CAPACITY_TYPE_LOCAL_STORAGE = 9;
|
||||||
|
|
||||||
public long getId();
|
|
||||||
|
|
||||||
public Long getHostOrPoolId();
|
public Long getHostOrPoolId();
|
||||||
|
|
||||||
public Long getDataCenterId();
|
public Long getDataCenterId();
|
||||||
@ -47,6 +48,4 @@ public interface Capacity {
|
|||||||
public long getReservedCapacity();
|
public long getReservedCapacity();
|
||||||
|
|
||||||
public Float getUsedPercentage();
|
public Float getUsedPercentage();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,9 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.cluster;
|
package com.cloud.cluster;
|
||||||
|
|
||||||
public interface ManagementServerHost {
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
public interface ManagementServerHost extends InternalIdentity {
|
||||||
|
|
||||||
public static enum State {
|
public static enum State {
|
||||||
Up, Starting, Down
|
Up, Starting, Down
|
||||||
|
|||||||
@ -20,26 +20,24 @@ import java.util.List;
|
|||||||
|
|
||||||
import javax.naming.NamingException;
|
import javax.naming.NamingException;
|
||||||
|
|
||||||
import com.cloud.api.commands.CreateDiskOfferingCmd;
|
import org.apache.cloudstack.api.command.admin.ldap.LDAPRemoveCmd;
|
||||||
import com.cloud.api.commands.CreateNetworkOfferingCmd;
|
import org.apache.cloudstack.api.command.admin.network.CreateNetworkOfferingCmd;
|
||||||
import com.cloud.api.commands.CreateServiceOfferingCmd;
|
import org.apache.cloudstack.api.command.admin.offering.CreateServiceOfferingCmd;
|
||||||
import com.cloud.api.commands.CreateVlanIpRangeCmd;
|
import org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd;
|
||||||
import com.cloud.api.commands.CreateZoneCmd;
|
import org.apache.cloudstack.api.command.admin.offering.*;
|
||||||
import com.cloud.api.commands.DeleteDiskOfferingCmd;
|
import org.apache.cloudstack.api.command.admin.pod.DeletePodCmd;
|
||||||
import com.cloud.api.commands.DeleteNetworkOfferingCmd;
|
import org.apache.cloudstack.api.command.admin.vlan.DeleteVlanIpRangeCmd;
|
||||||
import com.cloud.api.commands.DeletePodCmd;
|
import org.apache.cloudstack.api.command.admin.zone.CreateZoneCmd;
|
||||||
import com.cloud.api.commands.DeleteServiceOfferingCmd;
|
import org.apache.cloudstack.api.command.admin.offering.DeleteDiskOfferingCmd;
|
||||||
import com.cloud.api.commands.DeleteVlanIpRangeCmd;
|
import org.apache.cloudstack.api.command.admin.network.DeleteNetworkOfferingCmd;
|
||||||
import com.cloud.api.commands.DeleteZoneCmd;
|
import org.apache.cloudstack.api.command.admin.zone.DeleteZoneCmd;
|
||||||
import com.cloud.api.commands.LDAPConfigCmd;
|
import org.apache.cloudstack.api.command.admin.ldap.LDAPConfigCmd;
|
||||||
import com.cloud.api.commands.LDAPRemoveCmd;
|
import org.apache.cloudstack.api.command.admin.config.UpdateCfgCmd;
|
||||||
import com.cloud.api.commands.ListNetworkOfferingsCmd;
|
import org.apache.cloudstack.api.command.admin.network.UpdateNetworkOfferingCmd;
|
||||||
import com.cloud.api.commands.UpdateCfgCmd;
|
import org.apache.cloudstack.api.command.admin.pod.UpdatePodCmd;
|
||||||
import com.cloud.api.commands.UpdateDiskOfferingCmd;
|
import org.apache.cloudstack.api.command.user.network.ListNetworkOfferingsCmd;
|
||||||
import com.cloud.api.commands.UpdateNetworkOfferingCmd;
|
import org.apache.cloudstack.api.command.admin.offering.UpdateDiskOfferingCmd;
|
||||||
import com.cloud.api.commands.UpdatePodCmd;
|
import org.apache.cloudstack.api.command.admin.zone.UpdateZoneCmd;
|
||||||
import com.cloud.api.commands.UpdateServiceOfferingCmd;
|
|
||||||
import com.cloud.api.commands.UpdateZoneCmd;
|
|
||||||
import com.cloud.dc.DataCenter;
|
import com.cloud.dc.DataCenter;
|
||||||
import com.cloud.dc.Pod;
|
import com.cloud.dc.Pod;
|
||||||
import com.cloud.dc.Vlan;
|
import com.cloud.dc.Vlan;
|
||||||
|
|||||||
@ -16,9 +16,9 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.configuration;
|
package com.cloud.configuration;
|
||||||
|
|
||||||
public interface ResourceCount extends Resource {
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public Long getId();
|
public interface ResourceCount extends Resource, InternalIdentity {
|
||||||
|
|
||||||
public long getCount();
|
public long getCount();
|
||||||
|
|
||||||
|
|||||||
@ -16,9 +16,9 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.configuration;
|
package com.cloud.configuration;
|
||||||
|
|
||||||
public interface ResourceLimit extends Resource {
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public Long getId();
|
public interface ResourceLimit extends Resource, InternalIdentity {
|
||||||
|
|
||||||
public Long getMax();
|
public Long getMax();
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,15 @@ public interface EntityManager {
|
|||||||
*/
|
*/
|
||||||
public <T, K extends Serializable> T findById(Class<T> entityType, K id);
|
public <T, K extends Serializable> T findById(Class<T> entityType, K id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds a unique entity by uuid string
|
||||||
|
* @param <T> entity class
|
||||||
|
* @param entityType type of entity you're looking for.
|
||||||
|
* @param uuid the unique id
|
||||||
|
* @return T if found, null if not.
|
||||||
|
*/
|
||||||
|
public <T> T findByUuid(Class<T> entityType, String uuid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds an entity by external id which is always String
|
* Finds an entity by external id which is always String
|
||||||
* @param <T> entity class
|
* @param <T> entity class
|
||||||
@ -45,7 +54,7 @@ public interface EntityManager {
|
|||||||
* @param xid external id
|
* @param xid external id
|
||||||
* @return T if found, null if not.
|
* @return T if found, null if not.
|
||||||
*/
|
*/
|
||||||
public <T> T findByXid(Class<T> entityType, String xid);
|
public <T> T findByXId(Class<T> entityType, String xid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lists all entities. Use this method at your own risk.
|
* Lists all entities. Use this method at your own risk.
|
||||||
|
|||||||
@ -19,18 +19,19 @@ package com.cloud.dc;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.cloud.org.Grouping;
|
import com.cloud.org.Grouping;
|
||||||
|
import org.apache.cloudstack.acl.InfrastructureEntity;
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface DataCenter extends Grouping {
|
public interface DataCenter extends InfrastructureEntity, Grouping, Identity, InternalIdentity {
|
||||||
public enum NetworkType {
|
public enum NetworkType {
|
||||||
Basic,
|
Basic,
|
||||||
Advanced,
|
Advanced,
|
||||||
}
|
}
|
||||||
|
|
||||||
long getId();
|
|
||||||
|
|
||||||
String getDns1();
|
String getDns1();
|
||||||
|
|
||||||
String getDns2();
|
String getDns2();
|
||||||
|
|||||||
@ -17,16 +17,15 @@
|
|||||||
package com.cloud.dc;
|
package com.cloud.dc;
|
||||||
|
|
||||||
import com.cloud.org.Grouping;
|
import com.cloud.org.Grouping;
|
||||||
|
import org.apache.cloudstack.acl.InfrastructureEntity;
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents one pod in the cloud stack.
|
* Represents one pod in the cloud stack.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface Pod extends Grouping {
|
public interface Pod extends InfrastructureEntity, Grouping, Identity, InternalIdentity {
|
||||||
/**
|
|
||||||
* @return unique id mapped to the pod.
|
|
||||||
*/
|
|
||||||
long getId();
|
|
||||||
|
|
||||||
String getCidrAddress();
|
String getCidrAddress();
|
||||||
|
|
||||||
@ -36,8 +35,6 @@ public interface Pod extends Grouping {
|
|||||||
|
|
||||||
long getDataCenterId();
|
long getDataCenterId();
|
||||||
|
|
||||||
// String getUniqueName();
|
|
||||||
|
|
||||||
String getDescription();
|
String getDescription();
|
||||||
|
|
||||||
String getName();
|
String getName();
|
||||||
|
|||||||
@ -16,8 +16,11 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.dc;
|
package com.cloud.dc;
|
||||||
|
|
||||||
public interface StorageNetworkIpRange {
|
import org.apache.cloudstack.acl.InfrastructureEntity;
|
||||||
String getUuid();
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
public interface StorageNetworkIpRange extends InfrastructureEntity, InternalIdentity, Identity {
|
||||||
|
|
||||||
Integer getVlan();
|
Integer getVlan();
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,11 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.dc;
|
package com.cloud.dc;
|
||||||
|
|
||||||
public interface Vlan {
|
import org.apache.cloudstack.acl.InfrastructureEntity;
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
public interface Vlan extends InfrastructureEntity, InternalIdentity, Identity {
|
||||||
public enum VlanType {
|
public enum VlanType {
|
||||||
DirectAttached,
|
DirectAttached,
|
||||||
VirtualNetwork
|
VirtualNetwork
|
||||||
@ -24,8 +28,6 @@ public interface Vlan {
|
|||||||
|
|
||||||
public final static String UNTAGGED = "untagged";
|
public final static String UNTAGGED = "untagged";
|
||||||
|
|
||||||
public long getId();
|
|
||||||
|
|
||||||
public String getVlanTag();
|
public String getVlanTag();
|
||||||
|
|
||||||
public String getVlanGateway();
|
public String getVlanGateway();
|
||||||
|
|||||||
@ -19,19 +19,20 @@ package com.cloud.domain;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.cloud.user.OwnedBy;
|
import com.cloud.user.OwnedBy;
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Domain defines the Domain object.
|
* Domain defines the Domain object.
|
||||||
*/
|
*/
|
||||||
public interface Domain extends OwnedBy {
|
|
||||||
|
public interface Domain extends OwnedBy, Identity, InternalIdentity {
|
||||||
public static final long ROOT_DOMAIN = 1L;
|
public static final long ROOT_DOMAIN = 1L;
|
||||||
|
|
||||||
enum State {
|
enum State {
|
||||||
Active, Inactive
|
Active, Inactive
|
||||||
};
|
};
|
||||||
|
|
||||||
long getId();
|
|
||||||
|
|
||||||
Long getParent();
|
Long getParent();
|
||||||
|
|
||||||
void setParent(Long parent);
|
void setParent(Long parent);
|
||||||
|
|||||||
@ -18,9 +18,11 @@ package com.cloud.event;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface Event extends ControlledEntity{
|
public interface Event extends ControlledEntity, Identity, InternalIdentity {
|
||||||
public enum State {
|
public enum State {
|
||||||
Created,
|
Created,
|
||||||
Scheduled,
|
Scheduled,
|
||||||
@ -28,16 +30,12 @@ public interface Event extends ControlledEntity{
|
|||||||
Completed;
|
Completed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
long getId();
|
|
||||||
String getType();
|
String getType();
|
||||||
State getState();
|
State getState();
|
||||||
|
|
||||||
String getDescription();
|
String getDescription();
|
||||||
Date getCreateDate();
|
Date getCreateDate();
|
||||||
long getUserId();
|
long getUserId();
|
||||||
long getAccountId();
|
|
||||||
long getDomainId();
|
|
||||||
int getTotalSize();
|
int getTotalSize();
|
||||||
String getLevel();
|
String getLevel();
|
||||||
long getStartId();
|
long getStartId();
|
||||||
|
|||||||
@ -291,4 +291,25 @@ public class EventTypes {
|
|||||||
public static final String EVENT_TAGS_CREATE = "CREATE_TAGS";
|
public static final String EVENT_TAGS_CREATE = "CREATE_TAGS";
|
||||||
public static final String EVENT_TAGS_DELETE = "DELETE_TAGS";
|
public static final String EVENT_TAGS_DELETE = "DELETE_TAGS";
|
||||||
|
|
||||||
|
// external network device events
|
||||||
|
public static final String EVENT_EXTERNAL_NVP_CONTROLLER_ADD = "PHYSICAL.NVPCONTROLLER.ADD";
|
||||||
|
public static final String EVENT_EXTERNAL_NVP_CONTROLLER_DELETE = "PHYSICAL.NVPCONTROLLER.DELETE";
|
||||||
|
public static final String EVENT_EXTERNAL_NVP_CONTROLLER_CONFIGURE = "PHYSICAL.NVPCONTROLLER.CONFIGURE";
|
||||||
|
|
||||||
|
// AutoScale
|
||||||
|
public static final String EVENT_COUNTER_CREATE = "COUNTER.CREATE";
|
||||||
|
public static final String EVENT_COUNTER_DELETE = "COUNTER.DELETE";
|
||||||
|
public static final String EVENT_CONDITION_CREATE = "CONDITION.CREATE";
|
||||||
|
public static final String EVENT_CONDITION_DELETE = "CONDITION.DELETE";
|
||||||
|
public static final String EVENT_AUTOSCALEPOLICY_CREATE = "AUTOSCALEPOLICY.CREATE";
|
||||||
|
public static final String EVENT_AUTOSCALEPOLICY_UPDATE = "AUTOSCALEPOLICY.UPDATE";
|
||||||
|
public static final String EVENT_AUTOSCALEPOLICY_DELETE = "AUTOSCALEPOLICY.DELETE";
|
||||||
|
public static final String EVENT_AUTOSCALEVMPROFILE_CREATE = "AUTOSCALEVMPROFILE.CREATE";
|
||||||
|
public static final String EVENT_AUTOSCALEVMPROFILE_DELETE = "AUTOSCALEVMPROFILE.DELETE";
|
||||||
|
public static final String EVENT_AUTOSCALEVMPROFILE_UPDATE = "AUTOSCALEVMPROFILE.UPDATE";
|
||||||
|
public static final String EVENT_AUTOSCALEVMGROUP_CREATE = "AUTOSCALEVMGROUP.CREATE";
|
||||||
|
public static final String EVENT_AUTOSCALEVMGROUP_DELETE = "AUTOSCALEVMGROUP.DELETE";
|
||||||
|
public static final String EVENT_AUTOSCALEVMGROUP_UPDATE = "AUTOSCALEVMGROUP.UPDATE";
|
||||||
|
public static final String EVENT_AUTOSCALEVMGROUP_ENABLE = "AUTOSCALEVMGROUP.ENABLE";
|
||||||
|
public static final String EVENT_AUTOSCALEVMGROUP_DISABLE = "AUTOSCALEVMGROUP.DISABLE";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,7 +30,7 @@ import com.cloud.utils.AnnotationHelper;
|
|||||||
public class CloudException extends Exception {
|
public class CloudException extends Exception {
|
||||||
|
|
||||||
// This holds a list of uuids and their names. Add uuid:fieldname pairs
|
// This holds a list of uuids and their names. Add uuid:fieldname pairs
|
||||||
protected ArrayList<IdentityProxy> idList = new ArrayList<IdentityProxy>();
|
protected ArrayList<String> idList = new ArrayList<String>();
|
||||||
|
|
||||||
protected Integer csErrorCode;
|
protected Integer csErrorCode;
|
||||||
|
|
||||||
@ -44,26 +44,19 @@ public class CloudException extends Exception {
|
|||||||
setCSErrorCode(CSExceptionErrorCode.getCSErrCode(this.getClass().getName()));
|
setCSErrorCode(CSExceptionErrorCode.getCSErrCode(this.getClass().getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addProxyObject(Object voObj, Long id, String idFieldName) {
|
|
||||||
// Get the VO object's table name.
|
|
||||||
String tablename = AnnotationHelper.getTableName(voObj);
|
|
||||||
if (tablename != null) {
|
|
||||||
addProxyObject(tablename, id, idFieldName);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CloudException() {
|
public CloudException() {
|
||||||
super();
|
super();
|
||||||
setCSErrorCode(CSExceptionErrorCode.getCSErrCode(this.getClass().getName()));
|
setCSErrorCode(CSExceptionErrorCode.getCSErrCode(this.getClass().getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addProxyObject(String tableName, Long id, String idFieldName) {
|
public void addProxyObject(String uuid) {
|
||||||
idList.add(new IdentityProxy(tableName, id, idFieldName));
|
idList.add(uuid);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<IdentityProxy> getIdProxyList() {
|
public ArrayList<String> getIdProxyList() {
|
||||||
return idList;
|
return idList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ package com.cloud.exception;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
import com.cloud.utils.SerialVersionUID;
|
import com.cloud.utils.SerialVersionUID;
|
||||||
import com.cloud.utils.exception.CloudRuntimeException;
|
import com.cloud.utils.exception.CloudRuntimeException;
|
||||||
|
|||||||
@ -21,12 +21,14 @@ import java.util.Date;
|
|||||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||||
import com.cloud.resource.ResourceState;
|
import com.cloud.resource.ResourceState;
|
||||||
import com.cloud.utils.fsm.StateObject;
|
import com.cloud.utils.fsm.StateObject;
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Host represents one particular host server.
|
* Host represents one particular host server.
|
||||||
*/
|
*/
|
||||||
public interface Host extends StateObject<Status> {
|
public interface Host extends StateObject<Status>, Identity, InternalIdentity {
|
||||||
public enum Type {
|
public enum Type {
|
||||||
Storage(false),
|
Storage(false),
|
||||||
Routing(false),
|
Routing(false),
|
||||||
@ -61,11 +63,6 @@ public interface Host extends StateObject<Status> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return id of the host.
|
|
||||||
*/
|
|
||||||
long getId();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return name of the machine.
|
* @return name of the machine.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -17,16 +17,14 @@
|
|||||||
package com.cloud.hypervisor;
|
package com.cloud.hypervisor;
|
||||||
|
|
||||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HypervisorCapability represents one particular hypervisor version's capabilities.
|
* HypervisorCapability represents one particular hypervisor version's capabilities.
|
||||||
*/
|
*/
|
||||||
public interface HypervisorCapabilities {
|
public interface HypervisorCapabilities extends Identity, InternalIdentity{
|
||||||
/**
|
|
||||||
* @return id of the host.
|
|
||||||
*/
|
|
||||||
long getId();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return type of hypervisor
|
* @return type of hypervisor
|
||||||
|
|||||||
@ -18,8 +18,10 @@ package com.cloud.network;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
import com.cloud.utils.net.Ip;
|
import com.cloud.utils.net.Ip;
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -32,7 +34,7 @@ import com.cloud.utils.net.Ip;
|
|||||||
* - DomainId = domain of the account owner.
|
* - DomainId = domain of the account owner.
|
||||||
* - Allocated = time it was allocated.
|
* - Allocated = time it was allocated.
|
||||||
*/
|
*/
|
||||||
public interface IpAddress extends ControlledEntity {
|
public interface IpAddress extends ControlledEntity, Identity, InternalIdentity {
|
||||||
enum State {
|
enum State {
|
||||||
Allocating, // The IP Address is being propagated to other network elements and is not ready for use yet.
|
Allocating, // The IP Address is being propagated to other network elements and is not ready for use yet.
|
||||||
Allocated, // The IP address is in used.
|
Allocated, // The IP address is in used.
|
||||||
@ -67,11 +69,6 @@ public interface IpAddress extends ControlledEntity {
|
|||||||
|
|
||||||
public Long getPhysicalNetworkId();
|
public Long getPhysicalNetworkId();
|
||||||
|
|
||||||
/**
|
|
||||||
* @return database id.
|
|
||||||
*/
|
|
||||||
long getId();
|
|
||||||
|
|
||||||
void setState(IpAddress.State state);
|
void setState(IpAddress.State state);
|
||||||
|
|
||||||
Long getAllocatedToAccountId();
|
Long getAllocatedToAccountId();
|
||||||
@ -89,5 +86,4 @@ public interface IpAddress extends ControlledEntity {
|
|||||||
* @param vpcId
|
* @param vpcId
|
||||||
*/
|
*/
|
||||||
void setVpcId(Long vpcId);
|
void setVpcId(Long vpcId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,22 +16,24 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.network;
|
package com.cloud.network;
|
||||||
|
|
||||||
import java.net.URI;
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
|
||||||
import com.cloud.network.Networks.BroadcastDomainType;
|
import com.cloud.network.Networks.BroadcastDomainType;
|
||||||
import com.cloud.network.Networks.Mode;
|
import com.cloud.network.Networks.Mode;
|
||||||
import com.cloud.network.Networks.TrafficType;
|
import com.cloud.network.Networks.TrafficType;
|
||||||
import com.cloud.utils.fsm.FiniteState;
|
import com.cloud.utils.fsm.FiniteState;
|
||||||
import com.cloud.utils.fsm.StateMachine;
|
import com.cloud.utils.fsm.StateMachine;
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* owned by an account.
|
* owned by an account.
|
||||||
*/
|
*/
|
||||||
public interface Network extends ControlledEntity {
|
public interface Network extends ControlledEntity, InternalIdentity, Identity {
|
||||||
|
|
||||||
public enum GuestType {
|
public enum GuestType {
|
||||||
Shared,
|
Shared,
|
||||||
@ -58,6 +60,7 @@ public interface Network extends ControlledEntity {
|
|||||||
public static final Service NetworkACL = new Service("NetworkACL", Capability.SupportedProtocols);
|
public static final Service NetworkACL = new Service("NetworkACL", Capability.SupportedProtocols);
|
||||||
public static final Service Connectivity = new Service("Connectivity");
|
public static final Service Connectivity = new Service("Connectivity");
|
||||||
|
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private Capability[] caps;
|
private Capability[] caps;
|
||||||
|
|
||||||
@ -167,7 +170,10 @@ public interface Network extends ControlledEntity {
|
|||||||
public static final Capability AllowDnsSuffixModification = new Capability("AllowDnsSuffixModification");
|
public static final Capability AllowDnsSuffixModification = new Capability("AllowDnsSuffixModification");
|
||||||
public static final Capability RedundantRouter = new Capability("RedundantRouter");
|
public static final Capability RedundantRouter = new Capability("RedundantRouter");
|
||||||
public static final Capability ElasticIp = new Capability("ElasticIp");
|
public static final Capability ElasticIp = new Capability("ElasticIp");
|
||||||
|
public static final Capability AssociatePublicIP = new Capability("AssociatePublicIP");
|
||||||
public static final Capability ElasticLb = new Capability("ElasticLb");
|
public static final Capability ElasticLb = new Capability("ElasticLb");
|
||||||
|
public static final Capability AutoScaleCounters = new Capability("AutoScaleCounters");
|
||||||
|
public static final Capability InlineMode = new Capability("InlineMode");
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@ -248,11 +254,6 @@ public interface Network extends ControlledEntity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return id of the network profile. Null means the network profile is not from the database.
|
|
||||||
*/
|
|
||||||
long getId();
|
|
||||||
|
|
||||||
String getName();
|
String getName();
|
||||||
|
|
||||||
Mode getMode();
|
Mode getMode();
|
||||||
@ -297,4 +298,5 @@ public interface Network extends ControlledEntity {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Long getVpcId();
|
Long getVpcId();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,9 +21,11 @@ import java.net.URI;
|
|||||||
import com.cloud.network.Networks.BroadcastDomainType;
|
import com.cloud.network.Networks.BroadcastDomainType;
|
||||||
import com.cloud.network.Networks.Mode;
|
import com.cloud.network.Networks.Mode;
|
||||||
import com.cloud.network.Networks.TrafficType;
|
import com.cloud.network.Networks.TrafficType;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public class NetworkProfile implements Network {
|
public class NetworkProfile implements Network {
|
||||||
private long id;
|
private long id;
|
||||||
|
private String uuid;
|
||||||
private long dataCenterId;
|
private long dataCenterId;
|
||||||
private long ownerId;
|
private long ownerId;
|
||||||
private long domainId;
|
private long domainId;
|
||||||
@ -51,6 +53,7 @@ public class NetworkProfile implements Network {
|
|||||||
|
|
||||||
public NetworkProfile(Network network) {
|
public NetworkProfile(Network network) {
|
||||||
this.id = network.getId();
|
this.id = network.getId();
|
||||||
|
this.uuid = network.getUuid();
|
||||||
this.broadcastUri = network.getBroadcastUri();
|
this.broadcastUri = network.getBroadcastUri();
|
||||||
this.dataCenterId = network.getDataCenterId();
|
this.dataCenterId = network.getDataCenterId();
|
||||||
this.ownerId = network.getAccountId();
|
this.ownerId = network.getAccountId();
|
||||||
@ -105,6 +108,12 @@ public class NetworkProfile implements Network {
|
|||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUuid() {
|
||||||
|
return uuid;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getDataCenterId() {
|
public long getDataCenterId() {
|
||||||
return dataCenterId;
|
return dataCenterId;
|
||||||
|
|||||||
@ -20,10 +20,10 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import com.cloud.api.commands.CreateNetworkCmd;
|
import org.apache.cloudstack.api.command.admin.usage.ListTrafficTypeImplementorsCmd;
|
||||||
import com.cloud.api.commands.ListNetworksCmd;
|
import org.apache.cloudstack.api.command.user.network.RestartNetworkCmd;
|
||||||
import com.cloud.api.commands.ListTrafficTypeImplementorsCmd;
|
import org.apache.cloudstack.api.command.user.network.CreateNetworkCmd;
|
||||||
import com.cloud.api.commands.RestartNetworkCmd;
|
import org.apache.cloudstack.api.command.user.network.ListNetworksCmd;
|
||||||
import com.cloud.exception.ConcurrentOperationException;
|
import com.cloud.exception.ConcurrentOperationException;
|
||||||
import com.cloud.exception.InsufficientAddressCapacityException;
|
import com.cloud.exception.InsufficientAddressCapacityException;
|
||||||
import com.cloud.exception.InsufficientCapacityException;
|
import com.cloud.exception.InsufficientCapacityException;
|
||||||
@ -41,7 +41,7 @@ public interface NetworkService {
|
|||||||
|
|
||||||
List<? extends Network> getIsolatedNetworksOwnedByAccountInZone(long zoneId, Account owner);
|
List<? extends Network> getIsolatedNetworksOwnedByAccountInZone(long zoneId, Account owner);
|
||||||
|
|
||||||
IpAddress allocateIP(Account ipOwner, boolean isSystem, long zoneId) throws ResourceAllocationException,
|
IpAddress allocateIP(Account ipOwner, long zoneId, Long networkId) throws ResourceAllocationException,
|
||||||
InsufficientAddressCapacityException, ConcurrentOperationException;
|
InsufficientAddressCapacityException, ConcurrentOperationException;
|
||||||
|
|
||||||
boolean releaseIpAddress(long ipAddressId) throws InsufficientAddressCapacityException;
|
boolean releaseIpAddress(long ipAddressId) throws InsufficientAddressCapacityException;
|
||||||
@ -82,7 +82,7 @@ public interface NetworkService {
|
|||||||
PhysicalNetwork createPhysicalNetwork(Long zoneId, String vnetRange, String networkSpeed,
|
PhysicalNetwork createPhysicalNetwork(Long zoneId, String vnetRange, String networkSpeed,
|
||||||
List<String> isolationMethods, String broadcastDomainRange, Long domainId, List<String> tags, String name);
|
List<String> isolationMethods, String broadcastDomainRange, Long domainId, List<String> tags, String name);
|
||||||
|
|
||||||
List<? extends PhysicalNetwork> searchPhysicalNetworks(Long id, Long zoneId, String keyword,
|
Pair<List<? extends PhysicalNetwork>, Integer> searchPhysicalNetworks(Long id, Long zoneId, String keyword,
|
||||||
Long startIndex, Long pageSize, String name);
|
Long startIndex, Long pageSize, String name);
|
||||||
|
|
||||||
PhysicalNetwork updatePhysicalNetwork(Long id, String networkSpeed, List<String> tags,
|
PhysicalNetwork updatePhysicalNetwork(Long id, String networkSpeed, List<String> tags,
|
||||||
@ -97,7 +97,7 @@ public interface NetworkService {
|
|||||||
PhysicalNetworkServiceProvider addProviderToPhysicalNetwork(Long physicalNetworkId, String providerName,
|
PhysicalNetworkServiceProvider addProviderToPhysicalNetwork(Long physicalNetworkId, String providerName,
|
||||||
Long destinationPhysicalNetworkId, List<String> enabledServices);
|
Long destinationPhysicalNetworkId, List<String> enabledServices);
|
||||||
|
|
||||||
List<? extends PhysicalNetworkServiceProvider> listNetworkServiceProviders(Long physicalNetworkId, String name,
|
Pair<List<? extends PhysicalNetworkServiceProvider>, Integer> listNetworkServiceProviders(Long physicalNetworkId, String name,
|
||||||
String state, Long startIndex, Long pageSize);
|
String state, Long startIndex, Long pageSize);
|
||||||
|
|
||||||
PhysicalNetworkServiceProvider updateNetworkServiceProvider(Long id, String state, List<String> enabledServices);
|
PhysicalNetworkServiceProvider updateNetworkServiceProvider(Long id, String state, List<String> enabledServices);
|
||||||
@ -123,7 +123,7 @@ public interface NetworkService {
|
|||||||
|
|
||||||
boolean deletePhysicalNetworkTrafficType(Long id);
|
boolean deletePhysicalNetworkTrafficType(Long id);
|
||||||
|
|
||||||
List<? extends PhysicalNetworkTrafficType> listTrafficTypes(Long physicalNetworkId);
|
Pair<List<? extends PhysicalNetworkTrafficType>, Integer> listTrafficTypes(Long physicalNetworkId);
|
||||||
|
|
||||||
PhysicalNetwork getDefaultPhysicalNetworkByZoneAndTrafficType(long zoneId, TrafficType trafficType);
|
PhysicalNetwork getDefaultPhysicalNetworkByZoneAndTrafficType(long zoneId, TrafficType trafficType);
|
||||||
|
|
||||||
|
|||||||
@ -16,12 +16,15 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.network;
|
package com.cloud.network;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface PhysicalNetwork {
|
public interface PhysicalNetwork extends Identity, InternalIdentity {
|
||||||
|
|
||||||
public enum State {
|
public enum State {
|
||||||
Disabled,
|
Disabled,
|
||||||
@ -40,8 +43,6 @@ public interface PhysicalNetwork {
|
|||||||
ZONE;
|
ZONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
long getId();
|
|
||||||
|
|
||||||
BroadcastDomainRange getBroadcastDomainRange();
|
BroadcastDomainRange getBroadcastDomainRange();
|
||||||
|
|
||||||
// TrafficType getTrafficType();
|
// TrafficType getTrafficType();
|
||||||
@ -60,8 +61,6 @@ public interface PhysicalNetwork {
|
|||||||
|
|
||||||
String getSpeed();
|
String getSpeed();
|
||||||
|
|
||||||
String getUuid();
|
|
||||||
|
|
||||||
String getName();
|
String getName();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,11 +19,12 @@ package com.cloud.network;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.cloud.network.Network.Service;
|
import com.cloud.network.Network.Service;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface PhysicalNetworkServiceProvider {
|
public interface PhysicalNetworkServiceProvider extends InternalIdentity {
|
||||||
|
|
||||||
public enum State {
|
public enum State {
|
||||||
Disabled,
|
Disabled,
|
||||||
|
|||||||
@ -17,13 +17,13 @@
|
|||||||
package com.cloud.network;
|
package com.cloud.network;
|
||||||
|
|
||||||
import com.cloud.network.Networks.TrafficType;
|
import com.cloud.network.Networks.TrafficType;
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface PhysicalNetworkTrafficType {
|
public interface PhysicalNetworkTrafficType extends InternalIdentity, Identity {
|
||||||
|
|
||||||
long getId();
|
|
||||||
|
|
||||||
long getPhysicalNetworkId();
|
long getPhysicalNetworkId();
|
||||||
|
|
||||||
@ -36,6 +36,4 @@ public interface PhysicalNetworkTrafficType {
|
|||||||
String getVmwareNetworkLabel();
|
String getVmwareNetworkLabel();
|
||||||
|
|
||||||
String getSimulatorNetworkLabel();
|
String getSimulatorNetworkLabel();
|
||||||
|
|
||||||
String getUuid();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,12 +16,13 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.network;
|
package com.cloud.network;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
import com.cloud.dc.Vlan;
|
import com.cloud.dc.Vlan;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
public interface PublicIpAddress extends ControlledEntity, IpAddress, Vlan {
|
public interface PublicIpAddress extends ControlledEntity, IpAddress, Vlan, InternalIdentity {
|
||||||
|
|
||||||
String getMacAddress();
|
String getMacAddress();
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.network;
|
package com.cloud.network;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
|
|
||||||
public interface RemoteAccessVpn extends ControlledEntity {
|
public interface RemoteAccessVpn extends ControlledEntity {
|
||||||
enum State {
|
enum State {
|
||||||
|
|||||||
@ -18,10 +18,11 @@ package com.cloud.network;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface Site2SiteCustomerGateway extends ControlledEntity {
|
public interface Site2SiteCustomerGateway extends ControlledEntity, Identity, InternalIdentity {
|
||||||
public long getId();
|
|
||||||
public String getGatewayIp();
|
public String getGatewayIp();
|
||||||
public String getGuestCidrList();
|
public String getGuestCidrList();
|
||||||
public String getIpsecPsk();
|
public String getIpsecPsk();
|
||||||
|
|||||||
@ -18,9 +18,10 @@ package com.cloud.network;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface Site2SiteVpnConnection extends ControlledEntity {
|
public interface Site2SiteVpnConnection extends ControlledEntity, InternalIdentity {
|
||||||
enum State {
|
enum State {
|
||||||
Pending,
|
Pending,
|
||||||
Connected,
|
Connected,
|
||||||
@ -28,6 +29,7 @@ public interface Site2SiteVpnConnection extends ControlledEntity {
|
|||||||
Error,
|
Error,
|
||||||
}
|
}
|
||||||
public long getId();
|
public long getId();
|
||||||
|
public String getUuid();
|
||||||
public long getVpnGatewayId();
|
public long getVpnGatewayId();
|
||||||
public long getCustomerGatewayId();
|
public long getCustomerGatewayId();
|
||||||
public State getState();
|
public State getState();
|
||||||
|
|||||||
@ -18,10 +18,11 @@ package com.cloud.network;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface Site2SiteVpnGateway extends ControlledEntity {
|
public interface Site2SiteVpnGateway extends ControlledEntity, Identity, InternalIdentity {
|
||||||
public long getId();
|
|
||||||
public long getAddrId();
|
public long getAddrId();
|
||||||
public long getVpcId();
|
public long getVpcId();
|
||||||
public Date getRemoved();
|
public Date getRemoved();
|
||||||
|
|||||||
@ -19,18 +19,18 @@ package com.cloud.network;
|
|||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.cloud.api.commands.CreateStorageNetworkIpRangeCmd;
|
import org.apache.cloudstack.api.command.admin.network.*;
|
||||||
import com.cloud.api.commands.DeleteStorageNetworkIpRangeCmd;
|
import org.apache.cloudstack.api.command.admin.network.UpdateStorageNetworkIpRangeCmd;
|
||||||
import com.cloud.api.commands.UpdateStorageNetworkIpRangeCmd;
|
import org.apache.cloudstack.api.command.admin.network.DeleteStorageNetworkIpRangeCmd;
|
||||||
import com.cloud.api.commands.listStorageNetworkIpRangeCmd;
|
|
||||||
import com.cloud.dc.StorageNetworkIpRange;
|
import com.cloud.dc.StorageNetworkIpRange;
|
||||||
|
import org.apache.cloudstack.api.command.admin.network.CreateStorageNetworkIpRangeCmd;
|
||||||
|
|
||||||
public interface StorageNetworkService {
|
public interface StorageNetworkService {
|
||||||
StorageNetworkIpRange createIpRange(CreateStorageNetworkIpRangeCmd cmd) throws SQLException;
|
StorageNetworkIpRange createIpRange(CreateStorageNetworkIpRangeCmd cmd) throws SQLException;
|
||||||
|
|
||||||
void deleteIpRange(DeleteStorageNetworkIpRangeCmd cmd);
|
void deleteIpRange(DeleteStorageNetworkIpRangeCmd cmd);
|
||||||
|
|
||||||
List<StorageNetworkIpRange> listIpRange(listStorageNetworkIpRangeCmd cmd);
|
List<StorageNetworkIpRange> listIpRange(ListStorageNetworkIpRangeCmd cmd);
|
||||||
|
|
||||||
StorageNetworkIpRange updateIpRange(UpdateStorageNetworkIpRangeCmd cmd);
|
StorageNetworkIpRange updateIpRange(UpdateStorageNetworkIpRangeCmd cmd);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,11 +16,12 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.network;
|
package com.cloud.network;
|
||||||
|
|
||||||
import com.cloud.api.commands.UpgradeRouterCmd;
|
import org.apache.cloudstack.api.command.admin.router.UpgradeRouterCmd;
|
||||||
import com.cloud.exception.ConcurrentOperationException;
|
import com.cloud.exception.ConcurrentOperationException;
|
||||||
import com.cloud.exception.InsufficientCapacityException;
|
import com.cloud.exception.InsufficientCapacityException;
|
||||||
import com.cloud.exception.ResourceUnavailableException;
|
import com.cloud.exception.ResourceUnavailableException;
|
||||||
import com.cloud.network.router.VirtualRouter;
|
import com.cloud.network.router.VirtualRouter;
|
||||||
|
import com.cloud.user.Account;
|
||||||
|
|
||||||
public interface VirtualNetworkApplianceService {
|
public interface VirtualNetworkApplianceService {
|
||||||
/**
|
/**
|
||||||
@ -60,6 +61,6 @@ public interface VirtualNetworkApplianceService {
|
|||||||
|
|
||||||
VirtualRouter startRouter(long id) throws ResourceUnavailableException, InsufficientCapacityException, ConcurrentOperationException;
|
VirtualRouter startRouter(long id) throws ResourceUnavailableException, InsufficientCapacityException, ConcurrentOperationException;
|
||||||
|
|
||||||
VirtualRouter destroyRouter(long routerId) throws ResourceUnavailableException, ConcurrentOperationException;
|
VirtualRouter destroyRouter(long routerId, Account caller, Long callerUserId) throws ResourceUnavailableException, ConcurrentOperationException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,10 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.network;
|
package com.cloud.network;
|
||||||
|
|
||||||
public interface VirtualRouterProvider {
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
public interface VirtualRouterProvider extends InternalIdentity, Identity {
|
||||||
public enum VirtualRouterProviderType {
|
public enum VirtualRouterProviderType {
|
||||||
VirtualRouter,
|
VirtualRouter,
|
||||||
ElasticLoadBalancerVm,
|
ElasticLoadBalancerVm,
|
||||||
@ -25,8 +28,6 @@ public interface VirtualRouterProvider {
|
|||||||
|
|
||||||
public VirtualRouterProviderType getType();
|
public VirtualRouterProviderType getType();
|
||||||
|
|
||||||
public long getId();
|
|
||||||
|
|
||||||
public boolean isEnabled();
|
public boolean isEnabled();
|
||||||
|
|
||||||
public long getNspId();
|
public long getNspId();
|
||||||
|
|||||||
@ -16,17 +16,17 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.network;
|
package com.cloud.network;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface VpnUser extends ControlledEntity {
|
public interface VpnUser extends ControlledEntity, InternalIdentity, Identity {
|
||||||
enum State {
|
enum State {
|
||||||
Add,
|
Add,
|
||||||
Revoke,
|
Revoke,
|
||||||
Active
|
Active
|
||||||
}
|
}
|
||||||
|
|
||||||
long getId();
|
|
||||||
|
|
||||||
String getUsername();
|
String getUsername();
|
||||||
|
|
||||||
String getPassword();
|
String getPassword();
|
||||||
|
|||||||
122
api/src/com/cloud/network/as/AutoScaleCounter.java
Normal file
122
api/src/com/cloud/network/as/AutoScaleCounter.java
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
// 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.network.as;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class AutoScaleCounter {
|
||||||
|
public static class AutoScaleCounterType {
|
||||||
|
private String _name;
|
||||||
|
|
||||||
|
public static final AutoScaleCounterType Snmp = new AutoScaleCounterType("snmp");
|
||||||
|
public static final AutoScaleCounterType Netscaler = new AutoScaleCounterType("netscaler");
|
||||||
|
|
||||||
|
public AutoScaleCounterType(String name) {
|
||||||
|
_name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return _name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class AutoScaleCounterParam {
|
||||||
|
@SerializedName("paramname")
|
||||||
|
private String _paramName;
|
||||||
|
|
||||||
|
@SerializedName("required")
|
||||||
|
private Boolean _required;
|
||||||
|
|
||||||
|
@SerializedName("isflag")
|
||||||
|
private Boolean _isFlag;
|
||||||
|
|
||||||
|
@SerializedName("description")
|
||||||
|
private String _description;
|
||||||
|
|
||||||
|
public AutoScaleCounterParam(String name, Boolean required,
|
||||||
|
String description, Boolean flag) {
|
||||||
|
this._paramName = name;
|
||||||
|
this._required = required;
|
||||||
|
this._description = description;
|
||||||
|
this._isFlag = flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParamName() {
|
||||||
|
return _paramName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParamName(String paramName) {
|
||||||
|
this._paramName = paramName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getIsflag() {
|
||||||
|
return _isFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsflag(Boolean isFlag) {
|
||||||
|
this._isFlag = isFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getRequired() {
|
||||||
|
return _required;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRequired(Boolean required) {
|
||||||
|
this._required = required;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return _description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this._description = description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SerializedName("methodname")
|
||||||
|
private String _counterName;
|
||||||
|
|
||||||
|
@SerializedName("paramlist")
|
||||||
|
private List<AutoScaleCounterParam> _paramList;
|
||||||
|
|
||||||
|
public AutoScaleCounter(AutoScaleCounterType methodType) {
|
||||||
|
this._counterName = methodType.getName();
|
||||||
|
this._paramList = new ArrayList<AutoScaleCounterParam>(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addParam(String name, Boolean required, String description, Boolean isFlag) {
|
||||||
|
AutoScaleCounterParam param = new AutoScaleCounterParam(name, required, description, isFlag);
|
||||||
|
_paramList.add(param);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return _counterName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<AutoScaleCounterParam> getParamList() {
|
||||||
|
return _paramList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParamList(List<AutoScaleCounterParam> paramList) {
|
||||||
|
this._paramList = paramList;
|
||||||
|
}
|
||||||
|
}
|
||||||
35
api/src/com/cloud/network/as/AutoScalePolicy.java
Normal file
35
api/src/com/cloud/network/as/AutoScalePolicy.java
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// 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.network.as;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
public interface AutoScalePolicy extends ControlledEntity, InternalIdentity {
|
||||||
|
|
||||||
|
long getId();
|
||||||
|
|
||||||
|
String getUuid();
|
||||||
|
|
||||||
|
public int getDuration();
|
||||||
|
|
||||||
|
public int getQuietTime();
|
||||||
|
|
||||||
|
public String getAction();
|
||||||
|
|
||||||
|
}
|
||||||
73
api/src/com/cloud/network/as/AutoScaleService.java
Normal file
73
api/src/com/cloud/network/as/AutoScaleService.java
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
// 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.network.as;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.api.command.admin.autoscale.CreateCounterCmd;
|
||||||
|
import org.apache.cloudstack.api.command.user.autoscale.*;
|
||||||
|
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScalePolicyCmd;
|
||||||
|
import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScaleVmProfileCmd;
|
||||||
|
import org.apache.cloudstack.api.command.user.autoscale.ListAutoScalePoliciesCmd;
|
||||||
|
import org.apache.cloudstack.api.command.user.autoscale.UpdateAutoScaleVmGroupCmd;
|
||||||
|
import com.cloud.exception.ResourceInUseException;
|
||||||
|
import com.cloud.exception.ResourceUnavailableException;
|
||||||
|
|
||||||
|
public interface AutoScaleService {
|
||||||
|
|
||||||
|
public AutoScalePolicy createAutoScalePolicy(CreateAutoScalePolicyCmd createAutoScalePolicyCmd);
|
||||||
|
|
||||||
|
public boolean deleteAutoScalePolicy(long autoScalePolicyId);
|
||||||
|
|
||||||
|
List<? extends AutoScalePolicy> listAutoScalePolicies(ListAutoScalePoliciesCmd cmd);
|
||||||
|
|
||||||
|
AutoScalePolicy updateAutoScalePolicy(UpdateAutoScalePolicyCmd cmd);
|
||||||
|
|
||||||
|
AutoScaleVmProfile createAutoScaleVmProfile(CreateAutoScaleVmProfileCmd cmd);
|
||||||
|
|
||||||
|
boolean deleteAutoScaleVmProfile(long profileId);
|
||||||
|
|
||||||
|
List<? extends AutoScaleVmProfile> listAutoScaleVmProfiles(ListAutoScaleVmProfilesCmd listAutoScaleVmProfilesCmd);
|
||||||
|
|
||||||
|
AutoScaleVmProfile updateAutoScaleVmProfile(UpdateAutoScaleVmProfileCmd cmd);
|
||||||
|
|
||||||
|
AutoScaleVmGroup createAutoScaleVmGroup(CreateAutoScaleVmGroupCmd cmd);
|
||||||
|
|
||||||
|
boolean configureAutoScaleVmGroup(CreateAutoScaleVmGroupCmd cmd) throws ResourceUnavailableException;
|
||||||
|
|
||||||
|
boolean deleteAutoScaleVmGroup(long vmGroupId);
|
||||||
|
|
||||||
|
AutoScaleVmGroup updateAutoScaleVmGroup(UpdateAutoScaleVmGroupCmd cmd);
|
||||||
|
|
||||||
|
AutoScaleVmGroup enableAutoScaleVmGroup(Long id);
|
||||||
|
|
||||||
|
AutoScaleVmGroup disableAutoScaleVmGroup(Long id);
|
||||||
|
|
||||||
|
List<? extends AutoScaleVmGroup> listAutoScaleVmGroups(ListAutoScaleVmGroupsCmd listAutoScaleVmGroupsCmd);
|
||||||
|
|
||||||
|
Counter createCounter(CreateCounterCmd cmd);
|
||||||
|
|
||||||
|
boolean deleteCounter(long counterId) throws ResourceInUseException;
|
||||||
|
|
||||||
|
List<? extends Counter> listCounters(ListCountersCmd cmd);
|
||||||
|
|
||||||
|
Condition createCondition(CreateConditionCmd cmd);
|
||||||
|
|
||||||
|
List<? extends Condition> listConditions(ListConditionsCmd cmd);
|
||||||
|
|
||||||
|
boolean deleteCondition(long conditionId) throws ResourceInUseException;
|
||||||
|
}
|
||||||
52
api/src/com/cloud/network/as/AutoScaleVmGroup.java
Normal file
52
api/src/com/cloud/network/as/AutoScaleVmGroup.java
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
// 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.network.as;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
|
||||||
|
public interface AutoScaleVmGroup extends ControlledEntity, InternalIdentity {
|
||||||
|
|
||||||
|
String State_New = "new";
|
||||||
|
String State_Revoke = "revoke";
|
||||||
|
String State_Enabled = "enabled";
|
||||||
|
String State_Disabled = "disabled";
|
||||||
|
|
||||||
|
long getId();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
long getAccountId();
|
||||||
|
|
||||||
|
Long getLoadBalancerId();
|
||||||
|
|
||||||
|
long getProfileId();
|
||||||
|
|
||||||
|
int getMinMembers();
|
||||||
|
|
||||||
|
int getMaxMembers();
|
||||||
|
|
||||||
|
int getMemberPort();
|
||||||
|
|
||||||
|
int getInterval();
|
||||||
|
|
||||||
|
String getState();
|
||||||
|
|
||||||
|
String getUuid();
|
||||||
|
|
||||||
|
}
|
||||||
49
api/src/com/cloud/network/as/AutoScaleVmProfile.java
Normal file
49
api/src/com/cloud/network/as/AutoScaleVmProfile.java
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
// 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.network.as;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
|
import com.cloud.utils.Pair;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AutoScaleVmProfile
|
||||||
|
*/
|
||||||
|
public interface AutoScaleVmProfile extends ControlledEntity, InternalIdentity {
|
||||||
|
|
||||||
|
public long getId();
|
||||||
|
|
||||||
|
public String getUuid();
|
||||||
|
|
||||||
|
public Long getZoneId();
|
||||||
|
|
||||||
|
public Long getServiceOfferingId();
|
||||||
|
|
||||||
|
public Long getTemplateId();
|
||||||
|
|
||||||
|
public String getOtherDeployParams();
|
||||||
|
|
||||||
|
List<Pair<String, String>> getCounterParams();
|
||||||
|
|
||||||
|
public Integer getDestroyVmGraceperiod();
|
||||||
|
|
||||||
|
public long getAutoScaleUserId();
|
||||||
|
|
||||||
|
}
|
||||||
35
api/src/com/cloud/network/as/Condition.java
Normal file
35
api/src/com/cloud/network/as/Condition.java
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// 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.network.as;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
public interface Condition extends ControlledEntity, Identity, InternalIdentity {
|
||||||
|
|
||||||
|
static enum Operator {
|
||||||
|
EQ, GT, LT, GE, LE
|
||||||
|
};
|
||||||
|
|
||||||
|
long getCounterid();
|
||||||
|
|
||||||
|
long getThreshold();
|
||||||
|
|
||||||
|
Operator getRelationalOperator();
|
||||||
|
}
|
||||||
35
api/src/com/cloud/network/as/Counter.java
Normal file
35
api/src/com/cloud/network/as/Counter.java
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// 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.network.as;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
public interface Counter extends InternalIdentity, Identity {
|
||||||
|
|
||||||
|
public static enum Source {
|
||||||
|
netscaler,
|
||||||
|
snmp
|
||||||
|
}
|
||||||
|
|
||||||
|
String getName();
|
||||||
|
|
||||||
|
String getValue();
|
||||||
|
|
||||||
|
Source getSource();
|
||||||
|
}
|
||||||
@ -21,6 +21,7 @@ import java.util.Set;
|
|||||||
|
|
||||||
import com.cloud.exception.ResourceUnavailableException;
|
import com.cloud.exception.ResourceUnavailableException;
|
||||||
import com.cloud.network.Network;
|
import com.cloud.network.Network;
|
||||||
|
import com.cloud.network.Network.Provider;
|
||||||
import com.cloud.network.Network.Service;
|
import com.cloud.network.Network.Service;
|
||||||
import com.cloud.network.PublicIpAddress;
|
import com.cloud.network.PublicIpAddress;
|
||||||
|
|
||||||
@ -33,4 +34,6 @@ public interface IpDeployer {
|
|||||||
* @throws ResourceUnavailableException
|
* @throws ResourceUnavailableException
|
||||||
*/
|
*/
|
||||||
boolean applyIps(Network network, List<? extends PublicIpAddress> ipAddress, Set<Service> services) throws ResourceUnavailableException;
|
boolean applyIps(Network network, List<? extends PublicIpAddress> ipAddress, Set<Service> services) throws ResourceUnavailableException;
|
||||||
|
|
||||||
|
Provider getProvider();
|
||||||
}
|
}
|
||||||
|
|||||||
28
api/src/com/cloud/network/element/IpDeployingRequester.java
Normal file
28
api/src/com/cloud/network/element/IpDeployingRequester.java
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
// 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.network.element;
|
||||||
|
|
||||||
|
import com.cloud.network.Network;
|
||||||
|
|
||||||
|
public interface IpDeployingRequester {
|
||||||
|
/**
|
||||||
|
* Would return the IpDeployer can deploy IP for this element
|
||||||
|
* @param network
|
||||||
|
* @return IpDeployer object, or null if there is no deployer for this element
|
||||||
|
*/
|
||||||
|
IpDeployer getIpDeployer(Network network);
|
||||||
|
}
|
||||||
@ -22,7 +22,7 @@ import com.cloud.exception.ResourceUnavailableException;
|
|||||||
import com.cloud.network.Network;
|
import com.cloud.network.Network;
|
||||||
import com.cloud.network.lb.LoadBalancingRule;
|
import com.cloud.network.lb.LoadBalancingRule;
|
||||||
|
|
||||||
public interface LoadBalancingServiceProvider extends NetworkElement {
|
public interface LoadBalancingServiceProvider extends NetworkElement, IpDeployingRequester {
|
||||||
/**
|
/**
|
||||||
* Apply rules
|
* Apply rules
|
||||||
* @param network
|
* @param network
|
||||||
@ -32,7 +32,6 @@ public interface LoadBalancingServiceProvider extends NetworkElement {
|
|||||||
*/
|
*/
|
||||||
boolean applyLBRules(Network network, List<LoadBalancingRule> rules) throws ResourceUnavailableException;
|
boolean applyLBRules(Network network, List<LoadBalancingRule> rules) throws ResourceUnavailableException;
|
||||||
|
|
||||||
IpDeployer getIpDeployer(Network network);
|
|
||||||
/**
|
/**
|
||||||
* Validate rules
|
* Validate rules
|
||||||
* @param network
|
* @param network
|
||||||
|
|||||||
@ -103,10 +103,11 @@ public interface NetworkElement extends Adapter {
|
|||||||
/**
|
/**
|
||||||
* The network is being destroyed.
|
* The network is being destroyed.
|
||||||
* @param network
|
* @param network
|
||||||
|
* @param context TODO
|
||||||
* @return
|
* @return
|
||||||
* @throws ConcurrentOperationException
|
* @throws ConcurrentOperationException
|
||||||
*/
|
*/
|
||||||
boolean destroy(Network network) throws ConcurrentOperationException, ResourceUnavailableException;
|
boolean destroy(Network network, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the instances of this Element are configured to be used on the physical network referred by this provider.
|
* Check if the instances of this Element are configured to be used on the physical network referred by this provider.
|
||||||
|
|||||||
@ -22,7 +22,7 @@ import com.cloud.exception.ResourceUnavailableException;
|
|||||||
import com.cloud.network.Network;
|
import com.cloud.network.Network;
|
||||||
import com.cloud.network.rules.PortForwardingRule;
|
import com.cloud.network.rules.PortForwardingRule;
|
||||||
|
|
||||||
public interface PortForwardingServiceProvider extends NetworkElement {
|
public interface PortForwardingServiceProvider extends NetworkElement, IpDeployingRequester {
|
||||||
/**
|
/**
|
||||||
* Apply rules
|
* Apply rules
|
||||||
* @param network
|
* @param network
|
||||||
@ -31,6 +31,4 @@ public interface PortForwardingServiceProvider extends NetworkElement {
|
|||||||
* @throws ResourceUnavailableException
|
* @throws ResourceUnavailableException
|
||||||
*/
|
*/
|
||||||
boolean applyPFRules(Network network, List<PortForwardingRule> rules) throws ResourceUnavailableException;
|
boolean applyPFRules(Network network, List<PortForwardingRule> rules) throws ResourceUnavailableException;
|
||||||
|
|
||||||
IpDeployer getIpDeployer(Network network);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,12 +23,10 @@ import com.cloud.network.Network;
|
|||||||
import com.cloud.network.RemoteAccessVpn;
|
import com.cloud.network.RemoteAccessVpn;
|
||||||
import com.cloud.network.VpnUser;
|
import com.cloud.network.VpnUser;
|
||||||
|
|
||||||
public interface RemoteAccessVPNServiceProvider extends NetworkElement {
|
public interface RemoteAccessVPNServiceProvider extends NetworkElement, IpDeployingRequester {
|
||||||
String[] applyVpnUsers(RemoteAccessVpn vpn, List<? extends VpnUser> users) throws ResourceUnavailableException;
|
String[] applyVpnUsers(RemoteAccessVpn vpn, List<? extends VpnUser> users) throws ResourceUnavailableException;
|
||||||
|
|
||||||
boolean startVpn(Network network, RemoteAccessVpn vpn) throws ResourceUnavailableException;
|
boolean startVpn(Network network, RemoteAccessVpn vpn) throws ResourceUnavailableException;
|
||||||
|
|
||||||
boolean stopVpn(Network network, RemoteAccessVpn vpn) throws ResourceUnavailableException;
|
boolean stopVpn(Network network, RemoteAccessVpn vpn) throws ResourceUnavailableException;
|
||||||
|
|
||||||
IpDeployer getIpDeployer(Network network);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,8 +16,5 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.network.element;
|
package com.cloud.network.element;
|
||||||
|
|
||||||
import com.cloud.network.Network;
|
public interface SourceNatServiceProvider extends NetworkElement, IpDeployingRequester {
|
||||||
|
|
||||||
public interface SourceNatServiceProvider extends NetworkElement {
|
|
||||||
IpDeployer getIpDeployer(Network network);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@ import com.cloud.exception.ResourceUnavailableException;
|
|||||||
import com.cloud.network.Network;
|
import com.cloud.network.Network;
|
||||||
import com.cloud.network.rules.StaticNat;
|
import com.cloud.network.rules.StaticNat;
|
||||||
|
|
||||||
public interface StaticNatServiceProvider extends NetworkElement {
|
public interface StaticNatServiceProvider extends NetworkElement, IpDeployingRequester {
|
||||||
/**
|
/**
|
||||||
* Creates static nat rule (public IP to private IP mapping) on the network element
|
* Creates static nat rule (public IP to private IP mapping) on the network element
|
||||||
* @param config
|
* @param config
|
||||||
@ -31,6 +31,4 @@ public interface StaticNatServiceProvider extends NetworkElement {
|
|||||||
* @throws ResourceUnavailableException
|
* @throws ResourceUnavailableException
|
||||||
*/
|
*/
|
||||||
boolean applyStaticNats(Network config, List<? extends StaticNat> rules) throws ResourceUnavailableException;
|
boolean applyStaticNats(Network config, List<? extends StaticNat> rules) throws ResourceUnavailableException;
|
||||||
|
|
||||||
IpDeployer getIpDeployer(Network network);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,4 +29,5 @@ import com.cloud.vm.VirtualMachineProfile;
|
|||||||
public interface UserDataServiceProvider extends NetworkElement {
|
public interface UserDataServiceProvider extends NetworkElement {
|
||||||
public boolean addPasswordAndUserdata(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException;
|
public boolean addPasswordAndUserdata(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException;
|
||||||
boolean savePassword(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm) throws ResourceUnavailableException;
|
boolean savePassword(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm) throws ResourceUnavailableException;
|
||||||
|
boolean saveUserData(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm) throws ResourceUnavailableException;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,8 +18,8 @@ package com.cloud.network.element;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.cloud.api.commands.ConfigureVirtualRouterElementCmd;
|
import org.apache.cloudstack.api.command.admin.router.ConfigureVirtualRouterElementCmd;
|
||||||
import com.cloud.api.commands.ListVirtualRouterElementsCmd;
|
import org.apache.cloudstack.api.command.admin.router.ListVirtualRouterElementsCmd;
|
||||||
import com.cloud.network.VirtualRouterProvider;
|
import com.cloud.network.VirtualRouterProvider;
|
||||||
import com.cloud.network.VirtualRouterProvider.VirtualRouterProviderType;
|
import com.cloud.network.VirtualRouterProvider.VirtualRouterProviderType;
|
||||||
import com.cloud.utils.component.PluggableService;
|
import com.cloud.utils.component.PluggableService;
|
||||||
|
|||||||
@ -41,11 +41,12 @@ public interface VpcProvider extends NetworkElement{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param vpc
|
* @param vpc
|
||||||
|
* @param context TODO
|
||||||
* @return
|
* @return
|
||||||
* @throws ConcurrentOperationException
|
* @throws ConcurrentOperationException
|
||||||
* @throws ResourceUnavailableException
|
* @throws ResourceUnavailableException
|
||||||
*/
|
*/
|
||||||
boolean shutdownVpc(Vpc vpc) throws ConcurrentOperationException, ResourceUnavailableException;
|
boolean shutdownVpc(Vpc vpc, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException;
|
||||||
|
|
||||||
boolean createPrivateGateway(PrivateGateway gateway) throws ConcurrentOperationException, ResourceUnavailableException;
|
boolean createPrivateGateway(PrivateGateway gateway) throws ConcurrentOperationException, ResourceUnavailableException;
|
||||||
|
|
||||||
|
|||||||
@ -16,18 +16,20 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.network.firewall;
|
package com.cloud.network.firewall;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.cloud.api.commands.ListFirewallRulesCmd;
|
import org.apache.cloudstack.api.command.user.firewall.ListFirewallRulesCmd;
|
||||||
import com.cloud.exception.NetworkRuleConflictException;
|
import com.cloud.exception.NetworkRuleConflictException;
|
||||||
import com.cloud.exception.ResourceUnavailableException;
|
import com.cloud.exception.ResourceUnavailableException;
|
||||||
import com.cloud.network.rules.FirewallRule;
|
import com.cloud.network.rules.FirewallRule;
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
|
import com.cloud.utils.Pair;
|
||||||
|
|
||||||
public interface FirewallService {
|
public interface FirewallService {
|
||||||
FirewallRule createFirewallRule(FirewallRule rule) throws NetworkRuleConflictException;
|
FirewallRule createFirewallRule(FirewallRule rule) throws NetworkRuleConflictException;
|
||||||
|
|
||||||
List<? extends FirewallRule> listFirewallRules(ListFirewallRulesCmd cmd);
|
Pair<List<? extends FirewallRule>, Integer> listFirewallRules(ListFirewallRulesCmd cmd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Revokes a firewall rule
|
* Revokes a firewall rule
|
||||||
|
|||||||
@ -16,13 +16,15 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.network.firewall;
|
package com.cloud.network.firewall;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.cloud.api.commands.ListNetworkACLsCmd;
|
import org.apache.cloudstack.api.command.user.network.ListNetworkACLsCmd;
|
||||||
import com.cloud.exception.NetworkRuleConflictException;
|
import com.cloud.exception.NetworkRuleConflictException;
|
||||||
import com.cloud.exception.ResourceUnavailableException;
|
import com.cloud.exception.ResourceUnavailableException;
|
||||||
import com.cloud.network.rules.FirewallRule;
|
import com.cloud.network.rules.FirewallRule;
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
|
import com.cloud.utils.Pair;
|
||||||
|
|
||||||
public interface NetworkACLService {
|
public interface NetworkACLService {
|
||||||
FirewallRule getNetworkACL(long ruleId);
|
FirewallRule getNetworkACL(long ruleId);
|
||||||
@ -43,6 +45,6 @@ public interface NetworkACLService {
|
|||||||
* @param listNetworkACLsCmd
|
* @param listNetworkACLsCmd
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<? extends FirewallRule> listNetworkACLs(ListNetworkACLsCmd cmd);
|
Pair<List<? extends FirewallRule>, Integer> listNetworkACLs(ListNetworkACLsCmd cmd);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user