814 Commits

Author SHA1 Message Date
Kelven Yang
da2e6461a6 Remove temporary hacking and use Official way to wire-up servlet with injection under Spring 2013-01-30 15:21:01 -08:00
Sheng Yang
4640b82719 IPv6: Fix generated DUID-LL
Should be: 00:03:00:01 + <Mac>
2013-01-29 22:01:44 -08:00
Sheng Yang
f9a68e7f15 IPv6: Add vlan overlap checking 2013-01-29 22:01:38 -08:00
Sheng Yang
0b62fc4c17 IPv6: Verify if requested IPv4/IPv6 addresses are valid
Also rename NetUtils.isValidIPv6() to NetUtils.isValidIpv6()
2013-01-29 19:08:09 -08:00
Sheng Yang
2cbca372bf IPv6: Add support for IPv6 on DeployVMCmd 2013-01-28 18:54:34 -08:00
Kelven Yang
8887f01b37 CLOUDSTACK-1070: HypervisorTemplateAdapter needs to be configured with proper name 2013-01-28 17:12:41 -08:00
frank
997e9fb7b0 CloudStack CLOUDSTACK-723
Enhanced baremetal servers support on Cisco UCS
2013-01-28 16:29:54 -08:00
Sheng Yang
fa00ddf07e IPv6: Fix getIp6FromRange() 2013-01-27 19:07:44 -08:00
Sheng Yang
bd4bc025d1 IPv6: Accept IPv6 parameter for createNetworkCmd
Also ass public_ipv6_address for ipv6 address management.

Extend nics and vlans for ipv6 address.

Add dependency to com.googlecode.ipv6(java-ipv6).

Modify dhcpcommand for ipv6.
2013-01-26 23:14:15 -08:00
Kelven Yang
af4485ae9e Put nonoss under Spring framework 2013-01-25 15:41:48 -08:00
frank
301b0b9090 CloudStack CLOUDSTACK-723
Enhanced baremetal servers support on Cisco UCS

init
2013-01-25 15:00:09 -08:00
Edison Su
a18baf8c83 fix compile 2013-01-25 10:24:25 -08:00
Kishan Kavala
c6ae19d12f Merge branch 'master' into regions 2013-01-25 18:49:47 +05:30
Kishan Kavala
1f57d925eb Apply API refactoring changes. Make changes to Regions API to work with new code 2013-01-25 18:41:59 +05:30
Edison Su
cb25eed37a forget to check in code 2013-01-25 00:25:14 -08:00
Rohit Yadav
356866c72b Merge branch 'master' into javelin
- Fixed new join dao impls as spring components
- Fixed component context xml to load api rate limit checker
- Fixed root pom.xml for duplicate plugin
- Fixed list data centers method
- Fixed following conflicts:
	api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java
	api/src/org/apache/cloudstack/api/command/user/offering/ListServiceOfferingsCmd.java
	api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java
	api/src/org/apache/cloudstack/api/command/user/template/ExtractTemplateCmd.java
	plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java
	server/src/com/cloud/api/ApiDBUtils.java
	server/src/com/cloud/api/ApiServer.java
	server/src/com/cloud/api/query/QueryManagerImpl.java
	server/src/com/cloud/configuration/DefaultComponentLibrary.java
	server/src/com/cloud/server/ManagementServerImpl.java
	server/src/com/cloud/storage/swift/SwiftManagerImpl.java

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-24 19:18:53 -08:00
Alex Huang
1567a112fa unit test works again 2013-01-24 14:36:44 -08:00
Kelven Yang
a26e075f0e Remove final modifer to ListS3Cmd class as it conflicts with Spring injection 2013-01-23 18:24:03 -08:00
Kelven Yang
45a92ba369 Fix the initialization of management server 2013-01-23 15:29:41 -08:00
Rohit Yadav
03d2c015ae GenericDao: Add method to find by uuid string including removed entities
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-23 14:57:41 -08:00
Rohit Yadav
7a927e36f0 ReflectUtil: Use collections to grow list and not manual array memory management
Fix usage in ApiDispatcher. Add two kinds of helpers:
- One that gets list of exclude cmd whose fields are not be included
- One that loops till a base class is asssignable from superclass

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-23 14:57:41 -08:00
Rohit Yadav
cbdeeebc6c IteratorUtil: Add generic method to return sorted list out of a collection
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-23 14:57:41 -08:00
Alex Huang
ee39ec82d3 Making unit tests work 2013-01-22 11:18:51 -08:00
Edison Su
4fbecf15ec add unit test back, primary storage life cycle is tested 2013-01-21 17:01:00 -08:00
Hugo Trippaers
04f82623f6 Merge branch 'master' into cloud-agent-with-openvswitch
Conflicts:
	plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
2013-01-21 12:18:21 +01:00
Kelven Yang
2c5859dbd4 Bring javelin back to the status of being able to start System VMs after another round of master branch merge 2013-01-18 19:15:32 -08:00
Rohit Yadav
64f13e1cd8 DatabaseCreator: Fast forward merge due to recent pull in merge of master 2013-01-18 18:16:04 -08:00
Rohit Yadav
7fbe935c36 Transaction: Fix static, add method to reinit static datasource off a db props file
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-18 18:08:11 -08:00
Rohit Yadav
e688fbfc24 ScriptRunner: Alternate constructor to get verbosity flag
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-18 18:07:37 -08:00
Rohit Yadav
6214b1d4bd db.properties: adding other key value info for dbcreator to work in a generic way
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-18 17:19:55 -08:00
Alex Huang
10d9c019a9 All merge conflicts resolved 2013-01-18 12:14:57 -08:00
Rohit Yadav
ddf9c6586d Transaction: cosmetics fix
The default data source assumption is that db server is on localhost, port 3306
and has user cloud and password cloud. The static variables rely on hardcoded
db.properties file only. We need to fix it

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-17 19:09:38 -08:00
Kelven Yang
17a94b20ec Always use premium setting in ConsoleProxyManager 2013-01-17 18:23:06 -08:00
Kelven Yang
93985ae191 allow nested injection in ComponentContext 2013-01-17 18:23:06 -08:00
frank
fb050894f5 CloudStack CLOUDSTACK-723
Enhanced baremetal servers support on Cisco UCS

able to dump xmlobject
2013-01-17 16:11:15 -08:00
Rohit Yadav
ef07cde449 DBCreator: Fix ScriptRunner to strip comments, reformat code
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-17 16:10:07 -08:00
Kelven Yang
6d155416c2 System VM can start now with Spring bootstraped management server 2013-01-17 14:22:14 -08:00
Alex Huang
cbb7ff1c32 added missing files 2013-01-17 06:50:59 -08:00
Alex Huang
b751b69c55 Merge branch 'javelin' of https://git-wip-us.apache.org/repos/asf/incubator-cloudstack into javelin 2013-01-17 06:50:19 -08:00
Alex Huang
9759ad57f2 Commit the current changes to unit tests 2013-01-17 06:50:11 -08:00
Min Chen
3dabd5fbf3 Clean up ApiServer, ApiServlet and ApiDispatcher flow to handle various CloudRuntimeException
and CloudException in one place, and Introduced ApiErrorCode to handle CloudStack API error
code to standard Http code mapping.

Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-16 22:36:34 -08:00
Min Chen
bdcfa1919b Clean up ApiServer, ApiServlet and ApiDispatcher in handling various
exceptions, and Introduced ApiErrorCode to handle CloudStack API error
code to standard Http code mapping.
2013-01-16 21:52:48 -08:00
Kelven Yang
497dcd5044 Get rid of PlugService annotation, replace it with Spring standard injection in command classes 2013-01-16 18:44:44 -08:00
Kelven Yang
2be270de89 Separate loadable components like Gurus, Elements, Adapters to componentContext.xml 2013-01-16 16:33:59 -08:00
frank
53473c07b9 CloudStack CLOUDSTACK-723
Enhanced baremetal servers support on Cisco UCS

introduce an python etree like xml helper.
Ok, this is not a new wheel. Frankly speaking, all Java XML API just suc**.
there are two popular types of XML API in java, one class is for data binding, JAXB,
XStream fall into this category. Another class is tree based, like JDOM, XOM ...

for XML api call, data binding library is painful as you have to specify the schema
that how xml stream converts to java object, which means you have to pre-define all
schemas(xsd file for JAXB, java object for XStream ...). This is not productive, because you
must add new schema when XML document grows.

Tree based library shines in this case, for it's able to dynamically create an object tree
from xml stream without any knowledge of its structure. However, all tree based
XML API library fall into below convention:

Element e = root.getChildElement("child1").getChildElement("child2").getChildElement("child3")...getChildElement("childN")

anything wrong with it???

the sadness is if there is no "child2", you will get a NPE with above code, which means you have to judge
before getting.

And, why so verbose?? why not:

Element e = root.child1.child2.child3...childN ???

Ok I am joking, it's impossible in Java the world knows Java is a static language.

but you can actually do:

Element e = root.get("child1.child2.child3");

or

List<Element> e = root.getAsList("child1.child2.child3")

this is known as XPath style(though XPATH use '/'), python etree has supported it.

so I did this toy for my UCS xml api call, it's quite like etree which is easy to use, for example:

<components.xml>
    <system-integrity-checker class="com.cloud.upgrade.DatabaseUpgradeChecker">
        <checker name="ManagementServerNode" class="com.cloud.cluster.ManagementServerNode"/>
        <checker name="EncryptionSecretKeyChecker" class="com.cloud.utils.crypt.EncryptionSecretKeyChecker"/>
        <checker name="DatabaseIntegrityChecker" class="com.cloud.upgrade.DatabaseIntegrityChecker"/>
        <checker name="DatabaseUpgradeChecker" class="com.cloud.upgrade.PremiumDatabaseUpgradeChecker"/>
    </system-integrity-checker>
</components.xml>

XmlObject xo = XmlObjectParser.parseFromFile("~/components.xml.in");
List<XmlObject> checkers = xo.getAsList("system-integrity-checker.checker");

then you get a list of XmlObject which represent each 'checker' element:

XmlObject firstChecker = checkers.get(0);
// firstChecker.get("name") == "ManagementServerNode"
// firstChecker.get("class") == "com.cloud.cluster.ManagementServerNode"
// firstChecker.getTag() == "checker"
// firstChecker.getText() == "" if it's <checker/>xxx</checker>, then getText() == "xxx"

example 2:
<checker name="ManagementServerNode" class="com.cloud.cluster.ManagementServerNode"/>
    <system-integrity-checker class="com.cloud.upgrade.DatabaseUpgradeChecker">
        <checker name="ManagementServerNode" class="com.cloud.cluster.ManagementServerNode"/>
    </system-integrity-checker>
</components.xml>

yout can do:

XmlObject xo = XmlObjectParser.parseFromFile("~/components.xml.in");
XmlObject checker = xo.get("system-integrity-checker.checker");

then it returns a single object as we only have one "checker" in xml stream,

or you still do

List<XmlObject> checkers = xo.getAsList("system-integrity-checker.checker");

it returns a list which only contains one element of "checker"

if you do:

XmlObject checker = xo.get("system-integrity-checker.checker.this_middle_element_doesnt_exist.some_element");

it returns a null without any exception, so you don't have to worry if a parent element is missing when getting a leaf element

again it's not a new wheel, I just hate JAVA xml api
2013-01-16 16:27:21 -08:00
Kelven Yang
727fab71cb Disable StorageProvider, storageType introduced in Javelin new code, temporarily, to make existing code run 2013-01-16 14:16:01 -08:00
Kelven Yang
4c1257bf18 Handle proxy object situation in dispatching API command 2013-01-16 11:28:09 -08:00
Min Chen
97cb16944f Merge branch 'master' into api_limit 2013-01-15 18:18:34 -08:00
Min Chen
8608925216 Consolidate RuntimeCloudException and CloudRuntimeException into one
class CloudRuntimeException, and removed RuntimeCloudException to avoid
confusion.
2013-01-15 18:07:08 -08:00
Min Chen
4355d06a86 Reuse APIChecker adapter interface for APi Rate limit checking and optimize ApiRateLimitService interface.
Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-15 15:53:19 -08:00