diff --git a/README.md b/README.md index 4a15a077363..f289dc3c400 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# CloudStack +# Apache CloudStack -CloudStack is a massively scalable free/libre open source Infrastructure as a Service cloud platform. +Apache CloudStack is a massively scalable free/libre open source Infrastructure as a Service cloud platform. Visit us at [cloudstack.org](http://cloudstack.org) or join #cloudstack on irc.freenode.net diff --git a/agent-simulator/.classpath b/agent-simulator/.classpath index ee1318d43f2..24edf1b5c6c 100644 --- a/agent-simulator/.classpath +++ b/agent-simulator/.classpath @@ -1,4 +1,22 @@ + diff --git a/agent-simulator/.project b/agent-simulator/.project index f3d551aaa5e..a51960fa4d9 100644 --- a/agent-simulator/.project +++ b/agent-simulator/.project @@ -1,4 +1,22 @@ + agent-simulator diff --git a/agent-simulator/db/create-schema-simulator.sql b/agent-simulator/db/create-schema-simulator.sql index 0b3a820b92d..09da344dc42 100644 --- a/agent-simulator/db/create-schema-simulator.sql +++ b/agent-simulator/db/create-schema-simulator.sql @@ -1,19 +1,19 @@ -# 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. +-- 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. DROP TABLE IF EXISTS `cloud`.`mockhost`; DROP TABLE IF EXISTS `cloud`.`mocksecstorage`; DROP TABLE IF EXISTS `cloud`.`mockstoragepool`; diff --git a/agent-simulator/scripts/run.bat b/agent-simulator/scripts/run.bat index b28bbc0b824..1138ce0cd2b 100644 --- a/agent-simulator/scripts/run.bat +++ b/agent-simulator/scripts/run.bat @@ -1,2 +1,19 @@ +rem - Licensed to the Apache Software Foundation (ASF) under one +rem - or more contributor license agreements. See the NOTICE file +rem - distributed with this work for additional information +rem - regarding copyright ownership. The ASF licenses this file +rem - to you under the Apache License, Version 2.0 (the +rem - "License"); you may not use this file except in compliance +rem - with the License. You may obtain a copy of the License at +rem - +rem - http://www.apache.org/licenses/LICENSE-2.0 +rem - +rem - Unless required by applicable law or agreed to in writing, +rem - software distributed under the License is distributed on an +rem - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +rem - KIND, either express or implied. See the License for the +rem - specific language governing permissions and limitations +rem - under the License. + java -cp cloud-utils.jar;agent-simulator.jar;log4j-1.2.15.jar;apache-log4j-extras-1.0.jar;ws-commons-util-1.0.2.jar;xmlrpc-client-3.1.3.jar;cloud-agent.jar;cloud-core.jar;xmlrpc-common-3.1.3.jar;javaee-api-5.0-1.jar;gson-1.3.jar;commons-httpclient-3.1.jar;commons-logging-1.1.1.jar;commons-codec-1.3.jar;commons-collections-3.2.1.jar;commons-pool-1.4.jar;.\;.\conf com.cloud.agent.AgentSimulator %* diff --git a/agent-simulator/scripts/zucchini/zucchini.configuration.sql b/agent-simulator/scripts/zucchini/zucchini.configuration.sql index f2c492ea189..34e135d4354 100644 --- a/agent-simulator/scripts/zucchini/zucchini.configuration.sql +++ b/agent-simulator/scripts/zucchini/zucchini.configuration.sql @@ -1,19 +1,20 @@ -# 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. +-- 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. + update configuration set value='pod' where name='network.dns.basiczone.updates'; update configuration set value='false' where name='use.user.concentrated.pod.allocation'; diff --git a/agent-simulator/tomcatconf/commands-simulator.properties.in b/agent-simulator/tomcatconf/commands-simulator.properties.in index cfc5feefd64..a0c13013c44 100644 --- a/agent-simulator/tomcatconf/commands-simulator.properties.in +++ b/agent-simulator/tomcatconf/commands-simulator.properties.in @@ -1 +1,19 @@ +# 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. + + configureSimulator=com.cloud.api.commands.ConfigureSimulator;1 diff --git a/agent-simulator/tomcatconf/components-simulator.xml.in b/agent-simulator/tomcatconf/components-simulator.xml.in index 011bc71892b..1b7df46ad2b 100755 --- a/agent-simulator/tomcatconf/components-simulator.xml.in +++ b/agent-simulator/tomcatconf/components-simulator.xml.in @@ -1,4 +1,22 @@ + diff --git a/agent/src/com/cloud/agent/Agent.java b/agent/src/com/cloud/agent/Agent.java index babf0b396d4..4bfd0765161 100755 --- a/agent/src/com/cloud/agent/Agent.java +++ b/agent/src/com/cloud/agent/Agent.java @@ -466,20 +466,17 @@ public class Agent implements HandlerFactory, IAgentControl { final Command cmd = cmds[i]; Answer answer; try { - if (s_logger.isDebugEnabled()) { - // this is a hack to make sure we do NOT log the ssh keys - if ((cmd instanceof ModifySshKeysCommand)) { - s_logger.debug("Received the request for command: ModifySshKeysCommand"); - } else { - if (!requestLogged) // ensures request is logged only once per method call - { - s_logger.debug("Request:" + request.toString()); - requestLogged = true; - } - } - - s_logger.debug("Processing command: " + cmd.toString()); - } + if (s_logger.isDebugEnabled()) { + if (!requestLogged) // ensures request is logged only once per method call + { + String requestMsg = request.toString(); + if (requestMsg != null) { + s_logger.debug("Request:" + requestMsg); + } + requestLogged = true; + } + s_logger.debug("Processing command: " + cmd.toString()); + } if (cmd instanceof CronCommand) { final CronCommand watch = (CronCommand) cmd; @@ -545,7 +542,10 @@ public class Agent implements HandlerFactory, IAgentControl { response = new Response(request, answers); } finally { if (s_logger.isDebugEnabled()) { - s_logger.debug(response != null ? response.toString() : "response is null"); + String responseMsg = response.toString(); + if (responseMsg != null) { + s_logger.debug(response.toString()); + } } if (response != null) { diff --git a/api/.classpath b/api/.classpath index e4179d9b408..f8a90fe0f9c 100644 --- a/api/.classpath +++ b/api/.classpath @@ -1,4 +1,22 @@ + diff --git a/api/.project b/api/.project index 0df4729c250..e70acd07f1f 100644 --- a/api/.project +++ b/api/.project @@ -1,4 +1,22 @@ + api diff --git a/api/src/com/cloud/api/commands/.gitignore b/api/src/com/cloud/api/commands/.gitignore index 4ef5c9c90a8..63e3fa0c721 100644 --- a/api/src/com/cloud/api/commands/.gitignore +++ b/api/src/com/cloud/api/commands/.gitignore @@ -1,3 +1,20 @@ +# 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. + /AddConfigCmd.java /UpdateZoneCmd.java /UpdateZoneCmd.java diff --git a/api/src/com/cloud/api/commands/CreateTagsCmd.java b/api/src/com/cloud/api/commands/CreateTagsCmd.java index 18adbaaeecb..d52c52fdd6b 100644 --- a/api/src/com/cloud/api/commands/CreateTagsCmd.java +++ b/api/src/com/cloud/api/commands/CreateTagsCmd.java @@ -6,7 +6,7 @@ // "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 +// 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 @@ -14,7 +14,7 @@ // 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.Collection; diff --git a/api/src/com/cloud/api/commands/DeleteTagsCmd.java b/api/src/com/cloud/api/commands/DeleteTagsCmd.java index 85295c81ef0..03f734523e2 100644 --- a/api/src/com/cloud/api/commands/DeleteTagsCmd.java +++ b/api/src/com/cloud/api/commands/DeleteTagsCmd.java @@ -6,7 +6,7 @@ // "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 +// 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 @@ -14,7 +14,7 @@ // 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.Collection; diff --git a/api/src/com/cloud/api/commands/ListTagsCmd.java b/api/src/com/cloud/api/commands/ListTagsCmd.java index ff496090ab4..7206b1c882c 100644 --- a/api/src/com/cloud/api/commands/ListTagsCmd.java +++ b/api/src/com/cloud/api/commands/ListTagsCmd.java @@ -6,7 +6,7 @@ // "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 +// 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 @@ -14,7 +14,7 @@ // 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; diff --git a/api/src/com/cloud/hypervisor/HypervisorCapabilities.java b/api/src/com/cloud/hypervisor/HypervisorCapabilities.java index d0fcf01cf16..f91da354c96 100644 --- a/api/src/com/cloud/hypervisor/HypervisorCapabilities.java +++ b/api/src/com/cloud/hypervisor/HypervisorCapabilities.java @@ -43,5 +43,8 @@ public interface HypervisorCapabilities { */ Long getMaxGuestsLimit(); - + /** + * @return the max. data volumes per VM supported by hypervisor + */ + Integer getMaxDataVolumesLimit(); } diff --git a/awsapi-setup/db/mysql/init_db.bat b/awsapi-setup/db/mysql/init_db.bat index b7296a6dd2f..6854ff30567 100644 --- a/awsapi-setup/db/mysql/init_db.bat +++ b/awsapi-setup/db/mysql/init_db.bat @@ -1,3 +1,20 @@ +rem Licensed to the Apache Software Foundation (ASF) under one +rem or more contributor license agreements. See the NOTICE file +rem distributed with this work for additional information +rem regarding copyright ownership. The ASF licenses this file +rem to you under the Apache License, Version 2.0 (the +rem "License"); you may not use this file except in compliance +rem with the License. You may obtain a copy of the License at +rem +rem http://www.apache.org/licenses/LICENSE-2.0 +rem +rem Unless required by applicable law or agreed to in writing, +rem software distributed under the License is distributed on an +rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +rem KIND, either express or implied. See the License for the +rem specific language governing permissions and limitations +rem under the License. + mysql --user=root --password < cloudbridge_db.sql mysql --user=root --password < cloudbridge_schema.sql mysql --user=root --password < cloudbridge_multipart.sql diff --git a/awsapi/.classpath b/awsapi/.classpath index ab9174cbbd4..e814eaefdc6 100644 --- a/awsapi/.classpath +++ b/awsapi/.classpath @@ -1,4 +1,22 @@ + diff --git a/awsapi/.project b/awsapi/.project index d602ee44c58..9ae990a1c4b 100644 --- a/awsapi/.project +++ b/awsapi/.project @@ -1,4 +1,22 @@ + awsapi diff --git a/awsapi/.pydevproject b/awsapi/.pydevproject index a9cca037b33..d4a984a3909 100644 --- a/awsapi/.pydevproject +++ b/awsapi/.pydevproject @@ -1,4 +1,22 @@ + diff --git a/awsapi/conf/CloudStack.cfg.xml b/awsapi/conf/CloudStack.cfg.xml index 3e0c42aab41..511e68f5210 100644 --- a/awsapi/conf/CloudStack.cfg.xml +++ b/awsapi/conf/CloudStack.cfg.xml @@ -1,4 +1,22 @@ + diff --git a/awsapi/conf/cloud-bridge.properties b/awsapi/conf/cloud-bridge.properties index 7bbba7f26bd..123c18d0c38 100644 --- a/awsapi/conf/cloud-bridge.properties +++ b/awsapi/conf/cloud-bridge.properties @@ -1,3 +1,20 @@ +# 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. + host=http://localhost:8080/awsapi storage.root=/Users/john1/S3-Mount storage.multipartDir=__multipart__uploads__ diff --git a/awsapi/conf/ec2-service.properties b/awsapi/conf/ec2-service.properties index fc3329b3dd5..40398cb01b2 100644 --- a/awsapi/conf/ec2-service.properties +++ b/awsapi/conf/ec2-service.properties @@ -1,3 +1,20 @@ +# 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. + managementServer=127.0.0.1 cloudAPIPort=7080 cloudstackVersion=2.2.0 diff --git a/awsapi/conf/hibernate.cfg.xml b/awsapi/conf/hibernate.cfg.xml index bc445bd4f1d..d484849fd07 100644 --- a/awsapi/conf/hibernate.cfg.xml +++ b/awsapi/conf/hibernate.cfg.xml @@ -1,4 +1,22 @@ + diff --git a/awsapi/docs/AmazonEC2/EC2-API-tool-setup.txt b/awsapi/docs/AmazonEC2/EC2-API-tool-setup.txt index d56a982eeb8..d75fcee61c1 100644 --- a/awsapi/docs/AmazonEC2/EC2-API-tool-setup.txt +++ b/awsapi/docs/AmazonEC2/EC2-API-tool-setup.txt @@ -1,3 +1,23 @@ +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. + +----------------------------------------------------------- + + 1. Get the EC2 API tool http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-62308.zip. Install it by unzipping it diff --git a/awsapi/docs/AmazonEC2/EC2-implementation-guide.html b/awsapi/docs/AmazonEC2/EC2-implementation-guide.html index 5caadf0a329..737c669dcbd 100644 --- a/awsapi/docs/AmazonEC2/EC2-implementation-guide.html +++ b/awsapi/docs/AmazonEC2/EC2-implementation-guide.html @@ -1,4 +1,22 @@ + Cloud.com's EC2 API Implementation Guide diff --git a/awsapi/docs/AmazonEC2/EC2-local-deploy-using-ant.html b/awsapi/docs/AmazonEC2/EC2-local-deploy-using-ant.html index ef0b3fc888b..215e5785c36 100644 --- a/awsapi/docs/AmazonEC2/EC2-local-deploy-using-ant.html +++ b/awsapi/docs/AmazonEC2/EC2-local-deploy-using-ant.html @@ -1,4 +1,22 @@ + Cloud.com's EC2 local deployment Guide diff --git a/awsapi/docs/AmazonEC2/EC2-users-guide.html b/awsapi/docs/AmazonEC2/EC2-users-guide.html index 1177689fa17..a51923cc89d 100644 --- a/awsapi/docs/AmazonEC2/EC2-users-guide.html +++ b/awsapi/docs/AmazonEC2/EC2-users-guide.html @@ -1,4 +1,22 @@ + Cloud.com's EC2 API User's Guide diff --git a/awsapi/docs/AmazonEC2/wsdl2java-command-line.txt b/awsapi/docs/AmazonEC2/wsdl2java-command-line.txt index 5aea3dd5feb..c1b68538e9d 100644 --- a/awsapi/docs/AmazonEC2/wsdl2java-command-line.txt +++ b/awsapi/docs/AmazonEC2/wsdl2java-command-line.txt @@ -1,2 +1,21 @@ +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. + +----------------------------------------------------------- + To generate the Java AXIS2 classes from the Amazon EC2 wsdl use the following command line: -C:\axis2-1.5.1\bin>wsdl2java.bat -ss -sd -ssi -g -p com.amazon.ec2 -ns2p "http://ec2.amazonaws.com/doc/2010-08-31/"=com.amazon.ec2 -uri ec2.wsdl \ No newline at end of file +C:\axis2-1.5.1\bin>wsdl2java.bat -ss -sd -ssi -g -p com.amazon.ec2 -ns2p "http://ec2.amazonaws.com/doc/2010-08-31/"=com.amazon.ec2 -uri ec2.wsdl diff --git a/awsapi/docs/AmazonS3/S3-users-guide.html b/awsapi/docs/AmazonS3/S3-users-guide.html index 124f89729af..adadd8b97fd 100644 --- a/awsapi/docs/AmazonS3/S3-users-guide.html +++ b/awsapi/docs/AmazonS3/S3-users-guide.html @@ -1,4 +1,22 @@ + Cloud.com's S3 API User's Guide @@ -99,4 +117,4 @@ SetObjectAccessControlPolicy
  • DIME
  • - \ No newline at end of file + diff --git a/awsapi/docs/AmazonS3/notes.txt b/awsapi/docs/AmazonS3/notes.txt index ce0f70fc851..e9a796880c9 100644 --- a/awsapi/docs/AmazonS3/notes.txt +++ b/awsapi/docs/AmazonS3/notes.txt @@ -1,3 +1,22 @@ +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. + +----------------------------------------------------------- + Example of headers for a rest call of copyObject Authorization: AWS Mark:djdjdjdjdjdjdjdj\n @@ -7,4 +26,4 @@ x-amz-metadata-directive: REPLACE\n x-amz-meta-hight: 55 feet\n x-amz-meta-width: 13 yards\n x-amz-meta-weight: 4 tons\n -x-amz-acl: public-read\n \ No newline at end of file +x-amz-acl: public-read\n diff --git a/awsapi/docs/AmazonS3/wsdl2java-command-line.txt b/awsapi/docs/AmazonS3/wsdl2java-command-line.txt index fbd134075b1..d22b8529502 100644 --- a/awsapi/docs/AmazonS3/wsdl2java-command-line.txt +++ b/awsapi/docs/AmazonS3/wsdl2java-command-line.txt @@ -1,3 +1,22 @@ +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. + +----------------------------------------------------------- + To generate the Java AXIS2 classes from the Amazon EC2 wsdl use the following command line, assuming source definitions in the local directory: $ wsdl2java.sh -ss -sd -ssi -g -p com.amazon.s3 -ns2p "http://s3.amazonaws.com/doc/2006-03-01/"=com.amazon.s3 -uri cloud-AmazonS3.wsdl diff --git a/awsapi/packages/config/debian/cloud-bridge.install b/awsapi/packages/config/debian/cloud-bridge.install index b3a4ceba50c..0f2f19fc92c 100644 --- a/awsapi/packages/config/debian/cloud-bridge.install +++ b/awsapi/packages/config/debian/cloud-bridge.install @@ -1,3 +1,20 @@ +# 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. + /usr/share/cloud/bridge/* /usr/share/cloud/setup/bridge/* /usr/bin/* diff --git a/awsapi/packages/config/debian/cloud-bridge.postinst b/awsapi/packages/config/debian/cloud-bridge.postinst index 5f04b275bba..5c62459e541 100644 --- a/awsapi/packages/config/debian/cloud-bridge.postinst +++ b/awsapi/packages/config/debian/cloud-bridge.postinst @@ -1,4 +1,21 @@ #!/bin/sh -e +# 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. + case "$1" in configure) diff --git a/awsapi/packages/config/rpm/cloudbridge.spec b/awsapi/packages/config/rpm/cloudbridge.spec index 42b7d4f7521..d3896b39a79 100644 --- a/awsapi/packages/config/rpm/cloudbridge.spec +++ b/awsapi/packages/config/rpm/cloudbridge.spec @@ -1,3 +1,20 @@ +# 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. + %define __os_install_post %{nil} %global debug_package %{nil} diff --git a/awsapi/resource/AmazonEC2/crypto.properties b/awsapi/resource/AmazonEC2/crypto.properties index 38589f09004..f55bea830b7 100644 --- a/awsapi/resource/AmazonEC2/crypto.properties +++ b/awsapi/resource/AmazonEC2/crypto.properties @@ -1,3 +1,21 @@ +# 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. + + org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin org.apache.ws.security.crypto.merlin.keystore.type=jks org.apache.ws.security.crypto.merlin.keystore.password=apache diff --git a/awsapi/scripts/run.bat b/awsapi/scripts/run.bat index 830f5c8260f..437a37f8b83 100644 --- a/awsapi/scripts/run.bat +++ b/awsapi/scripts/run.bat @@ -1 +1,18 @@ +rem Licensed to the Apache Software Foundation (ASF) under one +rem or more contributor license agreements. See the NOTICE file +rem distributed with this work for additional information +rem regarding copyright ownership. The ASF licenses this file +rem to you under the Apache License, Version 2.0 (the +rem "License"); you may not use this file except in compliance +rem with the License. You may obtain a copy of the License at +rem +rem http://www.apache.org/licenses/LICENSE-2.0 +rem +rem Unless required by applicable law or agreed to in writing, +rem software distributed under the License is distributed on an +rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +rem KIND, either express or implied. See the License for the +rem specific language governing permissions and limitations +rem under the License. + java -cp cloud-tool.jar;./lib/XmlSchema-1.4.3.jar;./lib/antlr-2.7.6.jar;./lib/apache-log4j-extras-1.0.jar;./lib/axiom-api-1.2.8.jar;./lib/axiom-impl-1.2.8.jar;./lib/axis2-adb-1.5.1.jar;./lib/axis2-ant-plugin-1.5.1.jar;./lib/axis2-jaxbri-1.5.1.jar;./lib/axis2-jaxws-1.5.1.jar;./lib/axis2-jibx-1.5.1.jar;./lib/axis2-json-1.5.1.jar;./lib/axis2-kernel-1.5.1.jar;./lib/axis2-transport-http-1.5.1.jar;./lib/axis2-transport-local-1.5.1.jar;./lib/commons-codec-1.3.jar;./lib/commons-collections-3.1.jar;./lib/commons-fileupload-1.2.jar;./lib/commons-httpclient-3.1.jar;./lib/commons-io-1.4.jar;./lib/commons-logging-1.1.1.jar;./lib/dom4j-1.6.1.jar;./lib/hibernate3.jar;./lib/httpcore-4.0.jar;./lib/javassist-3.9.0.GA.jar;./lib/jta-1.1.jar;./lib/junit-4.8.1.jar;./lib/log4j-1.2.15.jar;./lib/mail-1.4.jar;./lib/mysql-connector-java-5.1.7-bin.jar;./lib/neethi-2.0.4.jar;./lib/servlet-api.jar;./lib/slf4j-api-1.5.11.jar;./lib/slf4j-simple-1.5.11.jar;./lib/wsdl4j-1.6.2.jar com.cloud.gate.tool.CloudS3CmdTool %* diff --git a/awsapi/src/com/cloud/bridge/auth/ec2/module.xml b/awsapi/src/com/cloud/bridge/auth/ec2/module.xml index 0cbd8041083..545b8df6f58 100644 --- a/awsapi/src/com/cloud/bridge/auth/ec2/module.xml +++ b/awsapi/src/com/cloud/bridge/auth/ec2/module.xml @@ -1,4 +1,22 @@ + diff --git a/awsapi/src/com/cloud/bridge/auth/s3/module.xml b/awsapi/src/com/cloud/bridge/auth/s3/module.xml index cb22ed2bb4a..86ee25a9e67 100644 --- a/awsapi/src/com/cloud/bridge/auth/s3/module.xml +++ b/awsapi/src/com/cloud/bridge/auth/s3/module.xml @@ -1,4 +1,22 @@ + diff --git a/awsapi/src/com/cloud/bridge/model/MHost.hbm.xml b/awsapi/src/com/cloud/bridge/model/MHost.hbm.xml index f3d857a55ae..e151171ee9a 100644 --- a/awsapi/src/com/cloud/bridge/model/MHost.hbm.xml +++ b/awsapi/src/com/cloud/bridge/model/MHost.hbm.xml @@ -1,4 +1,22 @@ + diff --git a/awsapi/src/com/cloud/bridge/model/MHostMount.hbm.xml b/awsapi/src/com/cloud/bridge/model/MHostMount.hbm.xml index f2a6a769021..c186de56cc4 100644 --- a/awsapi/src/com/cloud/bridge/model/MHostMount.hbm.xml +++ b/awsapi/src/com/cloud/bridge/model/MHostMount.hbm.xml @@ -1,4 +1,22 @@ + diff --git a/awsapi/src/com/cloud/bridge/model/SAcl.hbm.xml b/awsapi/src/com/cloud/bridge/model/SAcl.hbm.xml index de9e97657cc..175e1a7808d 100644 --- a/awsapi/src/com/cloud/bridge/model/SAcl.hbm.xml +++ b/awsapi/src/com/cloud/bridge/model/SAcl.hbm.xml @@ -1,4 +1,22 @@ + diff --git a/awsapi/src/com/cloud/bridge/model/SBucket.hbm.xml b/awsapi/src/com/cloud/bridge/model/SBucket.hbm.xml index 128717935bb..83f495d9ad9 100644 --- a/awsapi/src/com/cloud/bridge/model/SBucket.hbm.xml +++ b/awsapi/src/com/cloud/bridge/model/SBucket.hbm.xml @@ -1,4 +1,22 @@ + diff --git a/awsapi/src/com/cloud/bridge/model/SHost.hbm.xml b/awsapi/src/com/cloud/bridge/model/SHost.hbm.xml index dff852c19af..5308a0837fd 100644 --- a/awsapi/src/com/cloud/bridge/model/SHost.hbm.xml +++ b/awsapi/src/com/cloud/bridge/model/SHost.hbm.xml @@ -1,4 +1,22 @@ + diff --git a/awsapi/src/com/cloud/bridge/model/SMeta.hbm.xml b/awsapi/src/com/cloud/bridge/model/SMeta.hbm.xml index e120884c30c..0f3b12be7f7 100644 --- a/awsapi/src/com/cloud/bridge/model/SMeta.hbm.xml +++ b/awsapi/src/com/cloud/bridge/model/SMeta.hbm.xml @@ -1,4 +1,22 @@ + diff --git a/awsapi/src/com/cloud/bridge/model/SObject.hbm.xml b/awsapi/src/com/cloud/bridge/model/SObject.hbm.xml index 194af330789..3929bcddad7 100644 --- a/awsapi/src/com/cloud/bridge/model/SObject.hbm.xml +++ b/awsapi/src/com/cloud/bridge/model/SObject.hbm.xml @@ -1,4 +1,22 @@ + diff --git a/awsapi/src/com/cloud/bridge/model/SObjectItem.hbm.xml b/awsapi/src/com/cloud/bridge/model/SObjectItem.hbm.xml index 12ee4807926..02297a2afff 100644 --- a/awsapi/src/com/cloud/bridge/model/SObjectItem.hbm.xml +++ b/awsapi/src/com/cloud/bridge/model/SObjectItem.hbm.xml @@ -1,4 +1,22 @@ + diff --git a/awsapi/src/com/cloud/bridge/model/UserCredentials.hbm.xml b/awsapi/src/com/cloud/bridge/model/UserCredentials.hbm.xml index c7f61273012..d2f39190556 100644 --- a/awsapi/src/com/cloud/bridge/model/UserCredentials.hbm.xml +++ b/awsapi/src/com/cloud/bridge/model/UserCredentials.hbm.xml @@ -1,4 +1,22 @@ + diff --git a/awsapi/src/com/cloud/stack/models/CloudStackAccount.hbm.xml b/awsapi/src/com/cloud/stack/models/CloudStackAccount.hbm.xml index 781c677986c..799679798d8 100644 --- a/awsapi/src/com/cloud/stack/models/CloudStackAccount.hbm.xml +++ b/awsapi/src/com/cloud/stack/models/CloudStackAccount.hbm.xml @@ -1,4 +1,22 @@ + diff --git a/awsapi/src/com/cloud/stack/models/CloudStackConfiguration.hbm.xml b/awsapi/src/com/cloud/stack/models/CloudStackConfiguration.hbm.xml index 33f84e1c1d7..134e6f10a3e 100644 --- a/awsapi/src/com/cloud/stack/models/CloudStackConfiguration.hbm.xml +++ b/awsapi/src/com/cloud/stack/models/CloudStackConfiguration.hbm.xml @@ -1,4 +1,22 @@ + diff --git a/awsapi/src/com/cloud/stack/models/CloudStackServiceOffering.hbm.xml b/awsapi/src/com/cloud/stack/models/CloudStackServiceOffering.hbm.xml index f8c9eed270f..2bbcfd16dc6 100644 --- a/awsapi/src/com/cloud/stack/models/CloudStackServiceOffering.hbm.xml +++ b/awsapi/src/com/cloud/stack/models/CloudStackServiceOffering.hbm.xml @@ -1,4 +1,22 @@ + diff --git a/awsapi/test/com/cloud/gate/util/Xml2JavaTestData.xml b/awsapi/test/com/cloud/gate/util/Xml2JavaTestData.xml index f8883839ef1..513db970e71 100644 --- a/awsapi/test/com/cloud/gate/util/Xml2JavaTestData.xml +++ b/awsapi/test/com/cloud/gate/util/Xml2JavaTestData.xml @@ -1,3 +1,21 @@ + baseName baseValue diff --git a/awsapi/test/html/certSubmit.html b/awsapi/test/html/certSubmit.html index 562cee10aaf..00cb5b7f882 100644 --- a/awsapi/test/html/certSubmit.html +++ b/awsapi/test/html/certSubmit.html @@ -1,4 +1,22 @@ + Save the cert into Cloud's EC2 Service:

    diff --git a/awsapi/test/html/testRestURL.txt b/awsapi/test/html/testRestURL.txt index bf4eb224f59..3153aa7715b 100644 --- a/awsapi/test/html/testRestURL.txt +++ b/awsapi/test/html/testRestURL.txt @@ -1,3 +1,22 @@ +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. + +----------------------------------------------------------- + http://localhost:8080/gate/rest/AmazonEC2?Action=DescribeInstances&SignatureVersion=2&SignatureMethod=HmacSHA256&Version=2009-11-30&Timestamp=2010-01-07T15%3A23%3A03Z&Expires=2010-11-07T15%3A23%3A03Z&AWSAccessKeyId=O4O0Niu98EvraLKH2o8SFNMQlXZvuE5ueMDR9CHU5WA2-qv4PEQkgMcrtrNs6eHYwpLySev4Hi03_YXiHz4gGg&Signature=lyHOvu2LNxjLHIAlQo3F0JNSDtuCtqHtAX786cCZDFI= @@ -22,4 +41,4 @@ rlQ5ioNns4iT9qav3WzmrQ | CN=AWS Limited-Assurance CA, OU=AWS, O=Amazon.com, C=US , serial=1033226874324 | +----+-------------------------------------------------------------------------- -EmskZDLp5EmwPQDzHtA2CK3heW12keN-YTTrO39Iz2Qfk8fmtkFih95B7xexhAatrlQ5ioNns4iT9qav3WzmrQ \ No newline at end of file +EmskZDLp5EmwPQDzHtA2CK3heW12keN-YTTrO39Iz2Qfk8fmtkFih95B7xexhAatrlQ5ioNns4iT9qav3WzmrQ diff --git a/awsapi/wscript b/awsapi/wscript index 873840e5d34..e4d0fd7e755 100644 --- a/awsapi/wscript +++ b/awsapi/wscript @@ -1,6 +1,23 @@ #! /usr/bin/env python # -*- coding: utf-8 -*- +# 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. + # the following two variables are used by the target "waf dist" # if you change 'em here, you need to change it also in cloud.spec, add a %changelog entry there, and add an entry in debian/changelog VERSION = '1.0.8' diff --git a/awsapi/wscript_build b/awsapi/wscript_build index 9b310dc3c49..aa1999c1652 100644 --- a/awsapi/wscript_build +++ b/awsapi/wscript_build @@ -1,4 +1,20 @@ #!/usr/bin/env python +# 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. """builds the entire stack""" #For every matching build change here, that produces new installable diff --git a/awsapi/wscript_configure b/awsapi/wscript_configure index 739a0823bd1..eb8949c145d 100644 --- a/awsapi/wscript_configure +++ b/awsapi/wscript_configure @@ -1,4 +1,21 @@ #!/usr/bin/env python +# 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. + """examines environment, then: - configures classpath as per environment or command-line options - detects Tomcat (on Windows) diff --git a/build.xml b/build.xml index 4b103b2e0a7..b013518ac72 100755 --- a/build.xml +++ b/build.xml @@ -1,6 +1,22 @@ - + This is the overall dispatch file. It includes other build diff --git a/build/.gitignore b/build/.gitignore index ca06b0abecc..d11410db1a5 100644 --- a/build/.gitignore +++ b/build/.gitignore @@ -1 +1,18 @@ +# 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. + /override diff --git a/build/.project b/build/.project index 3daec4ee567..7c021dbdcbb 100644 --- a/build/.project +++ b/build/.project @@ -1,4 +1,22 @@ + build diff --git a/build/build-aws-api.properties b/build/build-aws-api.properties index a45f1374aae..0a02d1b5579 100644 --- a/build/build-aws-api.properties +++ b/build/build-aws-api.properties @@ -1,3 +1,20 @@ +# 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. + company.major.version=1 company.minor.version=0 company.patch.version=8 diff --git a/build/build-cloud.properties b/build/build-cloud.properties index f5a5baf5ecf..552de7f74db 100755 --- a/build/build-cloud.properties +++ b/build/build-cloud.properties @@ -1,3 +1,20 @@ +# 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. + debug=true debuglevel=lines,source,vars debug.jvmarg=-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n diff --git a/build/cloud.properties b/build/cloud.properties index a50a9f13f06..65f04233dc0 100755 --- a/build/cloud.properties +++ b/build/cloud.properties @@ -1,3 +1,20 @@ +# 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. + # major.minor.patch versioning scheme for CloudStack company.major.version=3 company.minor.version=0 diff --git a/build/deploy/db/log4j.properties b/build/deploy/db/log4j.properties index 2cf1f24d2fc..a25bde40c7e 100644 --- a/build/deploy/db/log4j.properties +++ b/build/deploy/db/log4j.properties @@ -1,3 +1,20 @@ +# 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. + log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target=System.out log4j.appender.stdout.layout=org.apache.log4j.PatternLayout diff --git a/build/deploy/production/agent/storagehdpatch/etc/default/init b/build/deploy/production/agent/storagehdpatch/etc/default/init deleted file mode 100644 index 4ae34767422..00000000000 --- a/build/deploy/production/agent/storagehdpatch/etc/default/init +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -#ident "%Z%%M% %I% %E% SMI" -# -# This file is /etc/default/init. /etc/TIMEZONE is a symlink to this file. -# This file looks like a shell script, but it is not. To maintain -# compatibility with old versions of /etc/TIMEZONE, some shell constructs -# (i.e., export commands) are allowed in this file, but are ignored. -# -# Lines of this file should be of the form VAR=value, where VAR is one of -# TZ, LANG, CMASK, or any of the LC_* environment variables. value may -# be enclosed in double quotes (") or single quotes ('). -# -TZ=GMT -CMASK=022 -LANG=en_US.UTF-8 diff --git a/build/deploy/production/agent/storagehdpatch/etc/inet/ntp.conf b/build/deploy/production/agent/storagehdpatch/etc/inet/ntp.conf deleted file mode 100644 index 98fce148097..00000000000 --- a/build/deploy/production/agent/storagehdpatch/etc/inet/ntp.conf +++ /dev/null @@ -1,6 +0,0 @@ -driftfile /var/lib/ntp/ntp.drift - -server 0.pool.ntp.org -server 1.pool.ntp.org -server 2.pool.ntp.org -server 3.pool.ntp.org diff --git a/build/deploy/production/agent/storagehdpatch/etc/nsswitch.conf b/build/deploy/production/agent/storagehdpatch/etc/nsswitch.conf deleted file mode 100644 index 918d8f37e62..00000000000 --- a/build/deploy/production/agent/storagehdpatch/etc/nsswitch.conf +++ /dev/null @@ -1,70 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -#ident "%Z%%M% %I% %E% SMI" - -# -# /etc/nsswitch.dns: -# -# An example file that could be copied over to /etc/nsswitch.conf; it uses -# DNS for hosts lookups, otherwise it does not use any other naming service. -# -# "hosts:" and "services:" in this file are used only if the -# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports. - -# DNS service expects that an instance of svc:/network/dns/client be -# enabled and online. - -passwd: files -group: files - -# You must also set up the /etc/resolv.conf file for DNS name -# server lookup. See resolv.conf(4). For lookup via mdns -# svc:/network/dns/multicast:default must also be enabled. See mdnsd(1M) -hosts: files dns - -# Note that IPv4 addresses are searched for in all of the ipnodes databases -# before searching the hosts databases. -ipnodes: files dns - -networks: files -protocols: files -rpc: files -ethers: files -netmasks: files -bootparams: files -publickey: files -# At present there isn't a 'files' backend for netgroup; the system will -# figure it out pretty quickly, and won't use netgroups at all. -netgroup: files -automount: files -aliases: files -services: files -printers: user files - -auth_attr: files -prof_attr: files -project: files - -tnrhtp: files -tnrhdb: files diff --git a/build/deploy/production/agent/storagehdpatch/etc/ssh/sshd_config b/build/deploy/production/agent/storagehdpatch/etc/ssh/sshd_config deleted file mode 100644 index 2eb6853336a..00000000000 --- a/build/deploy/production/agent/storagehdpatch/etc/ssh/sshd_config +++ /dev/null @@ -1,154 +0,0 @@ -# -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# Configuration file for sshd(1m) - -# Protocol versions supported -# -# The sshd shipped in this release of Solaris has support for major versions -# 1 and 2. It is recommended due to security weaknesses in the v1 protocol -# that sites run only v2 if possible. Support for v1 is provided to help sites -# with existing ssh v1 clients/servers to transition. -# Support for v1 may not be available in a future release of Solaris. -# -# To enable support for v1 an RSA1 key must be created with ssh-keygen(1). -# RSA and DSA keys for protocol v2 are created by /etc/init.d/sshd if they -# do not already exist, RSA1 keys for protocol v1 are not automatically created. - -# Uncomment ONLY ONE of the following Protocol statements. - -# Only v2 (recommended) -Protocol 2 - -# Both v1 and v2 (not recommended) -#Protocol 2,1 - -# Only v1 (not recommended) -#Protocol 1 - -# Listen port (the IANA registered port number for ssh is 22) -Port 22 - -# The default listen address is all interfaces, this may need to be changed -# if you wish to restrict the interfaces sshd listens on for a multi homed host. -# Multiple ListenAddress entries are allowed. - -# IPv4 only -#ListenAddress 0.0.0.0 -# IPv4 & IPv6 -ListenAddress :: - -# Port forwarding -AllowTcpForwarding no - -# If port forwarding is enabled, specify if the server can bind to INADDR_ANY. -# This allows the local port forwarding to work when connections are received -# from any remote host. -GatewayPorts no - -# X11 tunneling options -X11Forwarding yes -X11DisplayOffset 10 -X11UseLocalhost yes - -# The maximum number of concurrent unauthenticated connections to sshd. -# start:rate:full see sshd(1) for more information. -# The default is 10 unauthenticated clients. -#MaxStartups 10:30:60 - -# Banner to be printed before authentication starts. -#Banner /etc/issue - -# Should sshd print the /etc/motd file and check for mail. -# On Solaris it is assumed that the login shell will do these (eg /etc/profile). -PrintMotd no - -# KeepAlive specifies whether keep alive messages are sent to the client. -# See sshd(1) for detailed description of what this means. -# Note that the client may also be sending keep alive messages to the server. -KeepAlive yes - -# Syslog facility and level -SyslogFacility auth -LogLevel info - -# -# Authentication configuration -# - -# Host private key files -# Must be on a local disk and readable only by the root user (root:sys 600). -HostKey /etc/ssh/ssh_host_rsa_key -HostKey /etc/ssh/ssh_host_dsa_key - -# Length of the server key -# Default 768, Minimum 512 -ServerKeyBits 768 - -# sshd regenerates the key every KeyRegenerationInterval seconds. -# The key is never stored anywhere except the memory of sshd. -# The default is 1 hour (3600 seconds). -KeyRegenerationInterval 3600 - -# Ensure secure permissions on users .ssh directory. -StrictModes yes - -# Length of time in seconds before a client that hasn't completed -# authentication is disconnected. -# Default is 600 seconds. 0 means no time limit. -LoginGraceTime 600 - -# Maximum number of retries for authentication -# Default is 6. Default (if unset) for MaxAuthTriesLog is MaxAuthTries / 2 -MaxAuthTries 6 -MaxAuthTriesLog 3 - -# Are logins to accounts with empty passwords allowed. -# If PermitEmptyPasswords is no, pass PAM_DISALLOW_NULL_AUTHTOK -# to pam_authenticate(3PAM). -PermitEmptyPasswords no - -# To disable tunneled clear text passwords, change PasswordAuthentication to no. -PasswordAuthentication yes - -# Use PAM via keyboard interactive method for authentication. -# Depending on the setup of pam.conf(4) this may allow tunneled clear text -# passwords even when PasswordAuthentication is set to no. This is dependent -# on what the individual modules request and is out of the control of sshd -# or the protocol. -PAMAuthenticationViaKBDInt yes - -# Are root logins permitted using sshd. -# Note that sshd uses pam_authenticate(3PAM) so the root (or any other) user -# maybe denied access by a PAM module regardless of this setting. -# Valid options are yes, without-password, no. -PermitRootLogin yes - -# sftp subsystem -Subsystem sftp /usr/lib/ssh/sftp-server - - -# SSH protocol v1 specific options -# -# The following options only apply to the v1 protocol and provide -# some form of backwards compatibility with the very weak security -# of /usr/bin/rsh. Their use is not recommended and the functionality -# will be removed when support for v1 protocol is removed. - -# Should sshd use .rhosts and .shosts for password less authentication. -IgnoreRhosts yes -RhostsAuthentication no - -# Rhosts RSA Authentication -# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts. -# If the user on the client side is not root then this won't work on -# Solaris since /usr/bin/ssh is not installed setuid. -RhostsRSAAuthentication no - -# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication. -#IgnoreUserKnownHosts yes - -# Is pure RSA authentication allowed. -# Default is yes -RSAAuthentication yes diff --git a/build/deploy/production/agent/storagehdpatch/etc/system b/build/deploy/production/agent/storagehdpatch/etc/system deleted file mode 100644 index 0ede11570c3..00000000000 --- a/build/deploy/production/agent/storagehdpatch/etc/system +++ /dev/null @@ -1,101 +0,0 @@ -*ident "%Z%%M% %I% %E% SMI" /* SVR4 1.5 */ -* -* CDDL HEADER START -* -* The contents of this file are subject to the terms of the -* Common Development and Distribution License, Version 1.0 only -* (the "License"). You may not use this file except in compliance -* with the License. -* -* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -* or http://www.opensolaris.org/os/licensing. -* See the License for the specific language governing permissions -* and limitations under the License. -* -* When distributing Covered Code, include this CDDL HEADER in each -* file and include the License file at usr/src/OPENSOLARIS.LICENSE. -* If applicable, add the following below this CDDL HEADER, with the -* fields enclosed by brackets "[]" replaced with your own identifying -* information: Portions Copyright [yyyy] [name of copyright owner] -* -* CDDL HEADER END -* -* -* SYSTEM SPECIFICATION FILE -* - -* moddir: -* -* Set the search path for modules. This has a format similar to the -* csh path variable. If the module isn't found in the first directory -* it tries the second and so on. The default is /kernel /usr/kernel -* -* Example: -* moddir: /kernel /usr/kernel /other/modules - - - -* root device and root filesystem configuration: -* -* The following may be used to override the defaults provided by -* the boot program: -* -* rootfs: Set the filesystem type of the root. -* -* rootdev: Set the root device. This should be a fully -* expanded physical pathname. The default is the -* physical pathname of the device where the boot -* program resides. The physical pathname is -* highly platform and configuration dependent. -* -* Example: -* rootfs:ufs -* rootdev:/sbus@1,f8000000/esp@0,800000/sd@3,0:a -* -* (Swap device configuration should be specified in /etc/vfstab.) - - - -* exclude: -* -* Modules appearing in the moddir path which are NOT to be loaded, -* even if referenced. Note that `exclude' accepts either a module name, -* or a filename which includes the directory. -* -* Examples: -* exclude: win -* exclude: sys/shmsys - - - -* forceload: -* -* Cause these modules to be loaded at boot time, (just before mounting -* the root filesystem) rather than at first reference. Note that -* forceload expects a filename which includes the directory. Also -* note that loading a module does not necessarily imply that it will -* be installed. -* -* Example: -* forceload: drv/foo - - - -* set: -* -* Set an integer variable in the kernel or a module to a new value. -* This facility should be used with caution. See system(4). -* -* Examples: -* -* To set variables in 'unix': -* -* set nautopush=32 -* set maxusers=40 -* -* To set a variable named 'debug' in the module named 'test_module' -* -* set test_module:debug = 0x13 - -* set zfs:zfs_arc_max=0x4002000 -set zfs:zfs_vdev_cache_size=0 diff --git a/build/deploy/production/agent/storagehdpatch/etc/vmops/disks.properties b/build/deploy/production/agent/storagehdpatch/etc/vmops/disks.properties deleted file mode 100644 index 0baf045e360..00000000000 --- a/build/deploy/production/agent/storagehdpatch/etc/vmops/disks.properties +++ /dev/null @@ -1,6 +0,0 @@ -# Specify disks in this file -# D: Data -# C: Cache -# L: Intent Log -# S: Spare -# U: Unused diff --git a/build/deploy/production/agent/storagehdpatch/etc/vmops/network.properties b/build/deploy/production/agent/storagehdpatch/etc/vmops/network.properties deleted file mode 100644 index 68485fb29ec..00000000000 --- a/build/deploy/production/agent/storagehdpatch/etc/vmops/network.properties +++ /dev/null @@ -1,34 +0,0 @@ -# Host Settings -hostname= -domain= -dns1= -dns2= - -# Private/Storage Network Settings (required) -storage.ip= -storage.netmask= -storage.gateway= - -# Second Storage Network Settings (optional) -storage.ip.2= -storage.netmask.2= -storage.gateway.2= - -# Datacenter Settings -pod= -zone= -host= -port= - -# Storage Appliance Settings (optional) -# Specify if you would like to use this Storage Server with an external storage appliance) -iscsi.iqn= -iscsi.ip= -iscsi.port= - -# VMOps IQN (optional) -# Specify if you would like to manually change the IQN of the Storage Server's iSCSI target -vmops.iqn= - -# MTU (optional) -mtu= diff --git a/build/deploy/production/agent/storagehdpatch/lib/svc/method/vmops b/build/deploy/production/agent/storagehdpatch/lib/svc/method/vmops deleted file mode 100755 index 6ffde744ff3..00000000000 --- a/build/deploy/production/agent/storagehdpatch/lib/svc/method/vmops +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/bash -# -# vmops - Script to start and stop the VMOps Agent. -# -# 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. -# -# Author: Chiradeep Vittal -# chkconfig: 2345 99 01 -# description: Start up the VMOps agent - -# Source function library. -if [ -f /etc/init.d/functions ] -then - . /etc/init.d/functions -fi - -_success() { - if [ -f /etc/init.d/functions ] - then - success - else - echo "Success" - fi -} - -_failure() { - if [ -f /etc/init.d/functions ] - then - failure - else - echo "Failed" - fi -} -RETVAL=$? -VMOPS_HOME="/usr/local/vmops" - -mkdir -p /var/log/vmops - -get_pids() { - local i - for i in $(ps -ef | grep agent.sh | grep -v grep | awk '{print $2}'); - do - echo $(pwdx $i) | grep "$VMOPS_HOME" | grep agent | awk -F: '{print $1}'; - done -} - -start() { - local pid=$(get_pids) - echo -n "Starting VMOps agent: " - if [ -f $VMOPS_HOME/agent/agent.sh ]; - then - if [ "$pid" == "" ] - then - (cd $VMOPS_HOME/agent; nohup ./agent.sh > /var/log/vmops/vmops.out 2>&1 & ) - pid=$(get_pids) - echo $pid > /var/run/vmops.pid - fi - _success - else - _failure - fi - echo -} - -stop() { - local pid - echo -n "Stopping VMOps agent: " - for pid in $(get_pids) - do - pgid=$(ps -o pgid -p $pid | tr '\n' ' ' | awk '{print $2}') - pgid=${pgid## } - pgid=${pgid%% } - kill -- -$pgid - done - rm /var/run/vmops.pid - _success - echo -} - -status() { - local pids=$(get_pids) - if [ "$pids" == "" ] - then - echo "VMOps agent is not running" - return 1 - fi - echo "VMOps agent (pid $pids) is running" - return 0 -} - - -case "$1" in - start) start - ;; - stop) stop - ;; - status) status - ;; - restart) stop - sleep 1.5 - start - ;; - *) echo $"Usage: $0 {start|stop|status|restart}" - exit 1 - ;; -esac - -exit $RETVAL diff --git a/build/deploy/production/agent/storagehdpatch/usr/sbin/vsetup b/build/deploy/production/agent/storagehdpatch/usr/sbin/vsetup deleted file mode 100755 index 44bacf85d2e..00000000000 --- a/build/deploy/production/agent/storagehdpatch/usr/sbin/vsetup +++ /dev/null @@ -1,59 +0,0 @@ -#! /bin/bash -# -# 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. - -stage=$1 -option=$2 - -export VMOPS_HOME=/usr/local/vmops - -usage() { - echo "Usage: vsetup [networking|zpool]" - echo " networking: probe NICs, configure networking, and detect disks" - echo " zpool: create ZFS storage pool" -} - -if [ "$stage" != "networking" ] && [ "$stage" != "zpool" ] && [ "$stage" != "detectdisks" ] -then - usage - exit 1 -fi - -if [ "$option" != "" ] && [ "$option" != "-listonly" ] -then - usage - exit 1 -fi - -$VMOPS_HOME/agent/scripts/installer/run_installer.sh storage $stage $option - -if [ $? -eq 0 ] -then - if [ "$stage" == "networking" ] - then - echo "Please edit /etc/vmops/disks.properties and then run \"vsetup zpool\"." - else - if [ "$stage" == "zpool" ] - then - echo "Press enter to reboot the computer..." - read - reboot - fi - fi -fi - - - diff --git a/build/deploy/production/agent/storagehdpatch/var/svc/manifest/application/cloud.xml b/build/deploy/production/agent/storagehdpatch/var/svc/manifest/application/cloud.xml deleted file mode 100644 index dc85bb2e48c..00000000000 --- a/build/deploy/production/agent/storagehdpatch/var/svc/manifest/application/cloud.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/deploy/production/consoleproxy/conf/consoleproxy.properties b/build/deploy/production/consoleproxy/conf/consoleproxy.properties index 7639ccc5a4d..a3cddbcab96 100644 --- a/build/deploy/production/consoleproxy/conf/consoleproxy.properties +++ b/build/deploy/production/consoleproxy/conf/consoleproxy.properties @@ -1,3 +1,20 @@ +# 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. + consoleproxy.tcpListenPort=0 consoleproxy.httpListenPort=80 consoleproxy.httpCmdListenPort=8001 diff --git a/build/deploy/production/server/conf/agent-update.properties b/build/deploy/production/server/conf/agent-update.properties index 6b42aa8b6f5..2238fa77bbe 100644 --- a/build/deploy/production/server/conf/agent-update.properties +++ b/build/deploy/production/server/conf/agent-update.properties @@ -1 +1,18 @@ +# 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. + agent.minimal.version=@agent.min.version@ diff --git a/build/developer.xml b/build/developer.xml index f9c581e52c0..bfe496d70c9 100755 --- a/build/developer.xml +++ b/build/developer.xml @@ -35,6 +35,7 @@ + @@ -318,7 +319,7 @@ - + @@ -347,7 +348,7 @@ - + @@ -374,7 +375,7 @@ - + diff --git a/build/overview.html b/build/overview.html index 5837e5e2841..22f349fe10b 100755 --- a/build/overview.html +++ b/build/overview.html @@ -1,6 +1,23 @@ - + diff --git a/build/replace.properties b/build/replace.properties index 5296a775407..8cd0fa3c76c 100644 --- a/build/replace.properties +++ b/build/replace.properties @@ -1,3 +1,20 @@ +# 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. + DBUSER=cloud DBPW=cloud DBROOTPW= diff --git a/build/simulator.properties b/build/simulator.properties index 80fe90dc35a..d65d05c65be 100644 --- a/build/simulator.properties +++ b/build/simulator.properties @@ -1,3 +1,20 @@ +# 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. + DBUSER=cloud DBPW=cloud MSLOG=vmops.log diff --git a/client/.classpath b/client/.classpath index 482331db8d7..32ebb2295f4 100644 --- a/client/.classpath +++ b/client/.classpath @@ -1,4 +1,22 @@ + diff --git a/client/.project b/client/.project index 964f331eca4..7c8752f6f0c 100644 --- a/client/.project +++ b/client/.project @@ -1,4 +1,22 @@ + client client project diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties index 0ce3d4442c4..4e734e52533 100644 --- a/client/WEB-INF/classes/resources/messages.properties +++ b/client/WEB-INF/classes/resources/messages.properties @@ -1,3 +1,21 @@ +# 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. + + #new labels (begin) ********************************************************************************************** label.action.enable.physical.network=Enable physical network label.action.disable.physical.network=Disable physical network @@ -7,6 +25,7 @@ message.action.disable.physical.network=Please confirm that you want to disable #modified labels (begin) ***************************************************************************************** +label.network.domain.text=Network domain label.memory.mb=Memory (in MB) label.cpu.mhz=CPU (in MHz) #modified labels (end) ******************************************************************************************* @@ -296,7 +315,6 @@ label.stickiness=Stickiness label.source=Source label.least.connections=Least connections label.round.robin=Round-robin -label.network.domain.text=Network domain text label.restart.required=Restart required label.clean.up=Clean up message.restart.network=Please confirm that you want to restart network diff --git a/client/WEB-INF/classes/resources/messages_es.properties b/client/WEB-INF/classes/resources/messages_es.properties index 5b4ff32e0f1..a76fce6c5ed 100644 --- a/client/WEB-INF/classes/resources/messages_es.properties +++ b/client/WEB-INF/classes/resources/messages_es.properties @@ -1,3 +1,20 @@ +# 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. + #cloudstack 3.0 (begin) ******************************************************************************************** create.template.confirm = Por favor, confirme que desea crear una plantilla create.template.success = Nueva plantilla se está creando @@ -863,4 +880,4 @@ error.menu.select = No se puede realizar la acción debido a que no los artícul error.mgmt.server.inaccessible = El Servidor de Gestión es inaccesible. Por favor, inténtelo de nuevo más tarde. error.session.expired = Su sesión ha caducado. error.unresolved.internet.name = El nombre de Internet no se puede resolver. -#cloudstack 2.2.Y (end) ******************************************************************************************** \ No newline at end of file +#cloudstack 2.2.Y (end) ******************************************************************************************** diff --git a/client/WEB-INF/classes/resources/messages_ja.properties b/client/WEB-INF/classes/resources/messages_ja.properties index ea9c1d16fd9..20cb7e9cfa7 100644 --- a/client/WEB-INF/classes/resources/messages_ja.properties +++ b/client/WEB-INF/classes/resources/messages_ja.properties @@ -1,3 +1,20 @@ +# 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. + #new labels (begin) ********************************************************************************************** diff --git a/client/WEB-INF/classes/resources/messages_zh_CN.properties b/client/WEB-INF/classes/resources/messages_zh_CN.properties index 4640f669555..17ae13d6c34 100644 --- a/client/WEB-INF/classes/resources/messages_zh_CN.properties +++ b/client/WEB-INF/classes/resources/messages_zh_CN.properties @@ -1,3 +1,20 @@ +# 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. + #new labels (begin) ********************************************************************************************** diff --git a/client/bindir/cloud-setup-management.in b/client/bindir/cloud-setup-management.in index c82f7407318..469c9614b41 100755 --- a/client/bindir/cloud-setup-management.in +++ b/client/bindir/cloud-setup-management.in @@ -1,4 +1,21 @@ #!/usr/bin/python +# 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. + from cloudutils.syscfg import sysConfigFactory from cloudutils.utilities import initLoging from cloudutils.cloudException import CloudRuntimeException, CloudInternalException diff --git a/client/bindir/cloud-update-xenserver-licenses.in b/client/bindir/cloud-update-xenserver-licenses.in index 94b8e3e8ceb..c64bc8f7c0b 100755 --- a/client/bindir/cloud-update-xenserver-licenses.in +++ b/client/bindir/cloud-update-xenserver-licenses.in @@ -1,5 +1,22 @@ #!/usr/bin/python -W ignore::DeprecationWarning # -*- coding: utf-8 -*- +# 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. + import os import sys diff --git a/client/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-management.in b/client/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-management.in index df57c45aa3d..3f073f9be17 100755 --- a/client/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-management.in +++ b/client/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-management.in @@ -1,4 +1,20 @@ #!/bin/bash +# 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@-management This shell script takes care of starting and stopping Tomcat # diff --git a/client/distro/centos/SYSCONFDIR/sysconfig/cloud-management.in b/client/distro/centos/SYSCONFDIR/sysconfig/cloud-management.in index 2d4b22f4bff..d22a6d5adc2 100644 --- a/client/distro/centos/SYSCONFDIR/sysconfig/cloud-management.in +++ b/client/distro/centos/SYSCONFDIR/sysconfig/cloud-management.in @@ -1,3 +1,20 @@ +# 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 file is loaded in /etc/init.d/vmopsmanagement # ATM we only do two things here: diff --git a/client/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-management.in b/client/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-management.in index e168a124a72..bbc46932738 100755 --- a/client/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-management.in +++ b/client/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-management.in @@ -1,4 +1,20 @@ #!/bin/bash +# 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@-management This shell script takes care of starting and stopping Tomcat # diff --git a/client/distro/fedora/SYSCONFDIR/sysconfig/cloud-management.in b/client/distro/fedora/SYSCONFDIR/sysconfig/cloud-management.in index 2d4b22f4bff..d22a6d5adc2 100644 --- a/client/distro/fedora/SYSCONFDIR/sysconfig/cloud-management.in +++ b/client/distro/fedora/SYSCONFDIR/sysconfig/cloud-management.in @@ -1,3 +1,20 @@ +# 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 file is loaded in /etc/init.d/vmopsmanagement # ATM we only do two things here: diff --git a/client/distro/opensuse/SYSCONFDIR/sysconfig/cloud-management.in b/client/distro/opensuse/SYSCONFDIR/sysconfig/cloud-management.in index 2d4b22f4bff..d22a6d5adc2 100644 --- a/client/distro/opensuse/SYSCONFDIR/sysconfig/cloud-management.in +++ b/client/distro/opensuse/SYSCONFDIR/sysconfig/cloud-management.in @@ -1,3 +1,20 @@ +# 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 file is loaded in /etc/init.d/vmopsmanagement # ATM we only do two things here: diff --git a/client/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-management.in b/client/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-management.in index aee0e1c27a0..b0be89e8186 100644 --- a/client/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-management.in +++ b/client/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-management.in @@ -1,4 +1,20 @@ #!/bin/bash +# 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@-management This shell script takes care of starting and stopping Tomcat # diff --git a/client/distro/rhel/SYSCONFDIR/sysconfig/cloud-management.in b/client/distro/rhel/SYSCONFDIR/sysconfig/cloud-management.in index 2d4b22f4bff..d22a6d5adc2 100644 --- a/client/distro/rhel/SYSCONFDIR/sysconfig/cloud-management.in +++ b/client/distro/rhel/SYSCONFDIR/sysconfig/cloud-management.in @@ -1,3 +1,20 @@ +# 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 file is loaded in /etc/init.d/vmopsmanagement # ATM we only do two things here: diff --git a/client/distro/sles/SYSCONFDIR/sysconfig/cloud-management.in b/client/distro/sles/SYSCONFDIR/sysconfig/cloud-management.in index 2d4b22f4bff..d22a6d5adc2 100644 --- a/client/distro/sles/SYSCONFDIR/sysconfig/cloud-management.in +++ b/client/distro/sles/SYSCONFDIR/sysconfig/cloud-management.in @@ -1,3 +1,20 @@ +# 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 file is loaded in /etc/init.d/vmopsmanagement # ATM we only do two things here: diff --git a/client/tomcatconf/cisconexusvsm_commands.properties.in b/client/tomcatconf/cisconexusvsm_commands.properties.in index 17b9c793223..f6db0d9a9f0 100644 --- a/client/tomcatconf/cisconexusvsm_commands.properties.in +++ b/client/tomcatconf/cisconexusvsm_commands.properties.in @@ -1,3 +1,20 @@ +# 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. + ### bitmap of permissions at the end of each classname, 1 = ADMIN, 2 = RESOURCE_DOMAIN_ADMIN, 4 = DOMAIN_ADMIN, 8 = USER ### Please standardize naming conventions to camel-case (even for acronyms). diff --git a/client/tomcatconf/classpath.conf.in b/client/tomcatconf/classpath.conf.in index ca07103e75b..3ae0fb4d778 100644 --- a/client/tomcatconf/classpath.conf.in +++ b/client/tomcatconf/classpath.conf.in @@ -1,4 +1,20 @@ #!/bin/bash +# 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. SYSTEMJARS="@SYSTEMJARS@" SCP=$(build-classpath $SYSTEMJARS 2>/dev/null) ; if [ $? != 0 ] ; then export SCP="@SYSTEMCLASSPATH@" ; fi diff --git a/client/tomcatconf/commands-ext.properties.in b/client/tomcatconf/commands-ext.properties.in index 682e0887fbf..7e009e6fe29 100644 --- a/client/tomcatconf/commands-ext.properties.in +++ b/client/tomcatconf/commands-ext.properties.in @@ -1,3 +1,20 @@ +# 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. + #### usage commands generateUsageRecords=com.cloud.api.commands.GenerateUsageRecordsCmd;1 listUsageRecords=com.cloud.api.commands.GetUsageRecordsCmd;1 diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in index ce61a22ef7c..13387d8d201 100755 --- a/client/tomcatconf/commands.properties.in +++ b/client/tomcatconf/commands.properties.in @@ -1,3 +1,20 @@ +# 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. + ### bitmap of permissions at the end of each classname, 1 = ADMIN, 2 = RESOURCE_DOMAIN_ADMIN, 4 = DOMAIN_ADMIN, 8 = USER ### Please standardize naming conventions to camel-case (even for acronyms). diff --git a/client/tomcatconf/components-cloudzones.xml.in b/client/tomcatconf/components-cloudzones.xml.in index 0ca02e2035c..4bd39108e1f 100755 --- a/client/tomcatconf/components-cloudzones.xml.in +++ b/client/tomcatconf/components-cloudzones.xml.in @@ -1,4 +1,22 @@ + diff --git a/client/tomcatconf/components.xml.in b/client/tomcatconf/components.xml.in index 09a5a87d4a4..beaac13d922 100755 --- a/client/tomcatconf/components.xml.in +++ b/client/tomcatconf/components.xml.in @@ -1,4 +1,22 @@ + diff --git a/client/tomcatconf/environment.properties.in b/client/tomcatconf/environment.properties.in index f7b5afd8f9e..b89e2b69eab 100644 --- a/client/tomcatconf/environment.properties.in +++ b/client/tomcatconf/environment.properties.in @@ -1,3 +1,20 @@ +# 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. + # management server compile-time environment parameters paths.script=@AGENTLIBDIR@ diff --git a/client/tomcatconf/f5bigip_commands.properties.in b/client/tomcatconf/f5bigip_commands.properties.in index 69e16949556..e48bd482d20 100644 --- a/client/tomcatconf/f5bigip_commands.properties.in +++ b/client/tomcatconf/f5bigip_commands.properties.in @@ -1,3 +1,20 @@ +# 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. + ### bitmap of permissions at the end of each classname, 1 = ADMIN, 2 = RESOURCE_DOMAIN_ADMIN, 4 = DOMAIN_ADMIN, 8 = USER ### Please standardize naming conventions to camel-case (even for acronyms). diff --git a/client/tomcatconf/junipersrx_commands.properties.in b/client/tomcatconf/junipersrx_commands.properties.in index 50c3335f711..57fd0893ce0 100644 --- a/client/tomcatconf/junipersrx_commands.properties.in +++ b/client/tomcatconf/junipersrx_commands.properties.in @@ -1,3 +1,20 @@ +# 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. + ### bitmap of permissions at the end of each classname, 1 = ADMIN, 2 = RESOURCE_DOMAIN_ADMIN, 4 = DOMAIN_ADMIN, 8 = USER ### Please standardize naming conventions to camel-case (even for acronyms). diff --git a/client/tomcatconf/log4j-cloud.xml.in b/client/tomcatconf/log4j-cloud.xml.in index 8af720231aa..6c7f29d0162 100755 --- a/client/tomcatconf/log4j-cloud.xml.in +++ b/client/tomcatconf/log4j-cloud.xml.in @@ -1,4 +1,22 @@ + diff --git a/client/tomcatconf/netscalerloadbalancer_commands.properties.in b/client/tomcatconf/netscalerloadbalancer_commands.properties.in index e841a1a8ba3..114e7d37cca 100644 --- a/client/tomcatconf/netscalerloadbalancer_commands.properties.in +++ b/client/tomcatconf/netscalerloadbalancer_commands.properties.in @@ -1,3 +1,20 @@ +# 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. + ### bitmap of permissions at the end of each classname, 1 = ADMIN, 2 = RESOURCE_DOMAIN_ADMIN, 4 = DOMAIN_ADMIN, 8 = USER ### Please standardize naming conventions to camel-case (even for acronyms). diff --git a/client/tomcatconf/nicira-nvp_commands.properties.in b/client/tomcatconf/nicira-nvp_commands.properties.in index 8e749d6bf29..3a934adef67 100644 --- a/client/tomcatconf/nicira-nvp_commands.properties.in +++ b/client/tomcatconf/nicira-nvp_commands.properties.in @@ -1,3 +1,20 @@ +# 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. + ### bitmap of permissions at the end of each classname, 1 = ADMIN, 2 = RESOURCE_DOMAIN_ADMIN, 4 = DOMAIN_ADMIN, 8 = USER ### Please standardize naming conventions to camel-case (even for acronyms). @@ -9,4 +26,4 @@ listNiciraNvpDevices = com.cloud.api.commands.ListNiciraNvpDevicesCmd;1 listNiciraNvpDeviceNetworks = com.cloud.api.commands.ListNiciraNvpDeviceNetworksCmd;1 # Not implemented (yet) -#configureNiciraNvpDevice = com.cloud.api.commands.ConfigureNiciraNvpDeviceCmd;1 \ No newline at end of file +#configureNiciraNvpDevice = com.cloud.api.commands.ConfigureNiciraNvpDeviceCmd;1 diff --git a/client/tomcatconf/simulator.properties.in b/client/tomcatconf/simulator.properties.in index e515cacd4e1..24e5e627c71 100644 --- a/client/tomcatconf/simulator.properties.in +++ b/client/tomcatconf/simulator.properties.in @@ -1,3 +1,20 @@ +# 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. + host=127.0.0.1 port=8250 workers=3 @@ -11,4 +28,4 @@ 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 \ No newline at end of file +property.scan.interval=300 diff --git a/client/tomcatconf/tomcat6-nonssl.conf.in b/client/tomcatconf/tomcat6-nonssl.conf.in index f571fc99039..c9342e0acae 100644 --- a/client/tomcatconf/tomcat6-nonssl.conf.in +++ b/client/tomcatconf/tomcat6-nonssl.conf.in @@ -1,4 +1,21 @@ #!/usr/bin/env bash +# 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. + # System-wide configuration file for tomcat6 services # This will be sourced by tomcat6 and any secondary service diff --git a/client/tomcatconf/tomcat6-ssl.conf.in b/client/tomcatconf/tomcat6-ssl.conf.in index da03a7d18b3..ddca44fb33e 100644 --- a/client/tomcatconf/tomcat6-ssl.conf.in +++ b/client/tomcatconf/tomcat6-ssl.conf.in @@ -1,4 +1,20 @@ #!/usr/bin/env bash +# 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. # System-wide configuration file for tomcat6 services # This will be sourced by tomcat6 and any secondary service diff --git a/client/tomcatconf/virtualrouter_commands.properties.in b/client/tomcatconf/virtualrouter_commands.properties.in index b6a479dea17..0feef6ae4b6 100644 --- a/client/tomcatconf/virtualrouter_commands.properties.in +++ b/client/tomcatconf/virtualrouter_commands.properties.in @@ -1,3 +1,20 @@ +# 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. + ### bitmap of permissions at the end of each classname, 1 = ADMIN, 2 = RESOURCE_DOMAIN_ADMIN, 4 = DOMAIN_ADMIN, 8 = USER ### Please standardize naming conventions to camel-case (even for acronyms). diff --git a/core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java b/core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java index 33cafbc92d9..75eebeb0dbc 100644 --- a/core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java +++ b/core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java @@ -55,6 +55,9 @@ public class HypervisorCapabilitiesVO implements HypervisorCapabilities, Identit @Column(name="uuid") private String uuid; + @Column(name="max_data_volumes_limit") + private Integer maxDataVolumesLimit; + protected HypervisorCapabilitiesVO() { this.uuid = UUID.randomUUID().toString(); } @@ -144,6 +147,15 @@ public class HypervisorCapabilitiesVO implements HypervisorCapabilities, Identit this.uuid = uuid; } + @Override + public Integer getMaxDataVolumesLimit() { + return maxDataVolumesLimit; + } + + public void setMaxDataVolumesLimit(Integer maxDataVolumesLimit) { + this.maxDataVolumesLimit = maxDataVolumesLimit; + } + @Override public boolean equals(Object obj) { if (obj instanceof HypervisorCapabilitiesVO) { diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java index 2cb60d74907..af89d9b18a9 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java @@ -186,34 +186,4 @@ public class KVMHABase { return result; } - - public static void main(String[] args) { - - NfsStoragePool pool = new KVMHAMonitor.NfsStoragePool(null, null, null, - null, PoolType.PrimaryStorage); - - KVMHAMonitor haWritter = new KVMHAMonitor(pool, "192.168.1.163", null); - Thread ha = new Thread(haWritter); - ha.start(); - - KVMHAChecker haChecker = new KVMHAChecker(haWritter.getStoragePools(), - "192.168.1.163"); - - ExecutorService exe = Executors.newFixedThreadPool(1); - Future future = exe.submit((Callable) haChecker); - try { - for (int i = 0; i < 10; i++) { - System.out.println(future.get()); - future = exe.submit((Callable) haChecker); - } - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (ExecutionException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtCapXMLParser.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtCapXMLParser.java index 704af23b703..4c12d35ab0a 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtCapXMLParser.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtCapXMLParser.java @@ -127,68 +127,4 @@ public class LibvirtCapXMLParser extends LibvirtXMLParser { return _emulator.toString(); } - public static void main(String[] args) { - String capXML = "" + " " + " " - + " x86_64" + " core2duo" - + " " - + " " - + " " - + " " - + " " + " " - + " " - + " " - + " " + " " - + " " + " " - + " " + " " - + " " + " " + " " - + " " - + " tcp" - + " " + " " - + " " + " " - + " " + " " - + " " + " " - + " " + " " + " " - + " " + " " + "" + " " - + " hvm" + " " - + " 32" - + " /usr/bin/qemu" - + " pc-0.11" - + " pc" - + " pc-0.10" - + " isapc" - + " " + " " - + " " - + " /usr/bin/qemu-kvm" - + " pc-0.11" - + " pc" - + " pc-0.10" - + " isapc" + " " - + " " + " " + " " - + " " + " " - + " " - + " " + " " - + " " + " " + " hvm" - + " " + " 64" - + " /usr/bin/qemu-system-x86_64" - + " pc-0.11" - + " pc" - + " pc-0.10" - + " isapc" - + " " + " " - + " " - + " /usr/bin/qemu-kvm" - + " pc-0.11" - + " pc" - + " pc-0.10" - + " isapc" + " " - + " " + " " + " " - + " " - + " " + " " - + " " + ""; - - LibvirtCapXMLParser parser = new LibvirtCapXMLParser(); - String cap = parser.parseCapabilitiesXML(capXML); - System.out.println(parser.getGuestOsType()); - System.out.println(parser.getEmulator()); - } } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java index 643a4e83f38..6862e14145c 100755 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@ -698,7 +698,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements } try { - createControlNetwork(conn); + createControlNetwork(); } catch (LibvirtException e) { throw new ConfigurationException(e.getMessage()); } @@ -1220,7 +1220,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements nicTO.setBroadcastUri(BroadcastDomainType.Vlan.toUri(vlanId)); } - InterfaceDef nic = createVif(conn, nicTO, InterfaceDef.nicModel.VIRTIO); + InterfaceDef nic = createVif(nicTO, InterfaceDef.nicModel.VIRTIO); Domain vm = getDomain(conn, vmName); vm.attachDevice(nic.toString()); } @@ -2122,7 +2122,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements } } else if (nic.getType() == TrafficType.Control) { /* Make sure the network is still there */ - createControlNetwork(conn); + createControlNetwork(); } else if (nic.getType() == TrafficType.Public) { if (nic.getBroadcastType() == BroadcastDomainType.Vlan && !vlanId.equalsIgnoreCase("untagged")) { @@ -2518,13 +2518,13 @@ public class LibvirtComputingResource extends ServerResourceBase implements return vm; } - protected void createVifs(Connect conn, VirtualMachineTO vmSpec, + protected void createVifs(VirtualMachineTO vmSpec, LibvirtVMDef vm) throws InternalErrorException, LibvirtException { NicTO[] nics = vmSpec.getNics(); for (int i = 0; i < nics.length; i++) { for (NicTO nic : vmSpec.getNics()) { if (nic.getDeviceId() == i) { - createVif(conn, vm, nic); + createVif(vm, nic); } } } @@ -2548,7 +2548,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements createVbd(conn, vmSpec, vmName, vm); - createVifs(conn, vmSpec, vm); + createVifs(vmSpec, vm); s_logger.debug("starting " + vmName + ": " + vm.toString()); startDomain(conn, vmName, vm.toString()); @@ -2736,7 +2736,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements return brName; } - private InterfaceDef createVif(Connect conn, NicTO nic, + private InterfaceDef createVif(NicTO nic, InterfaceDef.nicModel model) throws InternalErrorException, LibvirtException { InterfaceDef intf = new InterfaceDef(); @@ -2757,7 +2757,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements } } else if (nic.getType() == TrafficType.Control) { /* Make sure the network is still there */ - createControlNetwork(conn); + createControlNetwork(); intf.defBridgeNet(_linkLocalBridgeName, null, nic.getMac(), model); } else if (nic.getType() == TrafficType.Public) { if (nic.getBroadcastType() == BroadcastDomainType.Vlan @@ -2778,10 +2778,10 @@ public class LibvirtComputingResource extends ServerResourceBase implements return intf; } - private void createVif(Connect conn, LibvirtVMDef vm, NicTO nic) + private void createVif(LibvirtVMDef vm, NicTO nic) throws InternalErrorException, LibvirtException { vm.getDevices().addDevice( - createVif(conn, nic, getGuestNicModel(vm.getGuestOSType()))); + createVif(nic, getGuestNicModel(vm.getGuestOSType()))); } protected CheckSshAnswer execute(CheckSshCommand cmd) { @@ -4100,7 +4100,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements return new Pair(rx, tx); } - private void createControlNetwork(Connect conn) throws LibvirtException { + private void createControlNetwork() throws LibvirtException { _virtRouterResource.createControlNetwork(_linkLocalBridgeName); } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java index 55fbfaa4fdc..d00bfdb092c 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java @@ -182,69 +182,4 @@ public class LibvirtDomainXMLParser { public String getDescription() { return desc; } - - public static void main(String[] args) { - LibvirtDomainXMLParser parser = new LibvirtDomainXMLParser(); - parser.parseDomainXML("" - + "r-6-CV-5002-1" - + "581b5a4b-b496-8d4d-e44e-a7dcbe9df0b5" - + "testVM" - + "131072" - + "131072" - + "1" - + "" - + "hvm" - + "/var/lib/libvirt/qemu/vmlinuz-2.6.31.6-166.fc12.i686" - + "ro root=/dev/sda1 acpi=force selinux=0 eth0ip=10.1.1.1 eth0mask=255.255.255.0 eth2ip=192.168.10.152 eth2mask=255.255.255.0 gateway=192.168.10.1 dns1=72.52.126.11 dns2=72.52.126.12 domain=v4.myvm.com" - + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "destroy" - + "restart" - + "destroy" - + "" - + "/usr/bin/qemu-kvm" - + "" - + "" - + "" - + "" + "" - + "" - + "" - + "" + "" - + "" + "" - + "" - + "" - + "" + "" - + "" + "" - + "" - + "" - + "" + "" - + "" + "" - + "" - + "" - + "" + "" + "" - - ); - for (InterfaceDef intf : parser.getInterfaces()) { - System.out.println(intf); - } - for (DiskDef disk : parser.getDisks()) { - System.out.println(disk); - } - System.out.println(parser.getVncPort()); - System.out.println(parser.getDescription()); - - List test = new ArrayList(1); - test.add("1"); - test.add("2"); - if (test.contains("1")) { - System.out.print("fdf"); - } - } - } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtNetworkDef.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtNetworkDef.java index 6df3bd1e962..4f34a1ea9e8 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtNetworkDef.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtNetworkDef.java @@ -169,25 +169,4 @@ public class LibvirtNetworkDef { netBuilder.append("\n"); return netBuilder.toString(); } - - /** - * @param args - */ - public static void main(String[] args) { - LibvirtNetworkDef net = new LibvirtNetworkDef("cloudPrivate", null, - "cloud.com"); - net.defNATNetwork("cloudbr0", false, 0, null, "192.168.168.1", - "255.255.255.0"); - net.adddhcpIPRange("192.168.168.100", "192.168.168.220"); - net.adddhcpIPRange("192.168.168.10", "192.168.168.50"); - net.adddhcpMapping("branch0.cloud.com", "00:16:3e:77:e2:ed", - "192.168.168.100"); - net.adddhcpMapping("branch1.cloud.com", "00:16:3e:77:e2:ef", - "192.168.168.101"); - net.adddhcpMapping("branch2.cloud.com", "00:16:3e:77:e2:f0", - "192.168.168.102"); - System.out.println(net.toString()); - - } - } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStoragePoolXMLParser.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStoragePoolXMLParser.java index a349d5edf8c..a707a0bfb43 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStoragePoolXMLParser.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStoragePoolXMLParser.java @@ -105,24 +105,4 @@ public class LibvirtStoragePoolXMLParser { Element node = (Element) tagNode.item(0); return node.getAttribute(attr); } - - public static void main(String[] args) { - s_logger.addAppender(new org.apache.log4j.ConsoleAppender( - new org.apache.log4j.PatternLayout(), "System.out")); - String storagePool = "" + "test" - + "bf723c83-4b95-259c-7089-60776e61a11f" - + "20314165248" - + "1955450880" - + "18358714368" + "" - + "" - + "

    " - + "" + "" + "" - + "/media" + "" + "0700" - + "0" + "0" + "" - + "" + ""; - - LibvirtStoragePoolXMLParser parser = new LibvirtStoragePoolXMLParser(); - LibvirtStoragePoolDef pool = parser.parseStoragePoolXML(storagePool); - s_logger.debug(pool.toString()); - } } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeXMLParser.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeXMLParser.java index 3a4d94bdc58..bada3eb8097 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeXMLParser.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeXMLParser.java @@ -81,24 +81,4 @@ public class LibvirtStorageVolumeXMLParser { Element node = (Element) tagNode.item(0); return node.getAttribute(attr); } - - public static void main(String[] args) { - s_logger.addAppender(new org.apache.log4j.ConsoleAppender( - new org.apache.log4j.PatternLayout(), "System.out")); - String storagePool = "" + "test" - + "bf723c83-4b95-259c-7089-60776e61a11f" - + "20314165248" - + "1955450880" - + "18358714368" + "" - + "" - + "" - + "" + "" + "" - + "/media" + "" + "0700" - + "0" + "0" + "" - + "" + ""; - - LibvirtStoragePoolXMLParser parser = new LibvirtStoragePoolXMLParser(); - LibvirtStoragePoolDef pool = parser.parseStoragePoolXML(storagePool); - s_logger.debug(pool.toString()); - } } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java index 998f39372a9..457d9ac6c64 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java @@ -665,6 +665,13 @@ public class LibvirtVMDef { _model = model; } + public void defEthernet(String targetName, String macAddr, nicModel model) { + _netType = guestNetType.ETHERNET; + _networkName = targetName; + _macAddr = macAddr; + _model = model; + } + public void setHostNetType(hostNicType hostNetType) { _hostNetType = hostNetType; } @@ -883,81 +890,4 @@ public class LibvirtVMDef { vmBuilder.append("\n"); return vmBuilder.toString(); } - - public static void main(String[] args) { - System.out.println("testing"); - LibvirtVMDef vm = new LibvirtVMDef(); - vm.setHvsType("kvm"); - vm.setDomainName("testing"); - vm.setDomUUID(UUID.randomUUID().toString()); - - GuestDef guest = new GuestDef(); - guest.setGuestType(GuestDef.guestType.KVM); - guest.setGuestArch("x86_64"); - guest.setMachineType("pc-0.11"); - guest.setBootOrder(GuestDef.bootOrder.HARDISK); - vm.addComp(guest); - - GuestResourceDef grd = new GuestResourceDef(); - grd.setMemorySize(512 * 1024); - grd.setVcpuNum(1); - vm.addComp(grd); - - FeaturesDef features = new FeaturesDef(); - features.addFeatures("pae"); - features.addFeatures("apic"); - features.addFeatures("acpi"); - vm.addComp(features); - - TermPolicy term = new TermPolicy(); - term.setCrashPolicy("destroy"); - term.setPowerOffPolicy("destroy"); - term.setRebootPolicy("destroy"); - vm.addComp(term); - - DevicesDef devices = new DevicesDef(); - devices.setEmulatorPath("/usr/bin/cloud-qemu-system-x86_64"); - - DiskDef hda = new DiskDef(); - hda.defFileBasedDisk("/path/to/hda1", 0, DiskDef.diskBus.VIRTIO, - DiskDef.diskFmtType.QCOW2); - devices.addDevice(hda); - - DiskDef hdb = new DiskDef(); - hdb.defFileBasedDisk("/path/to/hda2", 1, DiskDef.diskBus.VIRTIO, - DiskDef.diskFmtType.QCOW2); - devices.addDevice(hdb); - - InterfaceDef pubNic = new InterfaceDef(); - pubNic.defBridgeNet("cloudbr0", "vnet1", "00:16:3e:77:e2:a1", - InterfaceDef.nicModel.VIRTIO); - devices.addDevice(pubNic); - - InterfaceDef privNic = new InterfaceDef(); - privNic.defPrivateNet("cloud-private", null, "00:16:3e:77:e2:a2", - InterfaceDef.nicModel.VIRTIO); - devices.addDevice(privNic); - - InterfaceDef vlanNic = new InterfaceDef(); - vlanNic.defBridgeNet("vnbr1000", "tap1", "00:16:3e:77:e2:a2", - InterfaceDef.nicModel.VIRTIO); - devices.addDevice(vlanNic); - - SerialDef serial = new SerialDef("pty", null, (short) 0); - devices.addDevice(serial); - - ConsoleDef console = new ConsoleDef("pty", null, null, (short) 0); - devices.addDevice(console); - - GraphicDef grap = new GraphicDef("vnc", (short) 0, true, null, null, - null); - devices.addDevice(grap); - - InputDef input = new InputDef("tablet", "usb"); - devices.addDevice(input); - - vm.addComp(devices); - - System.out.println(vm.toString()); - } } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java index 90003f9cc2b..4efffd6caad 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java @@ -446,25 +446,6 @@ public class LibvirtStorageAdaptor implements StorageAdaptor { return pool; } - private void getStats(LibvirtStoragePool pool) { - Script statsScript = new Script("/bin/bash", s_logger); - statsScript.add("-c"); - statsScript.add("stats=$(df --total " + pool.getLocalPath() - + " |grep total|awk '{print $2,$3}');echo $stats"); - final OutputInterpreter.OneLineParser statsParser = new OutputInterpreter.OneLineParser(); - String result = statsScript.execute(statsParser); - if (result == null) { - String stats = statsParser.getLine(); - if (stats != null && !stats.isEmpty()) { - String sizes[] = stats.trim().split(" "); - if (sizes.length == 2) { - pool.setCapacity(Long.parseLong(sizes[0]) * 1024); - pool.setUsed(Long.parseLong(sizes[1]) * 1024); - } - } - } - } - @Override public KVMStoragePool getStoragePool(String uuid) { StoragePool storage = null; @@ -503,12 +484,9 @@ public class LibvirtStorageAdaptor implements StorageAdaptor { } } - if (pool.getType() == StoragePoolType.RBD) { - pool.setCapacity(storage.getInfo().capacity); - pool.setUsed(storage.getInfo().allocation); - } else { - getStats(pool); - } + pool.refresh(); + pool.setCapacity(storage.getInfo().capacity); + pool.setUsed(storage.getInfo().allocation); return pool; } catch (LibvirtException e) { @@ -593,12 +571,9 @@ public class LibvirtStorageAdaptor implements StorageAdaptor { pool.setLocalPath(""); } - if (pool.getType() == StoragePoolType.RBD) { - pool.setCapacity(sp.getInfo().capacity); - pool.setUsed(sp.getInfo().allocation); - } else { - getStats(pool); - } + pool.setCapacity(sp.getInfo().capacity); + pool.setUsed(sp.getInfo().allocation); + return pool; } catch (LibvirtException e) { throw new CloudRuntimeException(e.toString()); diff --git a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java new file mode 100644 index 00000000000..b723875d4bb --- /dev/null +++ b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVMDefTest.java @@ -0,0 +1,38 @@ +/* + * 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.hypervisor.kvm.resource; + +import junit.framework.TestCase; + +public class LibvirtVMDefTest extends TestCase { + + public void testInterfaceEtehrnet() { + LibvirtVMDef.InterfaceDef ifDef = new LibvirtVMDef.InterfaceDef(); + ifDef.defEthernet("targetDeviceName", "00:11:22:aa:bb:dd", LibvirtVMDef.InterfaceDef.nicModel.VIRTIO); + + String expected = "\n" + + "\n" + + "\n" + + "\n" + + "\n"; + + assertEquals(expected, ifDef.toString()); + } +} diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/ControlClusterStatus.java b/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/ControlClusterStatus.java new file mode 100644 index 00000000000..c0daaed7a9b --- /dev/null +++ b/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/ControlClusterStatus.java @@ -0,0 +1,66 @@ +package com.cloud.network.nicira; + +public class ControlClusterStatus { + private String cluster_status; + private Stats node_stats; + private Stats lqueue_stats; + private Stats lport_stats; + private Stats lrouterport_stats; + private Stats lswitch_stats; + private Stats zone_stats; + private Stats lrouter_stats; + private Stats security_profile_stats; + + public String getClusterStatus() { + return cluster_status; + } + + public Stats getNodeStats() { + return node_stats; + } + + public Stats getLqueueStats() { + return lqueue_stats; + } + + public Stats getLportStats() { + return lport_stats; + } + + public Stats getLrouterportStats() { + return lrouterport_stats; + } + + public Stats getLswitchStats() { + return lswitch_stats; + } + + public Stats getZoneStats() { + return zone_stats; + } + + public Stats getLrouterStats() { + return lrouter_stats; + } + + public Stats getSecurityProfileStats() { + return security_profile_stats; + } + + public class Stats { + private int error_state_count; + private int registered_count; + private int active_count; + + public int getErrorStateCount() { + return error_state_count; + } + public int getRegisteredCount() { + return registered_count; + } + public int getActiveCount() { + return active_count; + } + + } +} diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/NiciraNvpApi.java b/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/NiciraNvpApi.java index c2cf9c5b362..ff756fca592 100644 --- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/NiciraNvpApi.java +++ b/plugins/network-elements/nicira-nvp/src/com/cloud/network/nicira/NiciraNvpApi.java @@ -172,6 +172,13 @@ public class NiciraNvpApi { return lsp.getUuid(); } + public ControlClusterStatus getControlClusterStatus() throws NiciraNvpApiException { + String uri = "/ws.v1/control-cluster/status"; + ControlClusterStatus ccs = executeRetrieveObject(new TypeToken(){}.getType(), uri, null); + + return ccs; + } + private void executeUpdateObject(T newObject, String uri, Map parameters) throws NiciraNvpApiException { String url; try { @@ -272,11 +279,13 @@ public class NiciraNvpApi { GetMethod gm = new GetMethod(url); gm.setRequestHeader("Content-Type", "application/json"); - List nameValuePairs = new ArrayList(parameters.size()); - for (Entry e : parameters.entrySet()) { - nameValuePairs.add(new NameValuePair(e.getKey(), e.getValue())); + if (parameters != null && !parameters.isEmpty()) { + List nameValuePairs = new ArrayList(parameters.size()); + for (Entry e : parameters.entrySet()) { + nameValuePairs.add(new NameValuePair(e.getKey(), e.getValue())); + } + gm.setQueryString(nameValuePairs.toArray(new NameValuePair[0])); } - gm.setQueryString(nameValuePairs.toArray(new NameValuePair[0])); executeMethod(gm); diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpResource.java b/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpResource.java index 69fd26f0d86..546173feee3 100644 --- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpResource.java +++ b/plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpResource.java @@ -28,6 +28,7 @@ import com.cloud.agent.api.StartupCommand; import com.cloud.agent.api.StartupNiciraNvpCommand; import com.cloud.host.Host; import com.cloud.host.Host.Type; +import com.cloud.network.nicira.ControlClusterStatus; import com.cloud.network.nicira.LogicalSwitch; import com.cloud.network.nicira.LogicalSwitchPort; import com.cloud.network.nicira.NiciraNvpApi; @@ -46,6 +47,7 @@ public class NiciraNvpResource implements ServerResource { private String _adminpass; private String _guid; private String _zoneId; + private int _numRetries; private NiciraNvpApi _niciraNvpApi; @@ -83,6 +85,8 @@ public class NiciraNvpResource implements ServerResource { throw new ConfigurationException("Unable to find zone"); } + _numRetries = 2; + try { _niciraNvpApi = new NiciraNvpApi(_ip, _adminuser, _adminpass); } catch (NiciraNvpApiException e) { @@ -126,13 +130,28 @@ public class NiciraNvpResource implements ServerResource { return new StartupCommand[] { sc }; } - @Override - public PingCommand getCurrentStatus(long id) { + @Override + public PingCommand getCurrentStatus(long id) { + try { + ControlClusterStatus ccs = _niciraNvpApi.getControlClusterStatus(); + if (!"stable".equals(ccs.getClusterStatus())) { + s_logger.error("ControlCluster state is not stable: " + + ccs.getClusterStatus()); + return null; + } + } catch (NiciraNvpApiException e) { + s_logger.error("getControlClusterStatus failed", e); + return null; + } return new PingCommand(Host.Type.L2Networking, id); - } + } @Override public Answer executeRequest(Command cmd) { + return executeRequest(cmd, _numRetries); + } + + public Answer executeRequest(Command cmd, int numRetries) { if (cmd instanceof ReadyCommand) { return executeRequest((ReadyCommand) cmd); } @@ -140,16 +159,16 @@ public class NiciraNvpResource implements ServerResource { return executeRequest((MaintainCommand)cmd); } else if (cmd instanceof CreateLogicalSwitchCommand) { - return executeRequest((CreateLogicalSwitchCommand)cmd); + return executeRequest((CreateLogicalSwitchCommand)cmd, numRetries); } else if (cmd instanceof DeleteLogicalSwitchCommand) { - return executeRequest((DeleteLogicalSwitchCommand) cmd); + return executeRequest((DeleteLogicalSwitchCommand) cmd, numRetries); } else if (cmd instanceof CreateLogicalSwitchPortCommand) { - return executeRequest((CreateLogicalSwitchPortCommand) cmd); + return executeRequest((CreateLogicalSwitchPortCommand) cmd, numRetries); } else if (cmd instanceof DeleteLogicalSwitchPortCommand) { - return executeRequest((DeleteLogicalSwitchPortCommand) cmd); + return executeRequest((DeleteLogicalSwitchPortCommand) cmd, numRetries); } s_logger.debug("Received unsupported command " + cmd.toString()); return Answer.createUnsupportedCommandAnswer(cmd); @@ -168,7 +187,7 @@ public class NiciraNvpResource implements ServerResource { public void setAgentControl(IAgentControl agentControl) { } - private Answer executeRequest(CreateLogicalSwitchCommand cmd) { + private Answer executeRequest(CreateLogicalSwitchCommand cmd, int numRetries) { LogicalSwitch logicalSwitch = new LogicalSwitch(); logicalSwitch.setDisplay_name("lswitch-" + cmd.getName()); logicalSwitch.setPort_isolation_enabled(false); @@ -187,21 +206,31 @@ public class NiciraNvpResource implements ServerResource { logicalSwitch = _niciraNvpApi.createLogicalSwitch(logicalSwitch); return new CreateLogicalSwitchAnswer(cmd, true, "Logicalswitch " + logicalSwitch.getUuid() + " created", logicalSwitch.getUuid()); } catch (NiciraNvpApiException e) { - return new CreateLogicalSwitchAnswer(cmd, e); + if (numRetries > 0) { + return retry(cmd, --numRetries); + } + else { + return new CreateLogicalSwitchAnswer(cmd, e); + } } } - private Answer executeRequest(DeleteLogicalSwitchCommand cmd) { + private Answer executeRequest(DeleteLogicalSwitchCommand cmd, int numRetries) { try { _niciraNvpApi.deleteLogicalSwitch(cmd.getLogicalSwitchUuid()); return new DeleteLogicalSwitchAnswer(cmd, true, "Logicalswitch " + cmd.getLogicalSwitchUuid() + " deleted"); } catch (NiciraNvpApiException e) { - return new DeleteLogicalSwitchAnswer(cmd, e); + if (numRetries > 0) { + return retry(cmd, --numRetries); + } + else { + return new DeleteLogicalSwitchAnswer(cmd, e); + } } } - private Answer executeRequest(CreateLogicalSwitchPortCommand cmd) { + private Answer executeRequest(CreateLogicalSwitchPortCommand cmd, int numRetries) { String logicalSwitchUuid = cmd.getLogicalSwitchUuid(); String attachmentUuid = cmd.getAttachmentUuid(); @@ -215,17 +244,27 @@ public class NiciraNvpResource implements ServerResource { _niciraNvpApi.modifyLogicalSwitchPortAttachment(cmd.getLogicalSwitchUuid(), newPort.getUuid(), new VifAttachment(attachmentUuid)); return new CreateLogicalSwitchPortAnswer(cmd, true, "Logical switch port " + newPort.getUuid() + " created", newPort.getUuid()); } catch (NiciraNvpApiException e) { - return new CreateLogicalSwitchPortAnswer(cmd, e); + if (numRetries > 0) { + return retry(cmd, --numRetries); + } + else { + return new CreateLogicalSwitchPortAnswer(cmd, e); + } } } - private Answer executeRequest(DeleteLogicalSwitchPortCommand cmd) { + private Answer executeRequest(DeleteLogicalSwitchPortCommand cmd, int numRetries) { try { _niciraNvpApi.deleteLogicalSwitchPort(cmd.getLogicalSwitchUuid(), cmd.getLogicalSwitchPortUuid()); return new DeleteLogicalSwitchPortAnswer(cmd, true, "Logical switch port " + cmd.getLogicalSwitchPortUuid() + " deleted"); } catch (NiciraNvpApiException e) { - return new DeleteLogicalSwitchPortAnswer(cmd, e); + if (numRetries > 0) { + return retry(cmd, --numRetries); + } + else { + return new DeleteLogicalSwitchPortAnswer(cmd, e); + } } } @@ -236,5 +275,11 @@ public class NiciraNvpResource implements ServerResource { private Answer executeRequest(MaintainCommand cmd) { return new MaintainAnswer(cmd); } - + + private Answer retry(Command cmd, int numRetries) { + int numRetriesRemaining = numRetries - 1; + s_logger.warn("Retrying " + cmd.getClass().getSimpleName() + ". Number of retries remaining: " + numRetriesRemaining); + return executeRequest(cmd, numRetriesRemaining); + } + } diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java index 7144f60086c..d966e09d058 100755 --- a/server/src/com/cloud/configuration/Config.java +++ b/server/src/com/cloud/configuration/Config.java @@ -73,7 +73,7 @@ public enum Config { StoragePoolMaxWaitSeconds("Storage", ManagementServer.class, Integer.class, "storage.pool.max.waitseconds", "3600", "Timeout (in seconds) to synchronize storage pool operations.", null), StorageTemplateCleanupEnabled("Storage", ManagementServer.class, Boolean.class, "storage.template.cleanup.enabled", "true", "Enable/disable template cleanup activity, only take effect when overall storage cleanup is enabled", null), PrimaryStorageDownloadWait("Storage", TemplateManager.class, Integer.class, "primary.storage.download.wait", "10800", "In second, timeout for download template to primary storage", null), - CreateVolumeFromSnapshotWait("Storage", StorageManager.class, Integer.class, "create.volume.from.snapshot.wait", "10800", "In second, timeout for create template from snapshot", null), + CreateVolumeFromSnapshotWait("Storage", StorageManager.class, Integer.class, "create.volume.from.snapshot.wait", "10800", "In second, timeout for creating volume from snapshot", null), CopyVolumeWait("Storage", StorageManager.class, Integer.class, "copy.volume.wait", "10800", "In second, timeout for copy volume command", null), CreatePrivateTemplateFromVolumeWait("Storage", UserVmManager.class, Integer.class, "create.private.template.from.volume.wait", "10800", "In second, timeout for CreatePrivateTemplateFromVolumeCommand", null), CreatePrivateTemplateFromSnapshotWait("Storage", UserVmManager.class, Integer.class, "create.private.template.from.snapshot.wait", "10800", "In second, timeout for CreatePrivateTemplateFromSnapshotCommand", null), diff --git a/server/src/com/cloud/hypervisor/dao/HypervisorCapabilitiesDao.java b/server/src/com/cloud/hypervisor/dao/HypervisorCapabilitiesDao.java index c7fb96935c7..8f4a47584b3 100644 --- a/server/src/com/cloud/hypervisor/dao/HypervisorCapabilitiesDao.java +++ b/server/src/com/cloud/hypervisor/dao/HypervisorCapabilitiesDao.java @@ -28,6 +28,7 @@ public interface HypervisorCapabilitiesDao extends GenericDao HypervisorTypeSearch; protected final SearchBuilder HypervisorTypeAndVersionSearch; protected final GenericSearchBuilder MaxGuestLimitByHypervisorSearch; - + protected final GenericSearchBuilder MaxDataVolumesLimitByHypervisorSearch; + private static final String DEFAULT_VERSION = "default"; protected HypervisorCapabilitiesDaoImpl() { @@ -54,7 +55,13 @@ public class HypervisorCapabilitiesDaoImpl extends GenericDaoBase sc = MaxDataVolumesLimitByHypervisorSearch.create(); + sc.setParameters("hypervisorType", hypervisorType); + sc.setParameters("hypervisorVersion", hypervisorVersion); + List limitList = customSearch(sc, null); + if (!limitList.isEmpty()) { + result = limitList.get(0); + } else { + useDefault = true; + } + } else { + useDefault = true; + } + // If data is not available for a specific hypervisor version then use 'default' as the version + if (useDefault) { + SearchCriteria sc = MaxDataVolumesLimitByHypervisorSearch.create(); + sc.setParameters("hypervisorType", hypervisorType); + sc.setParameters("hypervisorVersion", DEFAULT_VERSION); + List limitList = customSearch(sc, null); + if (!limitList.isEmpty()) { + result = limitList.get(0); + } + } + return result; + } } \ No newline at end of file diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java index 5ffbdcde4b0..f60008bcc98 100755 --- a/server/src/com/cloud/network/NetworkManagerImpl.java +++ b/server/src/com/cloud/network/NetworkManagerImpl.java @@ -3013,15 +3013,11 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag } } - if (!_accountMgr.isAdmin(caller.getType()) || !listAll) { + if (!_accountMgr.isAdmin(caller.getType()) || (!listAll && (projectId != null && projectId != -1 && domainId == null))) { permittedAccounts.add(caller.getId()); domainId = caller.getDomainId(); } - if (caller.getType() == Account.ACCOUNT_TYPE_DOMAIN_ADMIN) { - domainId = caller.getDomainId(); - } - // set project information boolean skipProjectNetworks = true; if (projectId != null) { @@ -3044,8 +3040,13 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag skipProjectNetworks = false; } + if (domainId != null) { + path = _domainDao.findById(domainId).getPath(); + } else { path = _domainDao.findById(caller.getDomainId()).getPath(); - if (listAll) { + } + + if (listAll && domainId == null) { isRecursive = true; } @@ -3091,38 +3092,50 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag sb.join("domainSearch", domainSearch, sb.entity().getDomainId(), domainSearch.entity().getId(), JoinBuilder.JoinType.INNER); } - if (skipProjectNetworks) { + SearchBuilder accountSearch = _accountDao.createSearchBuilder(); - accountSearch.and("type", accountSearch.entity().getType(), SearchCriteria.Op.NEQ); + accountSearch.and("typeNEQ", accountSearch.entity().getType(), SearchCriteria.Op.NEQ); + accountSearch.and("typeEQ", accountSearch.entity().getType(), SearchCriteria.Op.EQ); + + sb.join("accountSearch", accountSearch, sb.entity().getAccountId(), accountSearch.entity().getId(), JoinBuilder.JoinType.INNER); - } List networksToReturn = new ArrayList(); if (isSystem == null || !isSystem) { - // Get domain level networks - if (domainId != null) { - networksToReturn - .addAll(listDomainLevelNetworks( - buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, guestIpType, trafficType, - physicalNetworkId, aclType, skipProjectNetworks, restartRequired, specifyIpRanges, vpcId, tags), searchFilter, - domainId)); - } - if (!permittedAccounts.isEmpty()) { + //get account level networks networksToReturn.addAll(listAccountSpecificNetworks( buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, guestIpType, trafficType, physicalNetworkId, aclType, skipProjectNetworks, restartRequired, specifyIpRanges, vpcId, tags), searchFilter, permittedAccounts)); - } else if (domainId == null) { + //get domain level networks + if (domainId != null) { + networksToReturn + .addAll(listDomainLevelNetworks( + buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, guestIpType, trafficType, + physicalNetworkId, aclType, true, restartRequired, specifyIpRanges, vpcId, tags), searchFilter, + domainId, false)); + } + } else { + //add account specific networks networksToReturn.addAll(listAccountSpecificNetworksByDomainPath( buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, guestIpType, trafficType, physicalNetworkId, aclType, skipProjectNetworks, restartRequired, specifyIpRanges, vpcId, tags), searchFilter, path, isRecursive)); + //add domain specific networks of domain + parent domains networksToReturn.addAll(listDomainSpecificNetworksByDomainPath( buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, guestIpType, trafficType, physicalNetworkId, aclType, skipProjectNetworks, restartRequired, specifyIpRanges, vpcId, tags), searchFilter, path, isRecursive)); + //add networks of subdomains + if (domainId == null) { + networksToReturn + .addAll(listDomainLevelNetworks( + buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, guestIpType, trafficType, + physicalNetworkId, aclType, true, restartRequired, specifyIpRanges, vpcId, tags), searchFilter, + caller.getDomainId(), true)); + } } } else { networksToReturn = _networksDao.search(buildNetworkSearchCriteria(sb, keyword, id, isSystem, zoneId, @@ -3223,7 +3236,9 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag } if (skipProjectNetworks) { - sc.setJoinParameters("accountSearch", "type", Account.ACCOUNT_TYPE_PROJECT); + sc.setJoinParameters("accountSearch", "typeNEQ", Account.ACCOUNT_TYPE_PROJECT); + } else { + sc.setJoinParameters("accountSearch", "typeEQ", Account.ACCOUNT_TYPE_PROJECT); } if (restartRequired != null) { @@ -3251,12 +3266,15 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag return sc; } - private List listDomainLevelNetworks(SearchCriteria sc, Filter searchFilter, long domainId) { + private List listDomainLevelNetworks(SearchCriteria sc, Filter searchFilter, long domainId, boolean parentDomainsOnly) { List networkIds = new ArrayList(); Set allowedDomains = _domainMgr.getDomainParentIds(domainId); List maps = _networkDomainDao.listDomainNetworkMapByDomain(allowedDomains.toArray()); for (NetworkDomainVO map : maps) { + if (map.getDomainId() == domainId && parentDomainsOnly) { + continue; + } boolean subdomainAccess = (map.isSubdomainAccess() != null) ? map.isSubdomainAccess() : getAllowSubdomainAccessGlobal(); if (map.getDomainId() == domainId || subdomainAccess) { networkIds.add(map.getNetworkId()); @@ -3303,20 +3321,37 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag return _networksDao.search(sc, searchFilter); } - private List listDomainSpecificNetworksByDomainPath(SearchCriteria sc, Filter searchFilter, String path, boolean isRecursive) { - SearchCriteria accountSC = _networksDao.createSearchCriteria(); - accountSC.addAnd("aclType", SearchCriteria.Op.EQ, ACLType.Domain.toString()); + private List listDomainSpecificNetworksByDomainPath(SearchCriteria sc, Filter searchFilter, + String path, boolean isRecursive) { + Set allowedDomains = new HashSet(); if (path != null) { if (isRecursive) { - sc.setJoinParameters("domainSearch", "path", path + "%"); + allowedDomains = _domainMgr.getDomainChildrenIds(path); } else { - sc.setJoinParameters("domainSearch", "path", path); + Domain domain = _domainDao.findDomainByPath(path); + allowedDomains.add(domain.getId()); } } - sc.addAnd("id", SearchCriteria.Op.SC, accountSC); + List networkIds = new ArrayList(); + + List maps = _networkDomainDao.listDomainNetworkMapByDomain(allowedDomains.toArray()); + + for (NetworkDomainVO map : maps) { + networkIds.add(map.getNetworkId()); + } + + if (!networkIds.isEmpty()) { + SearchCriteria domainSC = _networksDao.createSearchCriteria(); + domainSC.addAnd("id", SearchCriteria.Op.IN, networkIds.toArray()); + domainSC.addAnd("aclType", SearchCriteria.Op.EQ, ACLType.Domain.toString()); + + sc.addAnd("id", SearchCriteria.Op.SC, domainSC); return _networksDao.search(sc, searchFilter); + } else { + return new ArrayList(); + } } @Override diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index 49121548cf4..32c1aa635cd 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -507,6 +507,24 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager } } + private int getMaxDataVolumesSupported(UserVmVO vm) { + Long hostId = vm.getHostId(); + if (hostId == null) { + hostId = vm.getLastHostId(); + } + HostVO host = _hostDao.findById(hostId); + Integer maxDataVolumesSupported = null; + if (host != null) { + _hostDao.loadDetails(host); + maxDataVolumesSupported = _hypervisorCapabilitiesDao.getMaxDataVolumesLimit(host.getHypervisorType(), host.getDetail("product_version")); + } + if (maxDataVolumesSupported == null) { + maxDataVolumesSupported = 6; // 6 data disks by default if nothing is specified in 'hypervisor_capabilities' table + } + + return maxDataVolumesSupported.intValue(); + } + @Override @ActionEvent(eventType = EventTypes.EVENT_VOLUME_ATTACH, eventDescription = "attaching volume", async = true) public Volume attachVolumeToVM(AttachVolumeCmd command) { @@ -550,10 +568,11 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager } } - // Check that the VM has less than 6 data volumes attached + // Check that the number of data volumes attached to VM is less than that supported by hypervisor List existingDataVolumes = _volsDao.findByInstanceAndType(vmId, Volume.Type.DATADISK); - if (existingDataVolumes.size() >= 6) { - throw new InvalidParameterValueException("The specified VM already has the maximum number of data disks (6). Please specify another VM."); + int maxDataVolumesSupported = getMaxDataVolumesSupported(vm); + if (existingDataVolumes.size() >= maxDataVolumesSupported) { + throw new InvalidParameterValueException("The specified VM already has the maximum number of data disks (" + maxDataVolumesSupported + "). Please specify another VM."); } // Check that the VM and the volume are in the same zone diff --git a/setup/db/create-schema.sql b/setup/db/create-schema.sql index 71c2d7518e4..98ad9f708fc 100755 --- a/setup/db/create-schema.sql +++ b/setup/db/create-schema.sql @@ -1575,6 +1575,7 @@ CREATE TABLE `cloud`.`hypervisor_capabilities` ( `hypervisor_version` varchar(32), `max_guests_limit` bigint unsigned DEFAULT 50, `security_group_enabled` int(1) unsigned DEFAULT 1 COMMENT 'Is security group supported', + `max_data_volumes_limit` int unsigned DEFAULT 6 COMMENT 'Max. data volumes per VM supported by hypervisor', PRIMARY KEY (`id`), CONSTRAINT `uc_hypervisor_capabilities__uuid` UNIQUE (`uuid`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; @@ -1584,8 +1585,8 @@ INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(hypervisor_type, hypervisor INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled) VALUES ('XenServer', '5.6', 50, 1); INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled) VALUES ('XenServer', '5.6 FP1', 50, 1); INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled) VALUES ('XenServer', '5.6 SP2', 50, 1); -INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled) VALUES ('XenServer', '6.0', 50, 1); -INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled) VALUES ('XenServer', '6.0.2', 50, 1); +INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled, max_data_volumes_limit) VALUES ('XenServer', '6.0', 50, 1, 13); +INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled, max_data_volumes_limit) VALUES ('XenServer', '6.0.2', 50, 1, 13); INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled) VALUES ('VMware', 'default', 128, 0); INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled) VALUES ('VMware', '4.0', 128, 0); INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled) VALUES ('VMware', '4.1', 128, 0); diff --git a/setup/db/db/schema-303to40.sql b/setup/db/db/schema-303to40.sql index 746c4964f0b..4ce8e65d1a2 100644 --- a/setup/db/db/schema-303to40.sql +++ b/setup/db/db/schema-303to40.sql @@ -77,5 +77,13 @@ PREPARE stmt1 FROM @constraintname; EXECUTE stmt1; DEALLOCATE PREPARE stmt1; -AlTER TABLE physical_network_service_providers ADD CONSTRAINT `fk_pnetwork_service_providers__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE +AlTER TABLE physical_network_service_providers ADD CONSTRAINT `fk_pnetwork_service_providers__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE; +UPDATE `cloud`.`configuration` SET description='In second, timeout for creating volume from snapshot' WHERE name='create.volume.from.snapshot.wait'; + +ALTER TABLE `cloud`.`hypervisor_capabilities` ADD COLUMN `max_data_volumes_limit` int unsigned DEFAULT 6 COMMENT 'Max. data volumes per VM supported by hypervisor'; +SET SQL_SAFE_UPDATES=0; +UPDATE `cloud`.`hypervisor_capabilities` SET `max_data_volumes_limit`=13 WHERE `hypervisor_type`='XenServer' AND (`hypervisor_version`='6.0' OR `hypervisor_version`='6.0.2'); +SET SQL_SAFE_UPDATES=1; + + diff --git a/ui/index.jsp b/ui/index.jsp index 83d23f0f21c..02dfd72c5a6 100644 --- a/ui/index.jsp +++ b/ui/index.jsp @@ -1694,6 +1694,7 @@ dictionary = { 'state.Enabled': '', 'label.system.wide.capacity': '', 'label.management': '', +'label.management.ips': '', 'label.guest': '', 'label.network.service.providers': '', 'message.launch.zone': '', diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index 01901d3a583..e75244fa994 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -1315,7 +1315,7 @@ allowedActions.push("recurringSnapshot"); } if(jsonObj.state != "Allocated") { - if((jsonObj.vmstate == "Stopped" || jsonObj.virtualmachineid == null) && jsonObj.state != "Ready") { + if((jsonObj.vmstate == "Stopped" || jsonObj.virtualmachineid == null) && jsonObj.state == "Ready") { allowedActions.push("downloadVolume"); } } diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js index 73e06ff2b95..0ad0cc4b381 100644 --- a/ui/scripts/zoneWizard.js +++ b/ui/scripts/zoneWizard.js @@ -2158,9 +2158,9 @@ alert("addNetworkServiceProvider&name=Netscaler failed. Error: " + errorMsg); } }); - }); - } }, 3000); + } + }); //add netscaler provider (end) } else { //selectedNetworkOfferingHavingNetscaler == false diff --git a/wscript_configure b/wscript_configure index e6d99589a71..f9f4c3eaef2 100644 --- a/wscript_configure +++ b/wscript_configure @@ -293,7 +293,7 @@ msclasspath = [ in_javadir("%s-%s.jar"%(conf.env.PACKAGE,x)) for x in "utils api conf.env.MSCLASSPATH = pathsep.join(msclasspath) # the agent and simulator classpaths point to JARs required to run these two applications -agentclasspath = [ in_javadir("%s-%s.jar"%(conf.env.PACKAGE,x)) for x in "utils api core server server-extras agent console-common console-proxy core-extras agent-extras".split() ] +agentclasspath = [ in_javadir("%s-%s.jar"%(conf.env.PACKAGE,x)) for x in "utils api core server server-extras agent console-common console-proxy core-extras agent-extras plugin-hypervisor-kvm".split() ] agentclasspath.append(in_javadir("jna.jar")) conf.env.AGENTCLASSPATH = pathsep.join(agentclasspath) conf.env.AGENTSIMULATORCLASSPATH = pathsep.join(agentclasspath+[in_javadir("%s-agent-simulator.jar"%conf.env.PACKAGE)])