You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/04/19 00:18:58 UTC

[01/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Updated Branches:
  refs/heads/ui-mixed-zone-management c3009e316 -> e04430302


CLOUDSTACK-2067 - ACS4.2 - throw LibvirtException instead of squelching it
so that callers of startVM in LibvirtComputingResource know that a vm failed
to start

Signed-off-by: Marcus Sorensen <ma...@betterservers.com> 1366224775 -0600


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/26fea7b6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/26fea7b6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/26fea7b6

Branch: refs/heads/ui-mixed-zone-management
Commit: 26fea7b660f96292f62c857a03fd6e4faaeba220
Parents: 5ee3cc4
Author: Marcus Sorensen <ma...@betterservers.com>
Authored: Wed Apr 17 12:52:55 2013 -0600
Committer: Marcus Sorensen <ma...@betterservers.com>
Committed: Wed Apr 17 12:52:55 2013 -0600

----------------------------------------------------------------------
 .../kvm/resource/LibvirtComputingResource.java     |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26fea7b6/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
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 3de7a48..0064edf 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
@@ -1077,8 +1077,7 @@ ServerResource {
             */
             conn.domainCreateXML(domainXML, 0);
         } catch (final LibvirtException e) {
-            s_logger.warn("Failed to start domain " + vmName + ": "
-                    + e.getMessage(), e);
+            throw e;
         }
         return null;
     }


[25/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
Add UI 'module' API

Add a variant to a plugin, called a 'module.' It is designed for
features that are build-in to the standard UI (i.e., not installed
dynamically), but can still utilize the modular nature of UI
plugins. It works exactly the same way as a plugin, except:

-Modules are added to modules/ folder
-Modules are registered in modules/modules.js
-No config.js (no need for metadata, since they are built-in features)
- /ui/modules/ folder will not be touched by the build system, so any modules
 are committed directly to the ui/ folder. In other words, modules are
 not installed automatically.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6babaf96
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6babaf96
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6babaf96

Branch: refs/heads/ui-mixed-zone-management
Commit: 6babaf96163f18453eeb7de69857ec62f01d88b3
Parents: 9573f51
Author: Brian Federle <br...@citrix.com>
Authored: Thu Apr 18 12:34:59 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Thu Apr 18 12:52:55 2013 -0700

----------------------------------------------------------------------
 ui/index.jsp          |    3 +-
 ui/modules/modules.js |   20 +++++++++++
 ui/scripts/plugins.js |   78 +++++++++++++++++++++++++++++++-------------
 3 files changed, 77 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6babaf96/ui/index.jsp
----------------------------------------------------------------------
diff --git a/ui/index.jsp b/ui/index.jsp
index 550661e..5e5a7f2 100644
--- a/ui/index.jsp
+++ b/ui/index.jsp
@@ -1680,9 +1680,10 @@ under the License.
     <script type="text/javascript" src="scripts/docs.js?t=<%=now%>"></script>
     <script type="text/javascript" src="scripts/vm_snapshots.js?t=<%=now%>"></script>  
 
-    <!-- Plugins -->
+    <!-- Plugin/module API -->
     <script type="text/javascript" src="scripts/ui-custom/pluginListing.js?t=<%=now%>"></script>
     <script type="text/javascript" src="plugins/plugins.js?t=<%=now%>"></script>
+    <script type="text/javascript" src="modules/modules.js?t=<%=now%>"></script>
     <script type="text/javascript" src="scripts/plugins.js?t=<%=now%>"></script>
   </body>
 </html>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6babaf96/ui/modules/modules.js
----------------------------------------------------------------------
diff --git a/ui/modules/modules.js b/ui/modules/modules.js
new file mode 100644
index 0000000..490749f
--- /dev/null
+++ b/ui/modules/modules.js
@@ -0,0 +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.
+(function($, cloudStack) {
+  cloudStack.modules = [
+  ];
+}(jQuery, cloudStack));

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6babaf96/ui/scripts/plugins.js
----------------------------------------------------------------------
diff --git a/ui/scripts/plugins.js b/ui/scripts/plugins.js
index d3e0705..9d1991c 100644
--- a/ui/scripts/plugins.js
+++ b/ui/scripts/plugins.js
@@ -15,6 +15,8 @@
 // specific language governing permissions and limitations
 // under the License.
 (function($, cloudStack, require) {
+  if (!cloudStack.pluginAPI) cloudStack.pluginAPI = {};
+
   var loadCSS = function(path) {
     var $link = $('<link>');
 
@@ -27,27 +29,29 @@
     $('head').append($link);
   };
 
-  var pluginAPI = {
-    pollAsyncJob: pollAsyncJobResult,
-    apiCall: function(command, args) {
-      $.ajax({
-        url: createURL(command),
-        data: args.data,
-        success: args.success,
-        error: function(json) {
-          args.error(parseXMLHttpResponse(json));
-        }
-      })
-    },
-    addSection: function(section) {
-      cloudStack.sections[section.id] = $.extend(section, {
-        customIcon: 'plugins/' + section.id + '/icon.png'
-      });
-    },
-    extend: function(obj) {
-      $.extend(true, cloudStack, obj);
+  $.extend(cloudStack.pluginAPI, {
+    ui: {
+      pollAsyncJob: pollAsyncJobResult,
+      apiCall: function(command, args) {
+        $.ajax({
+          url: createURL(command),
+          data: args.data,
+          success: args.success,
+          error: function(json) {
+            args.error(parseXMLHttpResponse(json));
+          }
+        })
+      },
+      addSection: function(section) {
+        cloudStack.sections[section.id] = $.extend(section, {
+          customIcon: 'plugins/' + section.id + '/icon.png'
+        });
+      },
+      extend: function(obj) {
+        $.extend(true, cloudStack, obj);
+      }
     }
-  };
+  });
   
   cloudStack.sections.plugins = {
     title: 'label.plugins',
@@ -66,9 +70,37 @@
       loadCSS(pluginCSS);
 
       // Execute plugin
-      cloudStack.plugins[pluginID]({
-        ui: pluginAPI
-      });
+      cloudStack.plugins[pluginID](
+        $.extend(true, {}, cloudStack.pluginAPI, {
+          pluginAPI: {
+            extend: function(api) {
+              cloudStack.pluginAPI[pluginID] = api;
+            }
+          }
+        })
+      );
+    });
+  });
+
+  // Load modules
+  $(cloudStack.modules).map(function(index, moduleID) {
+    var basePath = 'modules/' + moduleID + '/';
+    var moduleJS = basePath + moduleID + '.js';
+    var moduleCSS = basePath + moduleID + '.css';
+
+    require([moduleJS], function() {
+      loadCSS(moduleCSS);
+
+      // Execute module
+      cloudStack.modules[moduleID](
+        $.extend(true, {}, cloudStack.pluginAPI, {
+          pluginAPI: {
+            extend: function(api) {
+              cloudStack.pluginAPI[moduleID] = api;
+            }
+          }
+        })
+      );
     });
   });
 }(jQuery, cloudStack, require));


[26/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
Adding release plugin to pom


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a51b566f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a51b566f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a51b566f

Branch: refs/heads/ui-mixed-zone-management
Commit: a51b566fb6eb70f6459f894c4c7dc3e75e610d7c
Parents: 6babaf9
Author: Chip Childers <ch...@apache.org>
Authored: Thu Apr 18 15:03:11 2013 -0400
Committer: Chip Childers <ch...@apache.org>
Committed: Thu Apr 18 16:13:18 2013 -0400

----------------------------------------------------------------------
 pom.xml |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a51b566f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index dbc3907..7d5b4c3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -237,6 +237,22 @@
     <defaultGoal>install</defaultGoal>
     <pluginManagement>
       <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-release-plugin</artifactId>
+          <version>2.2.1</version>
+          <executions>
+            <execution>
+              <id>default</id>
+              <goals>
+                <goal>perform</goal>
+              </goals>
+              <configuration>
+                <pomFileName>pom.xml</pomFileName>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
         <!--This plugin's configuration is used to store Eclipse m2e settings
           only. It has no influence on the Maven build itself. -->
         <plugin>


[17/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
Modifying some extra tabs that cause rendering silliness in the release notes

Signed-off-by: Chip Childers <ch...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7023920d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7023920d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7023920d

Branch: refs/heads/ui-mixed-zone-management
Commit: 7023920d3459516e07ae674bf0d1eb2ebcb99b2c
Parents: 34899f9
Author: Chip Childers <ch...@apache.org>
Authored: Thu Apr 18 12:06:50 2013 -0400
Committer: Chip Childers <ch...@apache.org>
Committed: Thu Apr 18 12:28:09 2013 -0400

----------------------------------------------------------------------
 docs/en-US/Release_Notes.xml |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7023920d/docs/en-US/Release_Notes.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml
index d51e9fb..09cf2e2 100644
--- a/docs/en-US/Release_Notes.xml
+++ b/docs/en-US/Release_Notes.xml
@@ -4181,17 +4181,17 @@ under the License.
                         <listitem>
                             <para>Restart the agent:</para>
                             <programlisting language="Bash">
-                                service cloud-agent stop
-                                killall jsvc
-                                service cloudstack-agent start
+service cloud-agent stop
+killall jsvc
+service cloudstack-agent start
                             </programlisting>
                         </listitem>
                         <listitem>
                             <para>During the upgrade, <filename>log4j-cloud.xml</filename> was simply copied over, so the logs will continue to be added to <filename>/var/log/cloud/agent/agent.log</filename>. There's nothing <emphasis>wrong</emphasis> with this, but if you prefer to be consistent, you can change this by copying over the sample configuration file:</para>
                             <programlisting language="Bash">
-                                cd /etc/cloudstack/agent
-                                mv log4j-cloud.xml.dpkg-dist log4j-cloud.xml
-                                service cloudstack-agent restart
+cd /etc/cloudstack/agent
+mv log4j-cloud.xml.dpkg-dist log4j-cloud.xml
+service cloudstack-agent restart
                             </programlisting>
                         </listitem>
                         <listitem>
@@ -4237,9 +4237,9 @@ gpgcheck=0
                         <listitem>
                             <para>Restart the agent:</para>
                             <programlisting language="Bash">
-                                service cloud-agent stop
-                                killall jsvc
-                                service cloudstack-agent start
+service cloud-agent stop
+killall jsvc
+service cloudstack-agent start
                             </programlisting>
                         </listitem>
                     </orderedlist>
@@ -4252,12 +4252,12 @@ gpgcheck=0
                     <programlisting language="Bash"><prompt>#</prompt> tail -f sysvm.log</programlisting>
                     <para>The output to <filename>sysvm.log</filename> will look something like this:</para>
                     <programlisting language="Bash">
-                        Stopping and starting 1 secondary storage vm(s)...
-                        Done stopping and starting secondary storage vm(s)
-                        Stopping and starting 1 console proxy vm(s)...
-                        Done stopping and starting console proxy vm(s).
-                        Stopping and starting 4 running routing vm(s)...
-                        Done restarting router(s).
+Stopping and starting 1 secondary storage vm(s)...
+Done stopping and starting secondary storage vm(s)
+Stopping and starting 1 console proxy vm(s)...
+Done stopping and starting console proxy vm(s).
+Stopping and starting 4 running routing vm(s)...
+Done restarting router(s).
                     </programlisting>
                 </listitem>
                 <listitem>


[06/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
(CLOUDSTACK-2068) Anti-Affinity - When Vm deployment associated with anity-affinity group fails , it is still included in the vmlist of the anti-affiity group

Changes:
- Added removal of the groups association when VM reaches 'Error' state.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/11244660
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/11244660
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/11244660

Branch: refs/heads/ui-mixed-zone-management
Commit: 112446602d119a7599e7077831ea73892d889a66
Parents: e8269a6
Author: Prachi Damle <pr...@cloud.com>
Authored: Wed Apr 17 14:59:04 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Wed Apr 17 15:00:56 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/api/command/user/vm/ListVMsCmd.java |    2 +-
 .../affinity/AffinityGroupServiceImpl.java         |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11244660/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
index 30f03b8..08f9457 100644
--- a/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java
@@ -95,7 +95,7 @@ public class ListVMsCmd extends BaseListTaggedResourcesCmd {
 
     @Parameter(name=ApiConstants.DETAILS, type=CommandType.LIST, collectionType=CommandType.STRING,
             description="comma separated list of host details requested, " +
-            "value can be a list of [all, group, nics, stats, secgrp, tmpl, servoff, iso, volume, min]." +
+            "value can be a list of [all, group, nics, stats, secgrp, tmpl, servoff, iso, volume, min, affgrp]." +
                     " If no parameter is passed in, the details will be defaulted to all" )
     private List<String> viewDetails;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11244660/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
index 2b490ef..fc2cfcf 100644
--- a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
+++ b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
@@ -295,7 +295,7 @@ public class AffinityGroupServiceImpl extends ManagerBase implements AffinityGro
         if (!status) {
             return false;
         }
-        if ((newState == State.Expunging)) {
+        if ((newState == State.Expunging) || (newState == State.Error)) {
             // cleanup all affinity groups associations of the Expunged VM
             SearchCriteria<AffinityGroupVMMapVO> sc = _affinityGroupVMMapDao.createSearchCriteria();
             sc.addAnd("instanceId", SearchCriteria.Op.EQ, vo.getId());


[15/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
CLOUDSTACK-2033 Fix usage server logging under Debian and Ubuntu


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/96cf7953
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/96cf7953
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/96cf7953

Branch: refs/heads/ui-mixed-zone-management
Commit: 96cf79535fb68881d7d191109ffa6d8f504e3136
Parents: dfbe113
Author: Wido den Hollander <wi...@42on.com>
Authored: Thu Apr 18 10:26:09 2013 +0200
Committer: Wido den Hollander <wi...@42on.com>
Committed: Thu Apr 18 10:26:09 2013 +0200

----------------------------------------------------------------------
 packaging/debian/replace.properties |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/96cf7953/packaging/debian/replace.properties
----------------------------------------------------------------------
diff --git a/packaging/debian/replace.properties b/packaging/debian/replace.properties
index 8c85206..5a0bd58 100644
--- a/packaging/debian/replace.properties
+++ b/packaging/debian/replace.properties
@@ -57,6 +57,6 @@ SYSCONFDIR=/etc
 SYSTEMCLASSPATH=
 SYSTEMJARS=
 USAGECLASSPATH=
-USAGELOG=/var/log/cloudstack/usage
+USAGELOG=/var/log/cloudstack/usage/usage.log
 USAGESYSCONFDIR=/etc/cloudstack/usage
 PACKAGE=cloudstack


[05/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
Removing the VMware template upgrade step from the 4.0.x to 4.1.0 upgrade process, as it's actually only needed from 3.x


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e8269a6e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e8269a6e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e8269a6e

Branch: refs/heads/ui-mixed-zone-management
Commit: e8269a6e26d4dd381f08b15e93997115172494bc
Parents: 11480c3
Author: Chip Childers <ch...@apache.org>
Authored: Wed Apr 17 16:59:03 2013 -0400
Committer: Chip Childers <ch...@apache.org>
Committed: Wed Apr 17 16:59:03 2013 -0400

----------------------------------------------------------------------
 docs/en-US/Release_Notes.xml |   88 +------------------------------------
 1 files changed, 1 insertions(+), 87 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e8269a6e/docs/en-US/Release_Notes.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml
index 97531af..f243a26 100644
--- a/docs/en-US/Release_Notes.xml
+++ b/docs/en-US/Release_Notes.xml
@@ -4112,7 +4112,7 @@ under the License.
         <para>If you run into any issues during upgrades, please feel free to ask questions on users@apache.cloudstack.org or dev@apache.cloudstack.org.</para>
         <section id="upgrade-from-4.0-to-4.1">
             <title>Upgrade from 4.0.x to 4.1.0</title>
-            <para>This section will guide you from Apache CloudStack 4.0.x versions to &PRODUCT; 4.1.0.</para>
+            <para>This section will guide you from &PRODUCT; 4.0.x versions to &PRODUCT; 4.1.0.</para>
             <para>Any steps that are hypervisor-specific will be called out with a note.</para>
             <warning><title>Package Structure Changes</title>
                 <para>The package structure for &PRODUCT; has changed significantly since the 4.0.x releases. If you've compiled your own packages, you'll notice that the package names and the number of packages has changed. This is <emphasis>not</emphasis> a bug.</para>
@@ -4126,92 +4126,6 @@ under the License.
                     <para>Instructions for creating packages from the &PRODUCT; source are in the <ulink url="http://cloudstack.apache.org/docs/en-US/index.html">Installation Guide</ulink>.</para>
                 </listitem>
                 <listitem>
-                    <note><title>For VMware Only</title>
-                        <para>This step is only required if you are using VMware. You can safely skip this step if you are using KVM and/or Xen only.</para>
-                    </note>
-                    <para>In each zone that includes VMware hosts, you need to add a new system VM template. </para>
-                    <orderedlist numeration="loweralpha">
-                        <listitem>
-                            <para>While running the existing 3.0.2 system, log in to the UI as root administrator.</para>
-                        </listitem>
-                        <listitem>
-                            <para>In the left navigation bar, click Templates.</para>
-                        </listitem>
-                        <listitem>
-                            <para>In Select view, click Templates.</para>
-                        </listitem>
-                        <listitem>
-                            <para>Click Register template.</para>
-                            <para>The Register template dialog box is displayed.</para>
-                        </listitem>
-                        <listitem>
-                            <para>In the Register template dialog box, specify the following values (do not change these):</para>
-                            <informaltable>
-                                <tgroup cols="2" align="left" colsep="1" rowsep="1">
-                                    <colspec colwidth="1*" colname="1" colnum="1"/>
-                                    <colspec colwidth="2*" colname="2" colnum="2"/>
-                                    <thead>
-                                        <row>
-                                            <entry><para>Field</para></entry>
-                                            <entry><para>Value</para></entry>
-                                        </row>
-                                    </thead>
-                                    <tbody>
-                                        <row>
-                                            <entry><para>Name</para></entry>
-                                            <entry><para>systemvm-vmware-4.1</para></entry>
-                                        </row>
-                                        <row>
-                                            <entry><para>Description</para></entry>
-                                            <entry><para>systemvm-vmware-4.1</para></entry>
-                                        </row>
-                                        <row>
-                                            <entry><para>URL</para></entry>
-                                            <entry><para>http://download.cloud.com/templates/burbank/burbank-systemvm-08012012.ova</para></entry>
-                                        </row>
-                                        <row>
-                                            <entry><para>Zone</para></entry>
-                                            <entry><para>Choose the zone where this hypervisor is used</para></entry>
-                                        </row>
-                                        <row>
-                                            <entry><para>Hypervisor</para></entry>
-                                            <entry><para>VMware</para></entry>
-                                        </row>
-                                        <row>
-                                            <entry><para>Format</para></entry>
-                                            <entry><para>OVA</para></entry>
-                                        </row>
-                                        <row>
-                                            <entry><para>OS Type</para></entry>
-                                            <entry><para>Debian GNU/Linux 5.0 (32-bit)</para></entry>
-                                        </row>
-                                        <row>
-                                            <entry><para>Extractable</para></entry>
-                                            <entry><para>no</para></entry>
-                                        </row>
-                                        <row>
-                                            <entry><para>Password Enabled</para></entry>
-                                            <entry><para>no</para></entry>
-                                        </row>
-                                        <row>
-                                            <entry><para>Public</para></entry>
-                                            <entry><para>no</para></entry>
-                                        </row>
-                                        <row>
-                                            <entry><para>Featured</para></entry>
-                                            <entry><para>no</para></entry>
-                                        </row>
-                                    </tbody>
-                                </tgroup>
-                            </informaltable>
-                        </listitem>
-                        <listitem>
-                            <para>Watch the screen to be sure that the template downloads successfully and enters
-                                the READY state. Do not proceed until this is successful.</para>
-                        </listitem>
-                    </orderedlist>
-                </listitem>
-                <listitem>
                     <para>Stop your management server or servers. Run this on all management server hosts:</para>
                     <programlisting><prompt>#</prompt> service cloud-management stop</programlisting>
                 </listitem>


[02/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
CLOUDSTACK-1941: introduced "default" flag to account/user objects. Admin/System accounts that come with the CS install are default, and can never be removed. All accounts created by the CS admin, have default flag set to false, and can be removed at any time.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9584815d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9584815d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9584815d

Branch: refs/heads/ui-mixed-zone-management
Commit: 9584815d4f35073214d7893704ff4bf6729a3155
Parents: 26fea7b
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Wed Apr 17 12:02:09 2013 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Wed Apr 17 12:04:18 2013 -0700

----------------------------------------------------------------------
 api/src/com/cloud/user/Account.java                |    4 +++
 api/src/com/cloud/user/User.java                   |    2 +
 core/src/com/cloud/user/AccountVO.java             |    7 ++++++
 core/src/com/cloud/user/UserVO.java                |   11 ++++++++-
 .../com/cloud/server/ConfigurationServerImpl.java  |   17 +++++++++-----
 server/src/com/cloud/user/AccountManagerImpl.java  |   15 +++++++------
 setup/db/db/schema-410to420.sql                    |    6 +++++
 7 files changed, 48 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9584815d/api/src/com/cloud/user/Account.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/user/Account.java b/api/src/com/cloud/user/Account.java
index 5d32fb2..940a0eb 100755
--- a/api/src/com/cloud/user/Account.java
+++ b/api/src/com/cloud/user/Account.java
@@ -22,6 +22,7 @@ import org.apache.cloudstack.acl.ControlledEntity;
 import org.apache.cloudstack.api.Identity;
 import org.apache.cloudstack.api.InternalIdentity;
 
+
 public interface Account extends ControlledEntity, InternalIdentity, Identity {
     public enum Type {
         Normal,
@@ -64,4 +65,7 @@ public interface Account extends ControlledEntity, InternalIdentity, Identity {
     public Long getDefaultZoneId();
     
     public String getUuid();
+    
+    boolean isDefault();
+    
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9584815d/api/src/com/cloud/user/User.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/user/User.java b/api/src/com/cloud/user/User.java
index 3742c7b..dcf27a0 100644
--- a/api/src/com/cloud/user/User.java
+++ b/api/src/com/cloud/user/User.java
@@ -72,5 +72,7 @@ public interface User extends OwnedBy, InternalIdentity {
     String getRegistrationToken();
 
     boolean isRegistered();
+    
+    boolean isDefault();
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9584815d/core/src/com/cloud/user/AccountVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/user/AccountVO.java b/core/src/com/cloud/user/AccountVO.java
index 5e939c5..77110ae 100644
--- a/core/src/com/cloud/user/AccountVO.java
+++ b/core/src/com/cloud/user/AccountVO.java
@@ -65,6 +65,9 @@ public class AccountVO implements Account {
 
     @Column(name="default_zone_id")
     private Long defaultZoneId = null;
+    
+    @Column(name = "default")
+    boolean isDefault;
 
     public AccountVO() {
     	this.uuid = UUID.randomUUID().toString();
@@ -179,4 +182,8 @@ public class AccountVO implements Account {
     	this.uuid = uuid;
     }
 
+    @Override
+    public boolean isDefault() {
+        return isDefault;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9584815d/core/src/com/cloud/user/UserVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/user/UserVO.java b/core/src/com/cloud/user/UserVO.java
index 8b7c4e3..2a85758 100644
--- a/core/src/com/cloud/user/UserVO.java
+++ b/core/src/com/cloud/user/UserVO.java
@@ -29,10 +29,11 @@ import javax.persistence.Id;
 import javax.persistence.Table;
 
 import org.apache.cloudstack.api.Identity;
+import org.apache.cloudstack.api.InternalIdentity;
+
 import com.cloud.user.Account.State;
 import com.cloud.utils.db.Encrypt;
 import com.cloud.utils.db.GenericDao;
-import org.apache.cloudstack.api.InternalIdentity;
 
 /**
  * A bean representing a user
@@ -92,6 +93,9 @@ public class UserVO implements User, Identity, InternalIdentity {
 
     @Column(name="uuid")
     private String uuid;
+    
+    @Column(name = "default")
+    boolean isDefault;
 
     public UserVO() {
         this.uuid = UUID.randomUUID().toString();
@@ -262,4 +266,9 @@ public class UserVO implements User, Identity, InternalIdentity {
         this.uuid = uuid;
     }
     
+    @Override
+    public boolean isDefault() {
+        return isDefault;
+    }
+    
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9584815d/server/src/com/cloud/server/ConfigurationServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java
index 852c00b..06b7871 100755
--- a/server/src/com/cloud/server/ConfigurationServerImpl.java
+++ b/server/src/com/cloud/server/ConfigurationServerImpl.java
@@ -333,21 +333,24 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
     @DB
     protected void saveUser() {
         // insert system account
-        String insertSql = "INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id) VALUES (1, UUID(), 'system', '1', '1')";
+        String insertSql = "INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id, account.default) VALUES (1, UUID(), 'system', '1', '1', 1)";
         Transaction txn = Transaction.currentTxn();
         try {
             PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql);
             stmt.executeUpdate();
         } catch (SQLException ex) {
+            s_logger.warn("Failed to system account due to ", ex);
+
         }
         // insert system user
-        insertSql = "INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname, lastname, created)" +
-                " VALUES (1, UUID(), 'system', RAND(), 1, 'system', 'cloud', now())";
+        insertSql = "INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname, lastname, created, user.default)" +
+                " VALUES (1, UUID(), 'system', RAND(), 1, 'system', 'cloud', now(), 1)";
         txn = Transaction.currentTxn();
         try {
             PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql);
             stmt.executeUpdate();
         } catch (SQLException ex) {
+            s_logger.warn("Failed to create system user due to ", ex);
         }
 
         // insert admin user, but leave the account disabled until we set a
@@ -358,23 +361,25 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
         String lastname = "cloud";
 
         // create an account for the admin user first
-        insertSql = "INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id) VALUES (" + id + ", UUID(), '" + username + "', '1', '1')";
+        insertSql = "INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id, account.default) VALUES (" + id + ", UUID(), '" + username + "', '1', '1', 1)";
         txn = Transaction.currentTxn();
         try {
             PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql);
             stmt.executeUpdate();
         } catch (SQLException ex) {
+            s_logger.warn("Failed to create admin account due to ", ex);
         }
 
         // now insert the user
-        insertSql = "INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname, lastname, created, state) " +
-                "VALUES (" + id + ", UUID(), '" + username + "', RAND(), 2, '" + firstname + "','" + lastname + "',now(), 'disabled')";
+        insertSql = "INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname, lastname, created, state, user.default) " +
+                "VALUES (" + id + ", UUID(), '" + username + "', RAND(), 2, '" + firstname + "','" + lastname + "',now(), 'disabled', 1)";
 
         txn = Transaction.currentTxn();
         try {
             PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql);
             stmt.executeUpdate();
         } catch (SQLException ex) {
+            s_logger.warn("Failed to create admin user due to ", ex);
         }
 
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9584815d/server/src/com/cloud/user/AccountManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/user/AccountManagerImpl.java b/server/src/com/cloud/user/AccountManagerImpl.java
index e74c491..8de73fb 100755
--- a/server/src/com/cloud/user/AccountManagerImpl.java
+++ b/server/src/com/cloud/user/AccountManagerImpl.java
@@ -37,7 +37,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import com.cloud.event.ActionEventUtils;
 import org.apache.cloudstack.acl.ControlledEntity;
 import org.apache.cloudstack.acl.RoleType;
 import org.apache.cloudstack.acl.SecurityChecker;
@@ -53,7 +52,6 @@ import org.apache.log4j.Logger;
 import com.cloud.api.ApiDBUtils;
 import com.cloud.api.query.dao.UserAccountJoinDao;
 import com.cloud.api.query.vo.ControlledViewEntity;
-
 import com.cloud.configuration.Config;
 import com.cloud.configuration.ConfigurationManager;
 import com.cloud.configuration.ResourceLimit;
@@ -65,6 +63,7 @@ import com.cloud.domain.Domain;
 import com.cloud.domain.DomainVO;
 import com.cloud.domain.dao.DomainDao;
 import com.cloud.event.ActionEvent;
+import com.cloud.event.ActionEventUtils;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.AgentUnavailableException;
 import com.cloud.exception.CloudAuthenticationException;
@@ -1178,8 +1177,9 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
 
         checkAccess(caller, null, true, account);
 
-        if (account.getId() == Account.ACCOUNT_ID_SYSTEM) {
-            throw new PermissionDeniedException("Account id : " + accountId + " is a system account, delete is not allowed");
+        //don't allow to delete default account (system and admin)
+        if (account.isDefault()) {
+            throw new InvalidParameterValueException("The account is default and can't be removed");
         }
 
         // Account that manages project(s) can't be removed
@@ -1384,9 +1384,10 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
         if (account.getType() == Account.ACCOUNT_TYPE_PROJECT) {
             throw new InvalidParameterValueException("The specified user doesn't exist in the system");
         }
-
-        if (account.getId() == Account.ACCOUNT_ID_SYSTEM) {
-            throw new InvalidParameterValueException("Account id : " + user.getAccountId() + " is a system account, delete for user associated with this account is not allowed");
+        
+        //don't allow to delete default user (system and admin users)
+        if (user.isDefault()) {
+            throw new InvalidParameterValueException("The user is default and can't be removed");
         }
 
         checkAccess(UserContext.current().getCaller(), null, true, account);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9584815d/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index 6a7a72c..bd145cb 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -720,3 +720,9 @@ ALTER TABLE `cloud`.`network_offerings` ADD COLUMN `eip_associate_public_ip` int
 -- Re-enable foreign key checking, at the end of the upgrade path
 SET foreign_key_checks = 1;			
 
+
+-- Add "default" field to account/user tables
+ALTER TABLE `cloud`.`account` ADD COLUMN `default` int(1) unsigned NOT NULL DEFAULT '0' COMMENT '1 if account is default';
+ALTER TABLE `cloud`.`user` ADD COLUMN `default` int(1) unsigned NOT NULL DEFAULT '0' COMMENT '1 if user is default';
+UPDATE `cloud`.`account` SET `cloud`.`account`.`default`=1 WHERE id IN (1,2);
+UPDATE `cloud`.`user` SET `cloud`.`user`.`default`=1 WHERE id IN (1,2);


[21/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
Adding 2.2 to 4.1 upgrade instructions for RPM and DEB to release notes

Signed-off-by: Chip Childers <ch...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7a4f70ff
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7a4f70ff
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7a4f70ff

Branch: refs/heads/ui-mixed-zone-management
Commit: 7a4f70ff16706c17d1b408f48d72a7e0387cde08
Parents: 31531fa
Author: Chip Childers <ch...@apache.org>
Authored: Thu Apr 18 12:54:59 2013 -0400
Committer: Chip Childers <ch...@apache.org>
Committed: Thu Apr 18 12:54:59 2013 -0400

----------------------------------------------------------------------
 docs/en-US/Release_Notes.xml |  109 ++++++++++++++++++++++++++++++++++---
 1 files changed, 100 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7a4f70ff/docs/en-US/Release_Notes.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml
index d5311e4..60209f6 100644
--- a/docs/en-US/Release_Notes.xml
+++ b/docs/en-US/Release_Notes.xml
@@ -4912,16 +4912,107 @@ service cloudstack-agent start
                         the community provided yum/apt repositories to gain access to the &PRODUCT; binaries.
                     </para>
                 </listitem>
-                <listitem>
-                    <para> After you have configured an appropriate yum or apt repository, you may execute the
-                        one of the following commands as appropriate for your environment in order to upgrade
-                        &PRODUCT;: <programlisting><prompt>#</prompt> <command>yum</command> update cloud-*</programlisting>
-                        <programlisting><prompt>#</prompt> <command>apt-get</command> update
-                            <prompt>#</prompt> <command>apt-get</command> upgrade cloud-*</programlisting>
-                    </para>
-                    <para>You will, of course, have to agree to the changes suggested by Yum or APT.</para>
+                <listitem id="upgrade-deb-packages-22">
+                    <para>If you are using Ubuntu, follow this procedure to upgrade your packages. If not, skip to step <xref linkend="upgrade-rpm-packages-22" />.</para> 
+                    <note><title>Community Packages</title>
+                        <para>This section assumes you're using the community supplied packages for &PRODUCT;. If you've created your own packages and APT repository, substitute your own URL for the ones used in these examples.</para>
+                    </note>
+                    <orderedlist id="debsteps-22">
+                        <listitem>
+                            <para>The first order of business will be to change the sources list for each system with &PRODUCT; packages. This means all management servers, and any hosts that have the KVM agent. (No changes should be necessary for hosts that are running VMware or Xen.)</para>
+                            <para>Start by opening <filename>/etc/apt/sources.list.d/cloudstack.list</filename> on any systems that have &PRODUCT; packages installed.</para>
+                            <para>This file should have one line, which contains:</para>
+                            <programlisting language="Bash">deb http://cloudstack.apt-get.eu/ubuntu precise 4.0</programlisting>
+                            <para>We'll change it to point to the new package repository:</para>
+                            <programlisting language="Bash">deb http://cloudstack.apt-get.eu/ubuntu precise 4.1</programlisting>
+                            <para>If you're using your own package repository, change this line to read as appropriate for your 4.1.0 repository.</para>
+                        </listitem>
+                        <listitem>
+                            <para>Now update your apt package list:</para>
+                            <programlisting language="Bash">$ sudo apt-get update</programlisting>
+                        </listitem>
+                        <listitem id="deb-master-22">
+                            <para>Now that you have the repository configured, it's time to install the <filename>cloudstack-management</filename> package. This will pull in any other dependencies you need.</para>
+                            <programlisting language="Bash">$ sudo apt-get install cloudstack-management</programlisting>
+                        </listitem>
+                        <listitem id="kvm-agent-deb-22">
+                            <para>You will need to manually install the <filename>cloudstack-agent</filename> package:</para>
+                            <programlisting language="Bash">$ sudo apt-get install cloudstack-agent</programlisting>
+                            <para>During the installation of <filename>cloudstack-agent</filename>, APT will copy your <filename>agent.properties</filename>, <filename>log4j-cloud.xml</filename>, and <filename>environment.properties</filename> from <filename>/etc/cloud/agent</filename> to <filename>/etc/cloudstack/agent</filename>.</para>
+                            <para>When prompted whether you wish to keep your configuration, say Yes.</para>
+                        </listitem>
+                        <listitem>
+                            <para>Verify that the file <filename>/etc/cloudstack/agent/environment.properties</filename> has a line that reads:</para>
+                            <programlisting language="Bash">paths.script=/usr/share/cloudstack-common</programlisting>
+                            <para>If not, add the line.</para>
+                        </listitem>
+                        <listitem>
+                            <para>Restart the agent:</para>
+                            <programlisting language="Bash">
+service cloud-agent stop
+killall jsvc
+service cloudstack-agent start
+                            </programlisting>
+                        </listitem>
+                        <listitem>
+                            <para>During the upgrade, <filename>log4j-cloud.xml</filename> was simply copied over, so the logs will continue to be added to <filename>/var/log/cloud/agent/agent.log</filename>. There's nothing <emphasis>wrong</emphasis> with this, but if you prefer to be consistent, you can change this by copying over the sample configuration file:</para>
+                            <programlisting language="Bash">
+cd /etc/cloudstack/agent
+mv log4j-cloud.xml.dpkg-dist log4j-cloud.xml
+service cloudstack-agent restart
+                            </programlisting>
+                        </listitem>
+                        <listitem>
+                            <para>Once the agent is running, you can uninstall the old cloud-* packages from your system:</para>
+                            <programlisting language="Bash">sudo dpkg --purge cloud-agent</programlisting>
+                        </listitem> 
+                    </orderedlist>
                 </listitem>
-                <listitem>
+                <listitem id="upgrade-rpm-packages-22">
+                    <para>If you are using CentOS or RHEL, follow this procedure to upgrade your packages. If not, skip to step <xref linkend="correct-components-xml-22" />.</para> 
+                    <note><title>Community Packages</title>
+                        <para>This section assumes you're using the community supplied packages for &PRODUCT;. If you've created your own packages and yum repository, substitute your own URL for the ones used in these examples.</para>
+                    </note>
+                    <orderedlist id="rpmsteps-22">
+                        <listitem>
+                            <para>The first order of business will be to change the yum repository for each system with &PRODUCT; packages. This means all management servers, and any hosts that have the KVM agent. (No changes should be necessary for hosts that are running VMware or Xen.)</para>
+                            <para>Start by opening <filename>/etc/yum.repos.d/cloudstack.repo</filename> on any systems that have &PRODUCT; packages installed.</para>
+                            <para>This file should have content similar to the following:</para>
+                            <programlisting language="Bash">
+[apache-cloudstack]
+name=Apache CloudStack
+baseurl=http://cloudstack.apt-get.eu/rhel/4.0/
+enabled=1
+gpgcheck=0
+                            </programlisting>
+                            <para>If you are using the community provided package repository, change the baseurl to http://cloudstack.apt-get.eu/rhel/4.1/</para>
+                            <para>If you're using your own package repository, change this line to read as appropriate for your 4.1.0 repository.</para>
+                        </listitem>
+                        <listitem id="rpm-master-22">
+                            <para>Now that you have the repository configured, it's time to install the <filename>cloudstack-management</filename> package by upgrading the older <filename>cloud-client</filename> package.</para>
+                            <programlisting language="Bash">$ sudo yum upgrade cloud-client</programlisting>
+                        </listitem>
+                        <listitem id="kvm-agent-rpm-22">
+                            <para>For KVM hosts, you will need to upgrade the <filename>cloud-agent</filename> package, similarly installing the new version as <filename>cloudstack-agent</filename>.</para>
+                            <programlisting language="Bash">$ sudo yum upgrade cloud-agent</programlisting>
+                            <para>During the installation of <filename>cloudstack-agent</filename>, the RPM will copy your <filename>agent.properties</filename>, <filename>log4j-cloud.xml</filename>, and <filename>environment.properties</filename> from <filename>/etc/cloud/agent</filename> to <filename>/etc/cloudstack/agent</filename>.</para>
+                        </listitem>
+                        <listitem>
+                            <para>Verify that the file <filename>/etc/cloudstack/agent/environment.properties</filename> has a line that reads:</para>
+                            <programlisting language="Bash">paths.script=/usr/share/cloudstack-common</programlisting>
+                            <para>If not, add the line.</para>
+                        </listitem>
+                        <listitem>
+                            <para>Restart the agent:</para>
+                            <programlisting language="Bash">
+service cloud-agent stop
+killall jsvc
+service cloudstack-agent start
+                            </programlisting>
+                        </listitem>
+                    </orderedlist>
+                </listitem>
+                <listitem id="correct-components-xml-22">
                     <para>If you have made changes to your existing copy of the file components.xml in your
                         previous-version CloudStack installation, the changes will be preserved in the upgrade.
                         However, you need to do the following steps to place these changes in a new version of


[04/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
CLOUDSTACK-1941: added isDefault parameter to account/user response


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/11480c3a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/11480c3a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/11480c3a

Branch: refs/heads/ui-mixed-zone-management
Commit: 11480c3af8b7d55625e791f955d7d077ea7f488e
Parents: 8d0bea9
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Wed Apr 17 12:29:09 2013 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Wed Apr 17 13:45:25 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/api/response/AccountResponse.java   |    7 +
 .../cloudstack/api/response/UserResponse.java      |    8 +
 .../src/com/cloud/api/query/QueryManagerImpl.java  |   11 +-
 .../cloud/api/query/dao/AccountJoinDaoImpl.java    |    8 +-
 .../api/query/dao/UserAccountJoinDaoImpl.java      |    1 +
 .../src/com/cloud/api/query/vo/AccountJoinVO.java  |   10 +
 .../com/cloud/api/query/vo/UserAccountJoinVO.java  |   16 +-
 .../com/cloud/server/ConfigurationServerImpl.java  |    5 -
 setup/db/db/schema-410to420.sql                    |  330 ++++++++-------
 9 files changed, 234 insertions(+), 162 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11480c3a/api/src/org/apache/cloudstack/api/response/AccountResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/AccountResponse.java b/api/src/org/apache/cloudstack/api/response/AccountResponse.java
index c109a63..1e59822 100644
--- a/api/src/org/apache/cloudstack/api/response/AccountResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/AccountResponse.java
@@ -183,6 +183,9 @@ public class AccountResponse extends BaseResponse {
 
     @SerializedName(ApiConstants.ACCOUNT_DETAILS) @Param(description="details for the account")
     private Map<String, String> details;
+    
+    @SerializedName(ApiConstants.IS_DEFAULT) @Param(description="true if account is default, false otherwise", since="4.2.0")
+    private Boolean isDefault;
 
 
     @Override
@@ -381,4 +384,8 @@ public class AccountResponse extends BaseResponse {
     public void setDefaultZone(String defaultZoneId) {
         this.defaultZoneId = defaultZoneId;
     }
+    
+    public void setIsDefault(Boolean isDefault) {
+        this.isDefault = isDefault;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11480c3a/api/src/org/apache/cloudstack/api/response/UserResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/UserResponse.java b/api/src/org/apache/cloudstack/api/response/UserResponse.java
index 9cd25cb..e70a310 100644
--- a/api/src/org/apache/cloudstack/api/response/UserResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/UserResponse.java
@@ -18,6 +18,7 @@ package org.apache.cloudstack.api.response;
 
 import java.util.Date;
 
+import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseResponse;
 import org.apache.cloudstack.api.EntityReference;
 
@@ -74,6 +75,9 @@ public class UserResponse extends BaseResponse {
 
     @SerializedName("iscallerchilddomain") @Param(description="the boolean value representing if the updating target is in caller's child domain")
     private boolean isCallerChildDomain;
+    
+    @SerializedName(ApiConstants.IS_DEFAULT) @Param(description="true if user is default, false otherwise", since="4.2.0")
+    private Boolean isDefault;
 
     @Override
     public String getObjectId() {
@@ -206,4 +210,8 @@ public class UserResponse extends BaseResponse {
     public void setIsCallerChildDomain(boolean isCallerChildDomain) {
         this.isCallerChildDomain = isCallerChildDomain;
     }
+    
+    public void setIsDefault(Boolean isDefault) {
+        this.isDefault = isDefault;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11480c3a/server/src/com/cloud/api/query/QueryManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java
index 5ffc2db..3114ea5 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -25,12 +25,9 @@ import java.util.Set;
 
 import javax.ejb.Local;
 import javax.inject.Inject;
-import javax.naming.ConfigurationException;
 
-import org.apache.cloudstack.affinity.AffinityGroup;
 import org.apache.cloudstack.affinity.AffinityGroupResponse;
 import org.apache.cloudstack.affinity.AffinityGroupVMMapVO;
-import org.apache.cloudstack.affinity.AffinityGroupVO;
 import org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDao;
 import org.apache.cloudstack.api.command.admin.host.ListHostsCmd;
 import org.apache.cloudstack.api.command.admin.router.ListRoutersCmd;
@@ -111,7 +108,6 @@ import com.cloud.api.query.vo.UserAccountJoinVO;
 import com.cloud.api.query.vo.UserVmJoinVO;
 import com.cloud.api.query.vo.VolumeJoinVO;
 import com.cloud.configuration.dao.ConfigurationDao;
-import com.cloud.dc.DataCenterVO;
 import com.cloud.domain.Domain;
 import com.cloud.domain.DomainVO;
 import com.cloud.domain.dao.DomainDao;
@@ -124,9 +120,9 @@ import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.network.security.SecurityGroupVMMapVO;
 import com.cloud.network.security.dao.SecurityGroupVMMapDao;
 import com.cloud.org.Grouping;
-import com.cloud.projects.ProjectInvitation;
-import com.cloud.projects.Project.ListProjectResourcesCriteria;
 import com.cloud.projects.Project;
+import com.cloud.projects.Project.ListProjectResourcesCriteria;
+import com.cloud.projects.ProjectInvitation;
 import com.cloud.projects.ProjectManager;
 import com.cloud.projects.dao.ProjectAccountDao;
 import com.cloud.projects.dao.ProjectDao;
@@ -142,10 +138,8 @@ import com.cloud.user.dao.AccountDao;
 import com.cloud.utils.DateUtil;
 import com.cloud.utils.Pair;
 import com.cloud.utils.Ternary;
-import com.cloud.utils.component.Manager;
 import com.cloud.utils.component.ManagerBase;
 import com.cloud.utils.db.Filter;
-import com.cloud.utils.db.JoinBuilder;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Func;
@@ -1699,6 +1693,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         sb.and("typeNEQ", sb.entity().getType(), SearchCriteria.Op.NEQ);
         sb.and("idNEQ", sb.entity().getId(), SearchCriteria.Op.NEQ);
 
+
         if (listForDomain && isRecursive) {
             sb.and("path", sb.entity().getDomainPath(), SearchCriteria.Op.LIKE);
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11480c3a/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
index 51ac5e6..796ae54 100644
--- a/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
@@ -20,17 +20,16 @@ import java.util.List;
 
 import javax.ejb.Local;
 
+import org.apache.cloudstack.api.response.AccountResponse;
+import org.apache.cloudstack.api.response.UserResponse;
 import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
 
 import com.cloud.api.ApiDBUtils;
 import com.cloud.api.query.ViewResponseHelper;
 import com.cloud.api.query.vo.AccountJoinVO;
 import com.cloud.api.query.vo.UserAccountJoinVO;
 import com.cloud.configuration.Resource.ResourceType;
-import org.apache.cloudstack.api.response.AccountResponse;
-import org.apache.cloudstack.api.response.UserResponse;
-import org.springframework.stereotype.Component;
-
 import com.cloud.user.Account;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
@@ -66,6 +65,7 @@ public class AccountJoinDaoImpl extends GenericDaoBase<AccountJoinVO, Long> impl
         accountResponse.setState(account.getState().toString());
         accountResponse.setNetworkDomain(account.getNetworkDomain());
         accountResponse.setDefaultZone(account.getDataCenterUuid());
+        accountResponse.setIsDefault(account.isDefault());
 
         // get network stat
         accountResponse.setBytesReceived(account.getBytesReceived());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11480c3a/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java
index 7072324..43b3a2d 100644
--- a/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/UserAccountJoinDaoImpl.java
@@ -80,6 +80,7 @@ public class UserAccountJoinDaoImpl extends GenericDaoBase<UserAccountJoinVO, Lo
         userResponse.setUsername(usr.getUsername());
         userResponse.setApiKey(usr.getApiKey());
         userResponse.setSecretKey(usr.getSecretKey());
+        userResponse.setIsDefault(usr.isDefault());
 
         // set async job
         userResponse.setJobId(usr.getJobUuid());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11480c3a/server/src/com/cloud/api/query/vo/AccountJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/AccountJoinVO.java b/server/src/com/cloud/api/query/vo/AccountJoinVO.java
index 1cb17ef..800da78 100644
--- a/server/src/com/cloud/api/query/vo/AccountJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/AccountJoinVO.java
@@ -184,6 +184,9 @@ public class AccountJoinVO extends BaseViewVO implements InternalIdentity, Ident
 
     @Column(name="job_status")
     private int jobStatus;
+    
+    @Column(name = "default")
+    boolean isDefault;
 
     public AccountJoinVO() {
     }
@@ -672,6 +675,13 @@ public class AccountJoinVO extends BaseViewVO implements InternalIdentity, Ident
     }
 
 
+    public boolean isDefault() {
+        return isDefault;
+    }
 
 
+    public void setDefault(boolean isDefault) {
+        this.isDefault = isDefault;
+    }
+ 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11480c3a/server/src/com/cloud/api/query/vo/UserAccountJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/UserAccountJoinVO.java b/server/src/com/cloud/api/query/vo/UserAccountJoinVO.java
index 44637db..d85392f 100644
--- a/server/src/com/cloud/api/query/vo/UserAccountJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/UserAccountJoinVO.java
@@ -23,12 +23,12 @@ import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
-import com.cloud.utils.db.Encrypt;
-import com.cloud.utils.db.GenericDao;
-
 import org.apache.cloudstack.api.Identity;
 import org.apache.cloudstack.api.InternalIdentity;
 
+import com.cloud.utils.db.Encrypt;
+import com.cloud.utils.db.GenericDao;
+
 @Entity
 @Table(name="user_view")
 public class UserAccountJoinVO extends BaseViewVO implements InternalIdentity, Identity {
@@ -116,6 +116,9 @@ public class UserAccountJoinVO extends BaseViewVO implements InternalIdentity, I
 
     @Column(name="job_status")
     private int jobStatus;
+    
+    @Column(name = "default")
+    boolean isDefault;
 
     public UserAccountJoinVO() {
     }
@@ -345,6 +348,13 @@ public class UserAccountJoinVO extends BaseViewVO implements InternalIdentity, I
         this.jobStatus = jobStatus;
     }
 
+    public boolean isDefault() {
+        return isDefault;
+    }
 
+    public void setDefault(boolean isDefault) {
+        this.isDefault = isDefault;
+    }
 
+    
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11480c3a/server/src/com/cloud/server/ConfigurationServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java
index 06b7871..c4da1ab 100755
--- a/server/src/com/cloud/server/ConfigurationServerImpl.java
+++ b/server/src/com/cloud/server/ConfigurationServerImpl.java
@@ -339,8 +339,6 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
             PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql);
             stmt.executeUpdate();
         } catch (SQLException ex) {
-            s_logger.warn("Failed to system account due to ", ex);
-
         }
         // insert system user
         insertSql = "INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname, lastname, created, user.default)" +
@@ -350,7 +348,6 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
             PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql);
             stmt.executeUpdate();
         } catch (SQLException ex) {
-            s_logger.warn("Failed to create system user due to ", ex);
         }
 
         // insert admin user, but leave the account disabled until we set a
@@ -367,7 +364,6 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
             PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql);
             stmt.executeUpdate();
         } catch (SQLException ex) {
-            s_logger.warn("Failed to create admin account due to ", ex);
         }
 
         // now insert the user
@@ -379,7 +375,6 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
             PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql);
             stmt.executeUpdate();
         } catch (SQLException ex) {
-            s_logger.warn("Failed to create admin user due to ", ex);
         }
 
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11480c3a/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index bd145cb..a36be0e 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -279,148 +279,7 @@ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Project Defaults', 'DEFAULT'
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Project Defaults', 'DEFAULT', 'management-server', 'max.project.primary.storage', '200', 'The default maximum primary storage space (in GiB) that can be used for a project');
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Project Defaults', 'DEFAULT', 'management-server', 'max.project.secondary.storage', '400', 'The default maximum secondary storage space (in GiB) that can be used for a project');
 
-DROP VIEW IF EXISTS `cloud`.`account_view`;
-CREATE VIEW `cloud`.`account_view` AS
-    select
-        account.id,
-        account.uuid,
-        account.account_name,
-        account.type,
-        account.state,
-        account.removed,
-        account.cleanup_needed,
-        account.network_domain,
-        domain.id domain_id,
-        domain.uuid domain_uuid,
-        domain.name domain_name,
-        domain.path domain_path,
-        data_center.id data_center_id,
-        data_center.uuid data_center_uuid,
-        data_center.name data_center_name,
-        account_netstats_view.bytesReceived,
-        account_netstats_view.bytesSent,
-        vmlimit.max vmLimit,
-        vmcount.count vmTotal,
-        runningvm.vmcount runningVms,
-        stoppedvm.vmcount stoppedVms,
-        iplimit.max ipLimit,
-        ipcount.count ipTotal,
-        free_ip_view.free_ip ipFree,
-        volumelimit.max volumeLimit,
-        volumecount.count volumeTotal,
-        snapshotlimit.max snapshotLimit,
-        snapshotcount.count snapshotTotal,
-        templatelimit.max templateLimit,
-        templatecount.count templateTotal,
-        vpclimit.max vpcLimit,
-        vpccount.count vpcTotal,
-        projectlimit.max projectLimit,
-        projectcount.count projectTotal,
-        networklimit.max networkLimit,
-        networkcount.count networkTotal,
-        cpulimit.max cpuLimit,
-        cpucount.count cpuTotal,
-        memorylimit.max memoryLimit,
-        memorycount.count memoryTotal,
-        primary_storage_limit.max primaryStorageLimit,
-        primary_storage_count.count primaryStorageTotal,
-        secondary_storage_limit.max secondaryStorageLimit,
-        secondary_storage_count.count secondaryStorageTotal,
-        async_job.id job_id,
-        async_job.uuid job_uuid,
-        async_job.job_status job_status,
-        async_job.account_id job_account_id
-    from
-        `cloud`.`free_ip_view`,
-        `cloud`.`account`
-            inner join
-        `cloud`.`domain` ON account.domain_id = domain.id
-            left join
-        `cloud`.`data_center` ON account.default_zone_id = data_center.id
-            left join
-        `cloud`.`account_netstats_view` ON account.id = account_netstats_view.account_id
-            left join
-        `cloud`.`resource_limit` vmlimit ON account.id = vmlimit.account_id
-            and vmlimit.type = 'user_vm'
-            left join
-        `cloud`.`resource_count` vmcount ON account.id = vmcount.account_id
-            and vmcount.type = 'user_vm'
-            left join
-        `cloud`.`account_vmstats_view` runningvm ON account.id = runningvm.account_id
-            and runningvm.state = 'Running'
-            left join
-        `cloud`.`account_vmstats_view` stoppedvm ON account.id = stoppedvm.account_id
-           and stoppedvm.state = 'Stopped'
-            left join
-        `cloud`.`resource_limit` iplimit ON account.id = iplimit.account_id
-            and iplimit.type = 'public_ip'
-            left join
-        `cloud`.`resource_count` ipcount ON account.id = ipcount.account_id
-            and ipcount.type = 'public_ip'
-            left join
-        `cloud`.`resource_limit` volumelimit ON account.id = volumelimit.account_id
-            and volumelimit.type = 'volume'
-            left join
-        `cloud`.`resource_count` volumecount ON account.id = volumecount.account_id
-            and volumecount.type = 'volume'
-            left join
-        `cloud`.`resource_limit` snapshotlimit ON account.id = snapshotlimit.account_id
-            and snapshotlimit.type = 'snapshot'
-            left join
-        `cloud`.`resource_count` snapshotcount ON account.id = snapshotcount.account_id
-            and snapshotcount.type = 'snapshot'
-            left join
-        `cloud`.`resource_limit` templatelimit ON account.id = templatelimit.account_id
-            and templatelimit.type = 'template'
-            left join
-        `cloud`.`resource_count` templatecount ON account.id = templatecount.account_id
-            and templatecount.type = 'template'
-            left join
-        `cloud`.`resource_limit` vpclimit ON account.id = vpclimit.account_id
-            and vpclimit.type = 'vpc'
-            left join
-        `cloud`.`resource_count` vpccount ON account.id = vpccount.account_id
-            and vpccount.type = 'vpc'
-            left join
-        `cloud`.`resource_limit` projectlimit ON account.id = projectlimit.account_id
-            and projectlimit.type = 'project'
-            left join
-        `cloud`.`resource_count` projectcount ON account.id = projectcount.account_id
-            and projectcount.type = 'project'
-            left join
-        `cloud`.`resource_limit` networklimit ON account.id = networklimit.account_id
-            and networklimit.type = 'network'
-            left join
-        `cloud`.`resource_count` networkcount ON account.id = networkcount.account_id
-            and networkcount.type = 'network'
-            left join
-        `cloud`.`resource_limit` cpulimit ON account.id = cpulimit.account_id
-            and cpulimit.type = 'cpu'
-            left join
-        `cloud`.`resource_count` cpucount ON account.id = cpucount.account_id
-            and cpucount.type = 'cpu'
-            left join
-        `cloud`.`resource_limit` memorylimit ON account.id = memorylimit.account_id
-            and memorylimit.type = 'memory'
-            left join
-        `cloud`.`resource_count` memorycount ON account.id = memorycount.account_id
-            and memorycount.type = 'memory'
-            left join
-        `cloud`.`resource_limit` primary_storage_limit ON account.id = primary_storage_limit.account_id
-            and primary_storage_limit.type = 'primary_storage'
-            left join
-        `cloud`.`resource_count` primary_storage_count ON account.id = primary_storage_count.account_id
-            and primary_storage_count.type = 'primary_storage'
-            left join
-        `cloud`.`resource_limit` secondary_storage_limit ON account.id = secondary_storage_limit.account_id
-            and secondary_storage_limit.type = 'secondary_storage'
-            left join
-        `cloud`.`resource_count` secondary_storage_count ON account.id = secondary_storage_count.account_id
-            and secondary_storage_count.type = 'secondary_storage'
-            left join
-        `cloud`.`async_job` ON async_job.instance_id = account.id
-            and async_job.instance_type = 'Account'
-            and async_job.job_status = 0;
+
 
 ALTER TABLE `cloud`.`remote_access_vpn` ADD COLUMN `id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT COMMENT 'id';
 ALTER TABLE `cloud`.`remote_access_vpn` ADD COLUMN `uuid` varchar(40) UNIQUE;
@@ -726,3 +585,190 @@ ALTER TABLE `cloud`.`account` ADD COLUMN `default` int(1) unsigned NOT NULL DEFA
 ALTER TABLE `cloud`.`user` ADD COLUMN `default` int(1) unsigned NOT NULL DEFAULT '0' COMMENT '1 if user is default';
 UPDATE `cloud`.`account` SET `cloud`.`account`.`default`=1 WHERE id IN (1,2);
 UPDATE `cloud`.`user` SET `cloud`.`user`.`default`=1 WHERE id IN (1,2);
+
+ALTER VIEW `cloud`.`user_view` AS
+    select 
+        user.id,
+        user.uuid,
+        user.username,
+        user.password,
+        user.firstname,
+        user.lastname,
+        user.email,
+        user.state,
+        user.api_key,
+        user.secret_key,
+        user.created,
+        user.removed,
+        user.timezone,
+        user.registration_token,
+        user.is_registered,
+        user.incorrect_login_attempts,
+        user.default,
+        account.id account_id,
+        account.uuid account_uuid,
+        account.account_name account_name,
+        account.type account_type,
+        domain.id domain_id,
+        domain.uuid domain_uuid,
+        domain.name domain_name,
+        domain.path domain_path,
+        async_job.id job_id,
+        async_job.uuid job_uuid,
+        async_job.job_status job_status,
+        async_job.account_id job_account_id
+    from
+        `cloud`.`user`
+            inner join
+        `cloud`.`account` ON user.account_id = account.id
+            inner join
+        `cloud`.`domain` ON account.domain_id = domain.id
+            left join
+        `cloud`.`async_job` ON async_job.instance_id = user.id
+            and async_job.instance_type = 'User'
+            and async_job.job_status = 0;
+       
+
+DROP VIEW IF EXISTS `cloud`.`account_view`;
+CREATE VIEW `cloud`.`account_view` AS
+    select
+        account.id,
+        account.uuid,
+        account.account_name,
+        account.type,
+        account.state,
+        account.removed,
+        account.cleanup_needed,
+        account.network_domain,
+        account.default,
+        domain.id domain_id,
+        domain.uuid domain_uuid,
+        domain.name domain_name,
+        domain.path domain_path,
+        data_center.id data_center_id,
+        data_center.uuid data_center_uuid,
+        data_center.name data_center_name,
+        account_netstats_view.bytesReceived,
+        account_netstats_view.bytesSent,
+        vmlimit.max vmLimit,
+        vmcount.count vmTotal,
+        runningvm.vmcount runningVms,
+        stoppedvm.vmcount stoppedVms,
+        iplimit.max ipLimit,
+        ipcount.count ipTotal,
+        free_ip_view.free_ip ipFree,
+        volumelimit.max volumeLimit,
+        volumecount.count volumeTotal,
+        snapshotlimit.max snapshotLimit,
+        snapshotcount.count snapshotTotal,
+        templatelimit.max templateLimit,
+        templatecount.count templateTotal,
+        vpclimit.max vpcLimit,
+        vpccount.count vpcTotal,
+        projectlimit.max projectLimit,
+        projectcount.count projectTotal,
+        networklimit.max networkLimit,
+        networkcount.count networkTotal,
+        cpulimit.max cpuLimit,
+        cpucount.count cpuTotal,
+        memorylimit.max memoryLimit,
+        memorycount.count memoryTotal,
+        primary_storage_limit.max primaryStorageLimit,
+        primary_storage_count.count primaryStorageTotal,
+        secondary_storage_limit.max secondaryStorageLimit,
+        secondary_storage_count.count secondaryStorageTotal,
+        async_job.id job_id,
+        async_job.uuid job_uuid,
+        async_job.job_status job_status,
+        async_job.account_id job_account_id
+    from
+        `cloud`.`free_ip_view`,
+        `cloud`.`account`
+            inner join
+        `cloud`.`domain` ON account.domain_id = domain.id
+            left join
+        `cloud`.`data_center` ON account.default_zone_id = data_center.id
+            left join
+        `cloud`.`account_netstats_view` ON account.id = account_netstats_view.account_id
+            left join
+        `cloud`.`resource_limit` vmlimit ON account.id = vmlimit.account_id
+            and vmlimit.type = 'user_vm'
+            left join
+        `cloud`.`resource_count` vmcount ON account.id = vmcount.account_id
+            and vmcount.type = 'user_vm'
+            left join
+        `cloud`.`account_vmstats_view` runningvm ON account.id = runningvm.account_id
+            and runningvm.state = 'Running'
+            left join
+        `cloud`.`account_vmstats_view` stoppedvm ON account.id = stoppedvm.account_id
+           and stoppedvm.state = 'Stopped'
+            left join
+        `cloud`.`resource_limit` iplimit ON account.id = iplimit.account_id
+            and iplimit.type = 'public_ip'
+            left join
+        `cloud`.`resource_count` ipcount ON account.id = ipcount.account_id
+            and ipcount.type = 'public_ip'
+            left join
+        `cloud`.`resource_limit` volumelimit ON account.id = volumelimit.account_id
+            and volumelimit.type = 'volume'
+            left join
+        `cloud`.`resource_count` volumecount ON account.id = volumecount.account_id
+            and volumecount.type = 'volume'
+            left join
+        `cloud`.`resource_limit` snapshotlimit ON account.id = snapshotlimit.account_id
+            and snapshotlimit.type = 'snapshot'
+            left join
+        `cloud`.`resource_count` snapshotcount ON account.id = snapshotcount.account_id
+            and snapshotcount.type = 'snapshot'
+            left join
+        `cloud`.`resource_limit` templatelimit ON account.id = templatelimit.account_id
+            and templatelimit.type = 'template'
+            left join
+        `cloud`.`resource_count` templatecount ON account.id = templatecount.account_id
+            and templatecount.type = 'template'
+            left join
+        `cloud`.`resource_limit` vpclimit ON account.id = vpclimit.account_id
+            and vpclimit.type = 'vpc'
+            left join
+        `cloud`.`resource_count` vpccount ON account.id = vpccount.account_id
+            and vpccount.type = 'vpc'
+            left join
+        `cloud`.`resource_limit` projectlimit ON account.id = projectlimit.account_id
+            and projectlimit.type = 'project'
+            left join
+        `cloud`.`resource_count` projectcount ON account.id = projectcount.account_id
+            and projectcount.type = 'project'
+            left join
+        `cloud`.`resource_limit` networklimit ON account.id = networklimit.account_id
+            and networklimit.type = 'network'
+            left join
+        `cloud`.`resource_count` networkcount ON account.id = networkcount.account_id
+            and networkcount.type = 'network'
+            left join
+        `cloud`.`resource_limit` cpulimit ON account.id = cpulimit.account_id
+            and cpulimit.type = 'cpu'
+            left join
+        `cloud`.`resource_count` cpucount ON account.id = cpucount.account_id
+            and cpucount.type = 'cpu'
+            left join
+        `cloud`.`resource_limit` memorylimit ON account.id = memorylimit.account_id
+            and memorylimit.type = 'memory'
+            left join
+        `cloud`.`resource_count` memorycount ON account.id = memorycount.account_id
+            and memorycount.type = 'memory'
+            left join
+        `cloud`.`resource_limit` primary_storage_limit ON account.id = primary_storage_limit.account_id
+            and primary_storage_limit.type = 'primary_storage'
+            left join
+        `cloud`.`resource_count` primary_storage_count ON account.id = primary_storage_count.account_id
+            and primary_storage_count.type = 'primary_storage'
+            left join
+        `cloud`.`resource_limit` secondary_storage_limit ON account.id = secondary_storage_limit.account_id
+            and secondary_storage_limit.type = 'secondary_storage'
+            left join
+        `cloud`.`resource_count` secondary_storage_count ON account.id = secondary_storage_count.account_id
+            and secondary_storage_count.type = 'secondary_storage'
+            left join
+        `cloud`.`async_job` ON async_job.instance_id = account.id
+            and async_job.instance_type = 'Account'
+            and async_job.job_status = 0;
\ No newline at end of file


[13/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
pep8 compliance for cloudstackConnection

Signed-off-by: Prasanna Santhanam <ts...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b12905b7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b12905b7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b12905b7

Branch: refs/heads/ui-mixed-zone-management
Commit: b12905b7a828a0766a521ca9859158d4356405ed
Parents: e03176c
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Thu Apr 18 07:44:25 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Thu Apr 18 07:44:25 2013 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_public_ip_range.py |    2 +-
 tools/marvin/marvin/cloudstackConnection.py    |   92 ++++++++++++-------
 2 files changed, 58 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b12905b7/test/integration/smoke/test_public_ip_range.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_public_ip_range.py b/test/integration/smoke/test_public_ip_range.py
index a7aad6b..7c965ea 100644
--- a/test/integration/smoke/test_public_ip_range.py
+++ b/test/integration/smoke/test_public_ip_range.py
@@ -49,7 +49,7 @@ class Services:
                         "endip": "10.102.197.73",
                         "zoneid": "1",
                         "podid": "",
-                        "vlan": "101",
+                        "vlan": "4444",
                     }
 
 class TesDedicatePublicIPRange(cloudstackTestCase):

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b12905b7/tools/marvin/marvin/cloudstackConnection.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py
index 5fd3e12..14b12e7 100644
--- a/tools/marvin/marvin/cloudstackConnection.py
+++ b/tools/marvin/marvin/cloudstackConnection.py
@@ -5,9 +5,9 @@
 # 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
@@ -22,16 +22,20 @@ import hmac
 import hashlib
 import time
 import cloudstackException
-from cloudstackAPI import * 
+from cloudstackAPI import *
 import jsonHelper
 from requests import ConnectionError
 from requests import HTTPError
 from requests import Timeout
 from requests import RequestException
 
+
 class cloudConnection(object):
-    def __init__(self, mgtSvr, port=8096, apiKey=None, securityKey=None, asyncTimeout=3600, logging=None,
-                 scheme='http', path='client/api'):
+    """ Connections to make API calls to the cloudstack management server
+    """
+    def __init__(self, mgtSvr, port=8096, apiKey=None, securityKey=None,
+                 asyncTimeout=3600, logging=None, scheme='http',
+                 path='client/api'):
         self.apiKey = apiKey
         self.securityKey = securityKey
         self.mgtSvr = mgtSvr
@@ -42,16 +46,18 @@ class cloudConnection(object):
         self.asyncTimeout = asyncTimeout
         self.auth = True
         if port == 8096 or \
-           (self.apiKey == None and self.securityKey == None):
+           (self.apiKey is None and self.securityKey is None):
             self.auth = False
         if scheme not in ['http', 'https']:
                 raise RequestException("Protocol must be HTTP")
         self.protocol = scheme
-        self.baseurl = "%s://%s:%d/%s"%(self.protocol, self.mgtSvr, self.port, self.path)
+        self.baseurl = "%s://%s:%d/%s"\
+                       % (self.protocol, self.mgtSvr, self.port, self.path)
 
     def __copy__(self):
-        return cloudConnection(self.mgtSvr, self.port, self.apiKey, self.securityKey, self.asyncTimeout,
-            self.logging, self.protocol, self.path)
+        return cloudConnection(self.mgtSvr, self.port, self.apiKey,
+                               self.securityKey, self.asyncTimeout,
+                               self.logging, self.protocol, self.path)
 
     def poll(self, jobid, response):
         """
@@ -68,16 +74,19 @@ class cloudConnection(object):
             asyncResonse = self.marvin_request(cmd, response_type=response)
 
             if asyncResonse.jobstatus == 2:
-                raise cloudstackException.cloudstackAPIException("asyncquery", asyncResonse.jobresult)
+                raise cloudstackException.cloudstackAPIException(
+                    "asyncquery", asyncResonse.jobresult)
             elif asyncResonse.jobstatus == 1:
                 return asyncResonse
 
             time.sleep(5)
             if self.logging is not None:
-                self.logging.debug("job: %s still processing, will timeout in %ds"%(jobid, timeout))
+                self.logging.debug("job: %s still processing,"
+                                   " will timeout in %ds" % (jobid, timeout))
             timeout = timeout - 5
 
-        raise cloudstackException.cloudstackAPIException("asyncquery", "Async job timeout %s"%jobid)
+        raise cloudstackException.cloudstackAPIException(
+            "asyncquery", "Async job timeout %s" % jobid)
 
     def sign(self, payload):
         """
@@ -90,19 +99,26 @@ class cloudConnection(object):
         params.sort(key=lambda k: str.lower(k[0]))
         hashStr = "&".join(
             ["=".join(
-                [str.lower(r[0]), str.lower(urllib.quote_plus(str(r[1]))).replace("+", "%20")]
+                [str.lower(r[0]),
+                 str.lower(
+                     urllib.quote_plus(str(r[1]))
+                 ).replace("+", "%20")]
             ) for r in params]
         )
-        signature = base64.encodestring(hmac.new(self.securityKey, hashStr, hashlib.sha1).digest()).strip()
-        self.logging.info("Computed Signature by Marvin: %s"%signature)
+        signature = base64.encodestring(hmac.new(
+            self.securityKey, hashStr, hashlib.sha1).digest()).strip()
+        self.logging.info("Computed Signature by Marvin: %s" % signature)
         return signature
 
     def request(self, command, auth=True, payload={}, data={}):
         """
-        Makes requests on the `integration.api.port`
-        @param command: cloudstack API command name eg: deployVirtualMachineCommand
-        @param auth: Authentication (apikey,secretKey) => True, else False
-        @param payload: GET param data composed as a dictionary of key,value pairs
+        Makes requests using auth or over integration port
+        @param command: cloudstack API command name
+                    eg: deployVirtualMachineCommand
+        @param auth: Authentication (apikey,secretKey) => True
+                     else False for integration.api.port
+        @param payload: GET param data composed as a dictionary
+                        of key,value pairs
         @param data: POST data as a dictionary
         @return:
         """
@@ -114,23 +130,24 @@ class cloudConnection(object):
             signature = self.sign(payload)
             payload["signature"] = signature
 
-
         try:
             if data:
-                response = requests.get(self.baseurl, params=payload, data=data)
+                response = requests.get(self.baseurl, params=payload,
+                                        data=data)
             else:
                 response = requests.get(self.baseurl, params=payload)
         except ConnectionError, c:
-            self.logging.debug("Connection refused. Reason: %s"%(self.baseurl, c))
+            self.logging.debug("Connection refused. Reason: %s" %
+                               (self.baseurl, c))
             raise c
         except HTTPError, h:
-            self.logging.debug("Server returned error code: %s"%h)
+            self.logging.debug("Server returned error code: %s" % h)
             raise h
         except Timeout, t:
-            self.logging.debug("Connection timed out with %s"%t)
+            self.logging.debug("Connection timed out with %s" % t)
             raise t
-        except RequestException,r:
-            self.logging.debug("Error returned by server %s"%r)
+        except RequestException, r:
+            self.logging.debug("Error returned by server %s" % r)
             raise r
         else:
             return response
@@ -144,7 +161,8 @@ class cloudConnection(object):
         requests = {}
         required = []
         for attribute in dir(cmd):
-            if attribute != "__doc__" and attribute != "__init__" and attribute != "__module__":
+            if attribute != "__doc__" and attribute != "__init__" and \
+               attribute != "__module__":
                 if attribute == "isAsync":
                     isAsync = getattr(cmd, attribute)
                 elif attribute == "required":
@@ -155,7 +173,8 @@ class cloudConnection(object):
         cmdname = cmd.__class__.__name__.replace("Cmd", "")
         for requiredPara in required:
             if requests[requiredPara] is None:
-                raise cloudstackException.cloudstackAPIException(cmdname, "%s is required"%requiredPara)
+                raise cloudstackException.cloudstackAPIException(
+                    cmdname, "%s is required" % requiredPara)
         for param, value in requests.items():
             if value is None:
                 requests.pop(param)
@@ -169,8 +188,8 @@ class cloudConnection(object):
                         requests.pop(param)
                         i = 0
                         for val in value:
-                            for k,v in val.iteritems():
-                                requests["%s[%d].%s"%(param,i,k)] = v
+                            for k, v in val.iteritems():
+                                requests["%s[%d].%s" % (param, i, k)] = v
                             i = i + 1
         return cmdname, isAsync, requests
 
@@ -184,14 +203,17 @@ class cloudConnection(object):
         @return:
         """
         cmdname, isAsync, payload = self.sanitize_command(cmd)
-        self.logging.info("sending command: %s %s"%(cmdname, str(payload)))
+        self.logging.info("sending command: %s %s" % (cmdname, str(payload)))
         if self.auth:
-            response = self.request(cmdname, auth=True, payload=payload, data=data)
+            response = self.request(
+                cmdname, auth=True, payload=payload, data=data)
         else:
-            response = self.request(cmdname, auth=False, payload=payload, data=data)
+            response = self.request(
+                cmdname, auth=False, payload=payload, data=data)
 
-        self.logging.info("Request: %s Response: %s"%(response.url, response.text))
-        response = jsonHelper.getResultObj(response.json, response_type)
+        self.logging.info("Request: %s Response: %s" %
+                          (response.url, response.text))
+        response = jsonHelper.getResultObj(response.json(), response_type)
 
         if isAsync == "false":
             return response


[20/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
Switched to yum upgrade vs yum install for RPM upgrade instructions

Signed-off-by: Chip Childers <ch...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/31531fa9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/31531fa9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/31531fa9

Branch: refs/heads/ui-mixed-zone-management
Commit: 31531fa9a6662ef523bdb2e66ee961ae23093bf9
Parents: f4240e1
Author: Chip Childers <ch...@apache.org>
Authored: Thu Apr 18 12:48:41 2013 -0400
Committer: Chip Childers <ch...@apache.org>
Committed: Thu Apr 18 12:48:41 2013 -0400

----------------------------------------------------------------------
 docs/en-US/Release_Notes.xml |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/31531fa9/docs/en-US/Release_Notes.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml
index b07b584..d5311e4 100644
--- a/docs/en-US/Release_Notes.xml
+++ b/docs/en-US/Release_Notes.xml
@@ -4221,12 +4221,12 @@ gpgcheck=0
                             <para>If you're using your own package repository, change this line to read as appropriate for your 4.1.0 repository.</para>
                         </listitem>
                         <listitem id="rpm-master">
-                            <para>Now that you have the repository configured, it's time to install the <filename>cloudstack-management</filename> package. This will pull in any other dependencies you need.</para>
-                            <programlisting language="Bash">$ sudo yum install cloudstack-management</programlisting>
+                            <para>Now that you have the repository configured, it's time to install the <filename>cloudstack-management</filename> package by upgrading the older <filename>cloud-client</filename> package.</para>
+                            <programlisting language="Bash">$ sudo yum upgrade cloud-client</programlisting>
                         </listitem>
                         <listitem id="kvm-agent-rpm">
-                            <para>For KVM hosts, you will need to upgrade the <filename>cloudstack-agent</filename> package:</para>
-                            <programlisting language="Bash">$ sudo yum install cloudstack-agent</programlisting>
+                            <para>For KVM hosts, you will need to upgrade the <filename>cloud-agent</filename> package, similarly installing the new version as <filename>cloudstack-agent</filename>.</para>
+                            <programlisting language="Bash">$ sudo yum upgrade cloud-agent</programlisting>
                             <para>During the installation of <filename>cloudstack-agent</filename>, the RPM will copy your <filename>agent.properties</filename>, <filename>log4j-cloud.xml</filename>, and <filename>environment.properties</filename> from <filename>/etc/cloud/agent</filename> to <filename>/etc/cloudstack/agent</filename>.</para>
                         </listitem>
                         <listitem>
@@ -4459,12 +4459,12 @@ gpgcheck=0
                             <para>If you're using your own package repository, change this line to read as appropriate for your 4.1.0 repository.</para>
                         </listitem>
                         <listitem id="rpm-master-302">
-                            <para>Now that you have the repository configured, it's time to install the <filename>cloudstack-management</filename> package. This will pull in any other dependencies you need.</para>
-                            <programlisting language="Bash">$ sudo yum install cloudstack-management</programlisting>
+                            <para>Now that you have the repository configured, it's time to install the <filename>cloudstack-management</filename> package by upgrading the older <filename>cloud-client</filename> package.</para>
+                            <programlisting language="Bash">$ sudo yum upgrade cloud-client</programlisting>
                         </listitem>
                         <listitem id="kvm-agent-rpm-302">
-                            <para>For KVM hosts, you will need to upgrade the <filename>cloudstack-agent</filename> package:</para>
-                            <programlisting language="Bash">$ sudo yum install cloudstack-agent</programlisting>
+                            <para>For KVM hosts, you will need to upgrade the <filename>cloud-agent</filename> package, similarly installing the new version as <filename>cloudstack-agent</filename>.</para>
+                            <programlisting language="Bash">$ sudo yum upgrade cloud-agent</programlisting>
                             <para>During the installation of <filename>cloudstack-agent</filename>, the RPM will copy your <filename>agent.properties</filename>, <filename>log4j-cloud.xml</filename>, and <filename>environment.properties</filename> from <filename>/etc/cloud/agent</filename> to <filename>/etc/cloudstack/agent</filename>.</para>
                         </listitem>
                         <listitem>


[31/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
Merge branch 'master' into ui-mixed-zone-management


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e0443030
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e0443030
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e0443030

Branch: refs/heads/ui-mixed-zone-management
Commit: e04430302dff167d70d741a93b3219bc9f6aec3e
Parents: c3009e3 977162b
Author: Brian Federle <br...@citrix.com>
Authored: Thu Apr 18 15:18:43 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Thu Apr 18 15:18:43 2013 -0700

----------------------------------------------------------------------
 api/src/com/cloud/network/IpAddress.java           |    9 -
 api/src/com/cloud/network/PublicIpAddress.java     |    3 -
 api/src/com/cloud/user/Account.java                |    4 +
 api/src/com/cloud/user/User.java                   |    2 +
 .../cloudstack/affinity/AffinityGroupResponse.java |    5 +-
 .../api/command/user/vm/DeployVMCmd.java           |    5 +-
 .../cloudstack/api/command/user/vm/ListVMsCmd.java |    2 +-
 .../cloudstack/api/response/AccountResponse.java   |    7 +
 .../cloudstack/api/response/UserResponse.java      |    8 +
 core/src/com/cloud/user/AccountVO.java             |    7 +
 core/src/com/cloud/user/UserVO.java                |   11 +-
 docs/en-US/Release_Notes.xml                       |  389 ++++++++++-----
 packaging/debian/init/cloud-management             |    2 +-
 packaging/debian/replace.properties                |    2 +-
 .../kvm/resource/LibvirtComputingResource.java     |    3 +-
 pom.xml                                            |   16 +
 server/src/com/cloud/api/ApiResponseHelper.java    |    9 +-
 .../src/com/cloud/api/query/QueryManagerImpl.java  |   11 +-
 .../cloud/api/query/dao/AccountJoinDaoImpl.java    |    8 +-
 .../api/query/dao/AffinityGroupJoinDaoImpl.java    |    1 +
 .../api/query/dao/UserAccountJoinDaoImpl.java      |    1 +
 .../src/com/cloud/api/query/vo/AccountJoinVO.java  |   10 +
 .../cloud/api/query/vo/AffinityGroupJoinVO.java    |   11 +
 .../com/cloud/api/query/vo/UserAccountJoinVO.java  |   16 +-
 .../src/com/cloud/network/NetworkServiceImpl.java  |    6 +-
 server/src/com/cloud/network/addr/PublicIp.java    |   18 +-
 server/src/com/cloud/network/dao/IPAddressVO.java  |    2 -
 .../network/element/VirtualRouterElement.java      |    2 +-
 .../com/cloud/server/ConfigurationServerImpl.java  |   12 +-
 server/src/com/cloud/user/AccountManagerImpl.java  |   15 +-
 .../com/cloud/vm/VirtualMachineManagerImpl.java    |    5 +
 .../affinity/AffinityGroupServiceImpl.java         |    2 +-
 .../cloudstack/affinity/AffinityGroupVO.java       |    2 +-
 setup/db/db/schema-410to420.sql                    |  337 ++++++++------
 test/integration/smoke/test_public_ip_range.py     |    2 +-
 tools/build/build_asf.sh                           |    2 +-
 tools/marvin/marvin/cloudstackConnection.py        |   92 +++--
 ui/css/cloudstack3.css                             |   11 +
 ui/index.jsp                                       |    5 +-
 ui/modules/modules.js                              |   20 +
 ui/scripts/plugins.js                              |   95 +++--
 ui/scripts/ui-custom/pluginListing.js              |  109 ++++
 ui/scripts/ui-custom/plugins.js                    |  109 ----
 ui/scripts/zoneWizard.js                           |    2 +-
 44 files changed, 851 insertions(+), 539 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e0443030/ui/css/cloudstack3.css
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e0443030/ui/index.jsp
----------------------------------------------------------------------
diff --cc ui/index.jsp
index 41ad491,5e5a7f2..9e1743e
--- a/ui/index.jsp
+++ b/ui/index.jsp
@@@ -1678,13 -1678,12 +1678,14 @@@ under the License
      <script type="text/javascript" src="scripts/system.js?t=<%=now%>"></script>
      <script type="text/javascript" src="scripts/domains.js?t=<%=now%>"></script>
      <script type="text/javascript" src="scripts/docs.js?t=<%=now%>"></script>
 -    <script type="text/javascript" src="scripts/vm_snapshots.js?t=<%=now%>"></script>  
 +    <script type="text/javascript" src="scripts/vm_snapshots.js?t=<%=now%>"></script>
 +    <script type="text/javascript" src="scripts/ui-custom/projectSelect.js?t=<%=now%>"></script>
 +    <script type="text/javascript" src="scripts/ui-custom/zoneFilter.js?t=<%=now%>"></script>
  
-     <!-- Plugins -->
-     <script type="text/javascript" src="scripts/ui-custom/plugins.js?t=<%=now%>"></script>
+     <!-- Plugin/module API -->
+     <script type="text/javascript" src="scripts/ui-custom/pluginListing.js?t=<%=now%>"></script>
      <script type="text/javascript" src="plugins/plugins.js?t=<%=now%>"></script>
+     <script type="text/javascript" src="modules/modules.js?t=<%=now%>"></script>
      <script type="text/javascript" src="scripts/plugins.js?t=<%=now%>"></script>
    </body>
  </html>


[27/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
UI Plugin/module API: Fix load order, refactor

-Fixes issue with load order, where plugin's initialization function were not called
  in order of the list

-Refactor so that modules and plugins are loaded via the same block,
  to avoid redundant code

-Load modules before plugins


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/73d87f1a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/73d87f1a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/73d87f1a

Branch: refs/heads/ui-mixed-zone-management
Commit: 73d87f1ad21c7312517f04038b54a0ec084a5d64
Parents: a51b566
Author: Brian Federle <br...@citrix.com>
Authored: Thu Apr 18 13:49:43 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Thu Apr 18 13:59:20 2013 -0700

----------------------------------------------------------------------
 ui/scripts/plugins.js |   77 ++++++++++++++++++++------------------------
 1 files changed, 35 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/73d87f1a/ui/scripts/plugins.js
----------------------------------------------------------------------
diff --git a/ui/scripts/plugins.js b/ui/scripts/plugins.js
index 9d1991c..122f4a0 100644
--- a/ui/scripts/plugins.js
+++ b/ui/scripts/plugins.js
@@ -15,7 +15,9 @@
 // specific language governing permissions and limitations
 // under the License.
 (function($, cloudStack, require) {
-  if (!cloudStack.pluginAPI) cloudStack.pluginAPI = {};
+  if (!cloudStack.pluginAPI) {
+    cloudStack.pluginAPI = {};
+  }
 
   var loadCSS = function(path) {
     var $link = $('<link>');
@@ -40,7 +42,7 @@
           error: function(json) {
             args.error(parseXMLHttpResponse(json));
           }
-        })
+        });
       },
       addSection: function(section) {
         cloudStack.sections[section.id] = $.extend(section, {
@@ -58,49 +60,40 @@
     show: cloudStack.uiCustom.pluginListing
   };
 
-  // Load plugins
-  $(cloudStack.plugins).map(function(index, pluginID) {
-    var basePath = 'plugins/' + pluginID + '/';
-    var pluginJS = basePath + pluginID + '.js';
-    var configJS = basePath + 'config.js';
-    var pluginCSS = basePath + pluginID + '.css';
+  // Load
+  $(['modules', 'plugins']).each(function() {
+    var type = this;
+    var paths = $(cloudStack[type]).map(function(index, id) {
+      return type + '/' + id + '/' + id;
+    }).toArray();
 
-    require([pluginJS], function() {
-      require([configJS]);
-      loadCSS(pluginCSS);
+    // Load modules
+    require(
+      paths,
+      function() {
+        $(cloudStack[type]).map(function(index, id) {
+          var basePath = type + '/' + id + '/';
+          var css = basePath + id + '.css';
+          var configJS = type == 'plugins' ? basePath + 'config' : null;
 
-      // Execute plugin
-      cloudStack.plugins[pluginID](
-        $.extend(true, {}, cloudStack.pluginAPI, {
-          pluginAPI: {
-            extend: function(api) {
-              cloudStack.pluginAPI[pluginID] = api;
-            }
+          if (configJS) {
+            // Load config metadata
+            require([configJS]);
           }
-        })
-      );
-    });
-  });
-
-  // Load modules
-  $(cloudStack.modules).map(function(index, moduleID) {
-    var basePath = 'modules/' + moduleID + '/';
-    var moduleJS = basePath + moduleID + '.js';
-    var moduleCSS = basePath + moduleID + '.css';
-
-    require([moduleJS], function() {
-      loadCSS(moduleCSS);
 
-      // Execute module
-      cloudStack.modules[moduleID](
-        $.extend(true, {}, cloudStack.pluginAPI, {
-          pluginAPI: {
-            extend: function(api) {
-              cloudStack.pluginAPI[moduleID] = api;
-            }
-          }
-        })
-      );
-    });
+          // Execute module
+          cloudStack[type][id](
+            $.extend(true, {}, cloudStack.pluginAPI, {
+              pluginAPI: {
+                extend: function(api) {
+                  cloudStack.pluginAPI[id] = api;
+                }
+              }
+            })
+          );
+          loadCSS(css);
+        });
+      }
+    );
   });
 }(jQuery, cloudStack, require));


[14/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
fix CLOUDSTACK-2061 Hitting java NPE in addNicToVirtualMachine api when trying to add a shared network to a VM


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/dfbe1135
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/dfbe1135
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/dfbe1135

Branch: refs/heads/ui-mixed-zone-management
Commit: dfbe11355c40a5dbe022f022426c100c53428901
Parents: 985b2aa
Author: Mice Xia <mi...@tcloudcomputing.com>
Authored: Thu Apr 18 14:56:44 2013 +0800
Committer: Mice Xia <mi...@tcloudcomputing.com>
Committed: Thu Apr 18 14:57:37 2013 +0800

----------------------------------------------------------------------
 .../network/element/VirtualRouterElement.java      |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dfbe1135/server/src/com/cloud/network/element/VirtualRouterElement.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/element/VirtualRouterElement.java b/server/src/com/cloud/network/element/VirtualRouterElement.java
index 169db32..f601f4f 100755
--- a/server/src/com/cloud/network/element/VirtualRouterElement.java
+++ b/server/src/com/cloud/network/element/VirtualRouterElement.java
@@ -876,8 +876,8 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl
         if (publicNetwork) {
             routers = _routerDao.listByNetworkAndRole(network.getId(), Role.VIRTUAL_ROUTER);
         } else {
-            Long podId = dest.getPod().getId();
             if (isPodBased) {
+                Long podId = dest.getPod().getId();
                 routers = _routerDao.listByNetworkAndPodAndRole(network.getId(), podId, Role.VIRTUAL_ROUTER);
             } else {
                 routers = _routerDao.listByNetworkAndRole(network.getId(), Role.VIRTUAL_ROUTER);


[18/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
Removing inappropriate note about an upgrade *to* 3.0.2 in the *from* 3.0.2 section of the release notes

Signed-off-by: Chip Childers <ch...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bf120917
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bf120917
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bf120917

Branch: refs/heads/ui-mixed-zone-management
Commit: bf120917f99df0e3d03d50f619ea5809f4c914c4
Parents: 7023920
Author: Chip Childers <ch...@apache.org>
Authored: Thu Apr 18 12:12:02 2013 -0400
Committer: Chip Childers <ch...@apache.org>
Committed: Thu Apr 18 12:28:10 2013 -0400

----------------------------------------------------------------------
 docs/en-US/Release_Notes.xml |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bf120917/docs/en-US/Release_Notes.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml
index 09cf2e2..2810269 100644
--- a/docs/en-US/Release_Notes.xml
+++ b/docs/en-US/Release_Notes.xml
@@ -4273,15 +4273,6 @@ Done restarting router(s).
             <para>This section will guide you from Citrix CloudStack 3.0.2 to Apache CloudStack 4.1.0. Sections that are hypervisor-specific will be called out with a note.</para>
             <orderedlist>
                 <listitem>
-                    <para>Ensure that you query your IP address usage records and process them or make a
-                        backup. During the upgrade you will lose the old IP address usage records.</para>
-                    <para>Starting in 3.0.2, the usage record format for IP addresses is the same as the rest
-                        of the usage types. Instead of a single record with the assignment and release dates,
-                        separate records are generated per aggregation period with start and end dates. After
-                        upgrading, any existing IP address usage records in the old format will no longer be
-                        available.</para>
-                </listitem>
-                <listitem>
                     <note>
                         <para>The following upgrade instructions apply only if you're using VMware hosts. If
                             you're not using VMware hosts, skip this step and move on to <xref linkend="stopping-usage-servers" />.</para>


[12/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
Apart from the UUID, we need not log any other details for AffinityGroup in error messages.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e03176c4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e03176c4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e03176c4

Branch: refs/heads/ui-mixed-zone-management
Commit: e03176c4d47d4c109f935beceb557e0c2de9a6c6
Parents: 3a9c63d
Author: Prachi Damle <pr...@cloud.com>
Authored: Wed Apr 17 18:03:34 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Wed Apr 17 18:04:18 2013 -0700

----------------------------------------------------------------------
 .../api/command/user/vm/DeployVMCmd.java           |    5 ++---
 .../cloudstack/affinity/AffinityGroupVO.java       |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e03176c4/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
index 77ba9fe..70c0159 100755
--- a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
@@ -230,7 +230,7 @@ public class DeployVMCmd extends BaseAsyncCreateCmd {
             for (String groupName : securityGroupNameList) {
                 Long groupId = _responseGenerator.getSecurityGroupId(groupName, getEntityOwnerId());
                 if (groupId == null) {
-                    throw new InvalidParameterValueException("Unable to find group by name " + groupName + " for account " + getEntityOwnerId());
+                    throw new InvalidParameterValueException("Unable to find group by name " + groupName);
                 } else {
                     securityGroupIds.add(groupId);
                 }
@@ -344,8 +344,7 @@ public class DeployVMCmd extends BaseAsyncCreateCmd {
             for (String groupName : affinityGroupNameList) {
                 Long groupId = _responseGenerator.getAffinityGroupId(groupName, getEntityOwnerId());
                 if (groupId == null) {
-                    throw new InvalidParameterValueException("Unable to find group by name " + groupName
-                            + " for account " + getEntityOwnerId());
+                    throw new InvalidParameterValueException("Unable to find affinity group by name " + groupName);
                 } else {
                     affinityGroupIds.add(groupId);
                 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e03176c4/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java b/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java
index b6c4a02..f418cef 100644
--- a/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java
+++ b/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java
@@ -107,7 +107,7 @@ public class AffinityGroupVO implements AffinityGroup {
     @Override
     public String toString() {
         StringBuilder buf = new StringBuilder("AffinityGroup[");
-        buf.append(id).append("|").append(name).append("|").append(type).append("]");
+        buf.append(uuid).append("]");
         return buf.toString();
     }
 


[16/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
CLOUDSTACK-2077:The updatePhysicalNetwork command fails to update the database


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/34899f9b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/34899f9b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/34899f9b

Branch: refs/heads/ui-mixed-zone-management
Commit: 34899f9b999e0d92573aa7b8872e07a111811b53
Parents: 96cf795
Author: Isaac Chiang <is...@gmail.com>
Authored: Thu Apr 18 21:19:00 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Thu Apr 18 21:19:00 2013 +0530

----------------------------------------------------------------------
 .../src/com/cloud/network/NetworkServiceImpl.java  |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/34899f9b/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java
index 12c6068..c4effc9 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -2445,10 +2445,6 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
                 network.setVnet(vnetString);
             }
 
-
-
-            _physicalNetworkDao.update(id, network);
-
             for (Pair<Integer, Integer> vnetToAdd : vnetsToAdd) {
                 s_logger.debug("Adding vnet range " + vnetToAdd.first() + "-" + vnetToAdd.second() + " for the physicalNetwork id= " + id + " and zone id=" + network.getDataCenterId()
                     + " as a part of updatePhysicalNetwork call");
@@ -2456,6 +2452,8 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
             }
         }
 
+        _physicalNetworkDao.update(id, network);
+
         return network;
     }
 


[30/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
CSS: Cleanup formatting


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/977162b9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/977162b9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/977162b9

Branch: refs/heads/ui-mixed-zone-management
Commit: 977162b9f09436f08c7139e43ec63826a47ef7f9
Parents: d51d596
Author: Brian Federle <br...@citrix.com>
Authored: Thu Apr 18 15:16:49 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Thu Apr 18 15:16:49 2013 -0700

----------------------------------------------------------------------
 ui/css/cloudstack3.css |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/977162b9/ui/css/cloudstack3.css
----------------------------------------------------------------------
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index 18d86b7..d4c670c 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -11776,12 +11776,11 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
 .updateResourceLimits:hover .icon {
   background-position: -100px -614px;
 }
- 
+
 .addVlanRange .icon {
   background-position: -168px -31px;
 }
 
-
 .addVlanRange:hover .icon {
   background-position: -168px -613px;
 }
@@ -11811,8 +11810,8 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
   background-position: -168px -31px;
 }
 
-.reset .icon ,
-.scaleUp .icon{
+.reset .icon,
+.scaleUp .icon {
   background-position: -168px -31px;
 }
 


[07/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
Removed set() methods from IpAddress related interfaces


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/11162f59
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/11162f59
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/11162f59

Branch: refs/heads/ui-mixed-zone-management
Commit: 11162f5917ab194f85e41bca7b3dc39bd3bbaeef
Parents: 1124466
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Wed Apr 17 15:04:36 2013 -0700
Committer: Alena Prokharchyk <al...@citrix.com>
Committed: Wed Apr 17 15:11:38 2013 -0700

----------------------------------------------------------------------
 api/src/com/cloud/network/IpAddress.java          |    9 --------
 api/src/com/cloud/network/PublicIpAddress.java    |    3 --
 server/src/com/cloud/network/addr/PublicIp.java   |   18 +---------------
 server/src/com/cloud/network/dao/IPAddressVO.java |    2 -
 4 files changed, 1 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11162f59/api/src/com/cloud/network/IpAddress.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/IpAddress.java b/api/src/com/cloud/network/IpAddress.java
index fce8f38..71c9b4e 100644
--- a/api/src/com/cloud/network/IpAddress.java
+++ b/api/src/com/cloud/network/IpAddress.java
@@ -78,16 +78,7 @@ public interface IpAddress extends ControlledEntity, Identity, InternalIdentity
 
     boolean getSystem();
 
-    /**
-     * @return
-     */
     Long getVpcId();
 
-    /**
-     * @param vpcId
-     */
-    void setVpcId(Long vpcId);
     String getVmIp();
-    void setVmIp(String vmIp);
-
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11162f59/api/src/com/cloud/network/PublicIpAddress.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/PublicIpAddress.java b/api/src/com/cloud/network/PublicIpAddress.java
index d81e9c1..916d434 100644
--- a/api/src/com/cloud/network/PublicIpAddress.java
+++ b/api/src/com/cloud/network/PublicIpAddress.java
@@ -30,7 +30,4 @@ public interface PublicIpAddress extends ControlledEntity, IpAddress, Vlan, Inte
     public String getNetmask();
 
     public String getGateway();
-
-    @Override
-    public String getVlanTag();
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11162f59/server/src/com/cloud/network/addr/PublicIp.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/addr/PublicIp.java b/server/src/com/cloud/network/addr/PublicIp.java
index 8217e4e..25e9d30 100644
--- a/server/src/com/cloud/network/addr/PublicIp.java
+++ b/server/src/com/cloud/network/addr/PublicIp.java
@@ -194,23 +194,12 @@ public class PublicIp implements PublicIpAddress {
     public boolean getSystem() {
         return _addr.getSystem();
     }
-
-    /* (non-Javadoc)
-     * @see com.cloud.network.IpAddress#getVpcId()
-     */
+	
     @Override
     public Long getVpcId() {
        return _addr.getVpcId();
     }
 
-    /* (non-Javadoc)
-     * @see com.cloud.network.IpAddress#setVpcId(java.lang.Long)
-     */
-    @Override
-    public void setVpcId(Long vpcId) {
-        _addr.setVpcId(vpcId);
-    }
-
     @Override
     public String getIp6Gateway() {
         return _vlan.getIp6Gateway();
@@ -230,9 +219,4 @@ public class PublicIp implements PublicIpAddress {
     public String getVmIp() {
         return _addr.getVmIp();
     }
-
-    @Override
-    public void setVmIp(String vmIp) {
-        _addr.setVmIp(vmIp);
-    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11162f59/server/src/com/cloud/network/dao/IPAddressVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/dao/IPAddressVO.java b/server/src/com/cloud/network/dao/IPAddressVO.java
index 8ce8d33..c5c78e5 100644
--- a/server/src/com/cloud/network/dao/IPAddressVO.java
+++ b/server/src/com/cloud/network/dao/IPAddressVO.java
@@ -292,7 +292,6 @@ public class IPAddressVO implements IpAddress {
         return vpcId;
     }
 
-    @Override
     public void setVpcId(Long vpcId) {
         this.vpcId = vpcId;
     }
@@ -302,7 +301,6 @@ public class IPAddressVO implements IpAddress {
         return vmIp;
     }
 
-    @Override
     public void setVmIp(String vmIp) {
         this.vmIp = vmIp;
     }


[28/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
CLOUDSTACK-1343: cloudstack UI - baremetal - zone wizard - fix a JS error "args.data.cluster is undefined" that happened right after Configuring guest traffic.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/320cad38
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/320cad38
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/320cad38

Branch: refs/heads/ui-mixed-zone-management
Commit: 320cad3806ec091d604779695979b1b34f671873
Parents: 73d87f1
Author: Jessica Wang <je...@citrix.com>
Authored: Thu Apr 18 14:28:28 2013 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Thu Apr 18 14:29:00 2013 -0700

----------------------------------------------------------------------
 ui/scripts/zoneWizard.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/320cad38/ui/scripts/zoneWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/zoneWizard.js b/ui/scripts/zoneWizard.js
index 08cadd0..6299fab 100755
--- a/ui/scripts/zoneWizard.js
+++ b/ui/scripts/zoneWizard.js
@@ -3053,7 +3053,7 @@
                 args.data.returnedGuestNetwork.returnedVlanIpRange = json.createvlaniprangeresponse.vlan;
                 
 								//when hypervisor is BareMetal (begin)   						
-								if(args.data.cluster.hypervisor == "BareMetal") {
+								if(args.data.zone.hypervisor == "BareMetal") {
 								  alert('Zone creation is completed. Please refresh this page.');
 								}								
 								else {


[08/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
CLOUDSTACK-2046: Primary Storage & Secondary Storage is max limit is set 0 with listResourceLimits API response as ROOT admin

Signed-off-by: Sateesh Chodapuneedi <sa...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/985b2aa8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/985b2aa8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/985b2aa8

Branch: refs/heads/ui-mixed-zone-management
Commit: 985b2aa88d4d02db98a2e9be7ac081e4efbff879
Parents: b12905b
Author: Sanjay Tripathi <sa...@citrix.com>
Authored: Wed Apr 17 12:03:47 2013 +0530
Committer: Sateesh Chodapuneedi <sa...@apache.org>
Committed: Thu Apr 18 05:26:00 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiResponseHelper.java |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/985b2aa8/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index 819c88b..7629e5e 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -379,7 +379,7 @@ public class ApiResponseHelper implements ResponseGenerator {
             populateDomain(resourceLimitResponse, accountTemp.getDomainId());
         }
         resourceLimitResponse.setResourceType(Integer.valueOf(limit.getType().getOrdinal()).toString());
-        if(limit.getType() == ResourceType.primary_storage || limit.getType() == ResourceType.secondary_storage) {
+        if((limit.getType() == ResourceType.primary_storage || limit.getType() == ResourceType.secondary_storage) && limit.getMax() >= 0) {
             resourceLimitResponse.setMax((long) Math.ceil(limit.getMax()/ResourceType.bytesToGiB));
         } else {
             resourceLimitResponse.setMax(limit.getMax());


[23/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
Removing 'incubator' from the default source dir

Signed-off-by: Chip Childers <ch...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ce8c2eb8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ce8c2eb8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ce8c2eb8

Branch: refs/heads/ui-mixed-zone-management
Commit: ce8c2eb8a59922ed83e08296b25591c43dac03e6
Parents: fca7b3e
Author: Chip Childers <ch...@apache.org>
Authored: Thu Apr 18 14:52:45 2013 -0400
Committer: Chip Childers <ch...@apache.org>
Committed: Thu Apr 18 14:54:42 2013 -0400

----------------------------------------------------------------------
 tools/build/build_asf.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ce8c2eb8/tools/build/build_asf.sh
----------------------------------------------------------------------
diff --git a/tools/build/build_asf.sh b/tools/build/build_asf.sh
index c692feb..f58f5e0 100755
--- a/tools/build/build_asf.sh
+++ b/tools/build/build_asf.sh
@@ -17,7 +17,7 @@
 # under the License.
 
 version='TESTBUILD'
-sourcedir=~/incubator-cloudstack/
+sourcedir=~/cloudstack/
 outputdir=~/cs-asf-build/
 branch='master'
 tag='no'


[22/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
Rename widget 'plugins' to 'pluginListing'

For better clarity on its function, rename the 'plugins' widget to 'pluginListing,'
as it does not handle the actual plugin logic.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fca7b3ef
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fca7b3ef
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fca7b3ef

Branch: refs/heads/ui-mixed-zone-management
Commit: fca7b3ef22b00f6003fbb6fa601c9b7c1a79dcec
Parents: 7a4f70f
Author: Brian Federle <br...@citrix.com>
Authored: Thu Apr 18 10:38:03 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Thu Apr 18 10:49:45 2013 -0700

----------------------------------------------------------------------
 ui/index.jsp                          |    2 +-
 ui/scripts/plugins.js                 |    4 +-
 ui/scripts/ui-custom/pluginListing.js |  109 ++++++++++++++++++++++++++++
 ui/scripts/ui-custom/plugins.js       |  109 ----------------------------
 4 files changed, 111 insertions(+), 113 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fca7b3ef/ui/index.jsp
----------------------------------------------------------------------
diff --git a/ui/index.jsp b/ui/index.jsp
index 46f49f0..550661e 100644
--- a/ui/index.jsp
+++ b/ui/index.jsp
@@ -1681,7 +1681,7 @@ under the License.
     <script type="text/javascript" src="scripts/vm_snapshots.js?t=<%=now%>"></script>  
 
     <!-- Plugins -->
-    <script type="text/javascript" src="scripts/ui-custom/plugins.js?t=<%=now%>"></script>
+    <script type="text/javascript" src="scripts/ui-custom/pluginListing.js?t=<%=now%>"></script>
     <script type="text/javascript" src="plugins/plugins.js?t=<%=now%>"></script>
     <script type="text/javascript" src="scripts/plugins.js?t=<%=now%>"></script>
   </body>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fca7b3ef/ui/scripts/plugins.js
----------------------------------------------------------------------
diff --git a/ui/scripts/plugins.js b/ui/scripts/plugins.js
index 5a33d56..d3e0705 100644
--- a/ui/scripts/plugins.js
+++ b/ui/scripts/plugins.js
@@ -51,7 +51,7 @@
   
   cloudStack.sections.plugins = {
     title: 'label.plugins',
-    show: cloudStack.uiCustom.plugins
+    show: cloudStack.uiCustom.pluginListing
   };
 
   // Load plugins
@@ -70,7 +70,5 @@
         ui: pluginAPI
       });
     });
-
-    // Load CSS
   });
 }(jQuery, cloudStack, require));

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fca7b3ef/ui/scripts/ui-custom/pluginListing.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/pluginListing.js b/ui/scripts/ui-custom/pluginListing.js
new file mode 100644
index 0000000..3dcce98
--- /dev/null
+++ b/ui/scripts/ui-custom/pluginListing.js
@@ -0,0 +1,109 @@
+// 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
+// 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.
+(function($, cloudStack) {
+  var elems = {
+    pluginItem: function(args) {
+      var id = args.id;
+      var title = args.title;
+      var desc = args.desc;
+      var iconURL = args.iconURL;
+      var $pluginItem = $('<li>').addClass('plugin-item').addClass(id);
+      var $title = $('<span>').addClass('title').html(title);
+      var $desc = $('<span>').addClass('desc').html(desc);
+      var $icon = $('<span>').addClass('icon').append(
+        $('<img>').attr({ src: iconURL })
+      );
+
+      $pluginItem.append(
+        $icon, $title, $desc
+      );
+
+      return $pluginItem;
+    },
+    pluginListing: function(args) {
+      var plugins = args.plugins;
+      var $plugins = $('<ul>');
+      var $pluginsListing = $('<div>').addClass('plugins-listing');
+
+      $(plugins).each(function() {
+        var plugin = this;
+        var $plugin = elems.pluginItem({
+          id: plugin.id,
+          title: plugin.title,
+          desc: plugin.desc,
+          iconURL: 'plugins/' + plugin.id + '/icon.png'
+        });
+        var $browser = $('#browser .container');
+
+        $plugin.click(function() {
+          $browser.cloudBrowser('addPanel', {
+            title: plugin.title,
+            $parent: $('.panel:first'),
+            complete: function($panel) {
+              $panel.detailView({
+                name: 'Plugin details',
+                tabs: {
+                  details: {
+                    title: 'label.plugin.details',
+                    fields: [
+                      {
+                        name: { label: 'label.name' }
+                      },
+                      {
+                        desc: { label: 'label.description' },
+                        externalLink: {
+                          isExternalLink: true,
+                          label: 'label.external.link'
+                        }
+                      },
+                      {
+                        authorName: { label: 'label.author.name' },
+                        authorEmail: { label: 'label.author.email' },
+                        id: { label: 'label.id' }
+                      }
+                    ],
+                    dataProvider: function(args) {
+                      args.response.success({ data: plugin });
+                    }
+                  }
+                }
+              });
+            }
+          });
+        });
+
+        $plugin.appendTo($plugins);
+      });
+
+      $pluginsListing.append($plugins);
+
+      return $pluginsListing;
+    }
+  };
+
+  cloudStack.uiCustom.pluginListing = function() {
+    var plugins = cloudStack.plugins;
+
+    return elems.pluginListing({
+      plugins: $(plugins).map(function(index, pluginID) {
+        var plugin = cloudStack.plugins[pluginID].config;
+
+        return $.extend(plugin, { id: pluginID });
+      })
+    });
+  };
+}(jQuery, cloudStack));

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fca7b3ef/ui/scripts/ui-custom/plugins.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/plugins.js b/ui/scripts/ui-custom/plugins.js
deleted file mode 100644
index aaf9531..0000000
--- a/ui/scripts/ui-custom/plugins.js
+++ /dev/null
@@ -1,109 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// 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.
-(function($, cloudStack) {
-  var elems = {
-    pluginItem: function(args) {
-      var id = args.id;
-      var title = args.title;
-      var desc = args.desc;
-      var iconURL = args.iconURL;
-      var $pluginItem = $('<li>').addClass('plugin-item').addClass(id);
-      var $title = $('<span>').addClass('title').html(title);
-      var $desc = $('<span>').addClass('desc').html(desc);
-      var $icon = $('<span>').addClass('icon').append(
-        $('<img>').attr({ src: iconURL })
-      );
-
-      $pluginItem.append(
-        $icon, $title, $desc
-      );
-
-      return $pluginItem;
-    },
-    pluginListing: function(args) {
-      var plugins = args.plugins;
-      var $plugins = $('<ul>');
-      var $pluginsListing = $('<div>').addClass('plugins-listing');
-
-      $(plugins).each(function() {
-        var plugin = this;
-        var $plugin = elems.pluginItem({
-          id: plugin.id,
-          title: plugin.title,
-          desc: plugin.desc,
-          iconURL: 'plugins/' + plugin.id + '/icon.png'
-        });
-        var $browser = $('#browser .container');
-
-        $plugin.click(function() {
-          $browser.cloudBrowser('addPanel', {
-            title: plugin.title,
-            $parent: $('.panel:first'),
-            complete: function($panel) {
-              $panel.detailView({
-                name: 'Plugin details',
-                tabs: {
-                  details: {
-                    title: 'label.plugin.details',
-                    fields: [
-                      {
-                        name: { label: 'label.name' }
-                      },
-                      {
-                        desc: { label: 'label.description' },
-                        externalLink: {
-                          isExternalLink: true,
-                          label: 'label.external.link'
-                        }
-                      },
-                      {
-                        authorName: { label: 'label.author.name' },
-                        authorEmail: { label: 'label.author.email' },
-                        id: { label: 'label.id' }
-                      }
-                    ],
-                    dataProvider: function(args) {
-                      args.response.success({ data: plugin });
-                    }
-                  }
-                }
-              });
-            }
-          });
-        });
-
-        $plugin.appendTo($plugins);
-      });
-
-      $pluginsListing.append($plugins);
-
-      return $pluginsListing;
-    }
-  };
-
-  cloudStack.uiCustom.plugins = function() {
-    var plugins = cloudStack.plugins;
-
-    return elems.pluginListing({
-      plugins: $(plugins).map(function(index, pluginID) {
-        var plugin = cloudStack.plugins[pluginID].config;
-
-        return $.extend(plugin, { id: pluginID });
-      })
-    });
-  };
-}(jQuery, cloudStack));


[09/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
Initial pass at RPM upgrade instructions from 4.0.x to 4.1.0

Signed-off-by: Chip Childers <ch...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7182a939
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7182a939
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7182a939

Branch: refs/heads/ui-mixed-zone-management
Commit: 7182a939a89b50280ec374f8a295e71837b71e3a
Parents: 11162f5
Author: Chip Childers <ch...@apache.org>
Authored: Wed Apr 17 20:47:11 2013 -0400
Committer: Chip Childers <ch...@apache.org>
Committed: Wed Apr 17 20:49:18 2013 -0400

----------------------------------------------------------------------
 docs/en-US/Release_Notes.xml |   45 +++++++++++++++++++++++++++++++++++-
 1 files changed, 43 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7182a939/docs/en-US/Release_Notes.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml
index f243a26..d51e9fb 100644
--- a/docs/en-US/Release_Notes.xml
+++ b/docs/en-US/Release_Notes.xml
@@ -4201,10 +4201,51 @@ under the License.
                     </orderedlist>
                 </listitem>
                 <listitem id="upgrade-rpm-packages">
-                    <para>The package names have changed between 4.0 and 4.1, so upgrading the packages won't happen automatically with a <command>yum update</command></para> 
+                    <para>If you are using CentOS or RHEL, follow this procedure to upgrade your packages. If not, skip to step <xref linkend="restart-system-vms" />.</para> 
+                    <note><title>Community Packages</title>
+                        <para>This section assumes you're using the community supplied packages for &PRODUCT;. If you've created your own packages and yum repository, substitute your own URL for the ones used in these examples.</para>
+                    </note>
+                    <orderedlist id="rpmsteps">
+                        <listitem>
+                            <para>The first order of business will be to change the yum repository for each system with &PRODUCT; packages. This means all management servers, and any hosts that have the KVM agent. (No changes should be necessary for hosts that are running VMware or Xen.)</para>
+                            <para>Start by opening <filename>/etc/yum.repos.d/cloudstack.repo</filename> on any systems that have &PRODUCT; packages installed.</para>
+                            <para>This file should have content similar to the following:</para>
+                            <programlisting language="Bash">
+[apache-cloudstack]
+name=Apache CloudStack
+baseurl=http://cloudstack.apt-get.eu/rhel/4.0/
+enabled=1
+gpgcheck=0
+                            </programlisting>
+                            <para>If you are using the community provided package repository, change the baseurl to http://cloudstack.apt-get.eu/rhel/4.1/</para>
+                            <para>If you're using your own package repository, change this line to read as appropriate for your 4.1.0 repository.</para>
+                        </listitem>
+                        <listitem id="rpm-master">
+                            <para>Now that you have the repository configured, it's time to install the <filename>cloudstack-management</filename> package. This will pull in any other dependencies you need.</para>
+                            <programlisting language="Bash">$ sudo yum install cloudstack-management</programlisting>
+                        </listitem>
+                        <listitem id="kvm-agent-rpm">
+                            <para>For KVM hosts, you will need to upgrade the <filename>cloudstack-agent</filename> package:</para>
+                            <programlisting language="Bash">$ sudo yum install cloudstack-agent</programlisting>
+                            <para>During the installation of <filename>cloudstack-agent</filename>, the RPM will copy your <filename>agent.properties</filename>, <filename>log4j-cloud.xml</filename>, and <filename>environment.properties</filename> from <filename>/etc/cloud/agent</filename> to <filename>/etc/cloudstack/agent</filename>.</para>
+                        </listitem>
+                        <listitem>
+                            <para>Verify that the file <filename>/etc/cloudstack/agent/environment.properties</filename> has a line that reads:</para>
+                            <programlisting language="Bash">paths.script=/usr/share/cloudstack-common</programlisting>
+                            <para>If not, add the line.</para>
+                        </listitem>
+                        <listitem>
+                            <para>Restart the agent:</para>
+                            <programlisting language="Bash">
+                                service cloud-agent stop
+                                killall jsvc
+                                service cloudstack-agent start
+                            </programlisting>
+                        </listitem>
+                    </orderedlist>
                 </listitem>
                 <listitem id="restart-system-vms">
-                    <para>Once you've upgraded the packages on your management servers, you'll need to restart the system VMs. Make sure port 8096 is open <!-- [FIXME, where?] --> to do this.</para>
+                    <para>Once you've upgraded the packages on your management servers, you'll need to restart the system VMs. Make sure port 8096 is open in your local host firewall to do this.</para>
                     <para>There is a script that will do this for you, all you need to do is run the script and supply the IP address for your MySQL instance and your MySQL credentials:</para>
                     <programlisting language="Bash"><prompt>#</prompt> nohup cloudstack-sysvmadm -d <replaceable>IP address</replaceable> -u cloud -p -a &gt; sysvm.log 2&gt;&amp;1 &amp;</programlisting>
                     <para>You can monitor the log for progress. The process of restarting the system VMs can take an hour or more.</para>


[03/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
CLOUDSTACK-2071 - VirtualMachineManagerImpl.java start() method for instance
can fail to start a VM without notifying caller, if no exception is triggered.
The result is that VM start looks successful but was not. This fixes it by
throwing an exception at the very end if the object to be passed back is still
null.

Signed-off-by: Marcus Sorensen <ma...@betterservers.com> 1366225829 -0600


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8d0bea99
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8d0bea99
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8d0bea99

Branch: refs/heads/ui-mixed-zone-management
Commit: 8d0bea994dcd74cd6707b58ac2e4060a93f52d96
Parents: 9584815
Author: Marcus Sorensen <ma...@betterservers.com>
Authored: Wed Apr 17 13:10:29 2013 -0600
Committer: Marcus Sorensen <ma...@betterservers.com>
Committed: Wed Apr 17 13:13:05 2013 -0600

----------------------------------------------------------------------
 .../com/cloud/vm/VirtualMachineManagerImpl.java    |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d0bea99/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 4072531..a53e380 100755
--- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -866,6 +866,11 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
             }
         }
 
+        if (startedVm == null) {
+            throw new CloudRuntimeException("Unable to start instance '" + vm.getHostName()
+                            + "' (" + vm.getUuid() + "), see management server log for details");
+        }
+
         return startedVm;
     }
 


[10/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
set Objectname to CreateAffinityGroupResponse Object. Also the listAffinityGroups is missing the 'type' property


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6dccf63a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6dccf63a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6dccf63a

Branch: refs/heads/ui-mixed-zone-management
Commit: 6dccf63a3229eb48be5c2ff941a1550b7741764d
Parents: 7182a93
Author: Prachi Damle <pr...@cloud.com>
Authored: Wed Apr 17 17:46:06 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Wed Apr 17 18:04:13 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiResponseHelper.java    |    7 ++++++-
 .../api/query/dao/AffinityGroupJoinDaoImpl.java    |    1 +
 .../cloud/api/query/vo/AffinityGroupJoinVO.java    |   11 +++++++++++
 setup/db/db/schema-410to420.sql                    |    1 +
 4 files changed, 19 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dccf63a/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index 50d8de2..819c88b 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -3664,8 +3664,13 @@ public class ApiResponseHelper implements ResponseGenerator {
         response.setName(group.getName());
         response.setType(group.getType());
         response.setDescription(group.getDescription());
-        // response.setDomainId(account.)
+        Domain domain = ApiDBUtils.findDomainById(account.getDomainId());
+        if (domain != null) {
+            response.setDomainId(domain.getUuid());
+            response.setDomainName(domain.getName());
+        }
 
+        response.setObjectName("affinitygroup");
         return response;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dccf63a/server/src/com/cloud/api/query/dao/AffinityGroupJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/AffinityGroupJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/AffinityGroupJoinDaoImpl.java
index a176793..8743bcb 100644
--- a/server/src/com/cloud/api/query/dao/AffinityGroupJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/AffinityGroupJoinDaoImpl.java
@@ -63,6 +63,7 @@ public class AffinityGroupJoinDaoImpl extends GenericDaoBase<AffinityGroupJoinVO
         agResponse.setId(vag.getUuid());
         agResponse.setName(vag.getName());
         agResponse.setDescription(vag.getDescription());
+        agResponse.setType(vag.getType());
 
         ApiResponseHelper.populateOwner(agResponse, vag);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dccf63a/server/src/com/cloud/api/query/vo/AffinityGroupJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/AffinityGroupJoinVO.java b/server/src/com/cloud/api/query/vo/AffinityGroupJoinVO.java
index e68996c..1c0dc2c 100644
--- a/server/src/com/cloud/api/query/vo/AffinityGroupJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/AffinityGroupJoinVO.java
@@ -36,6 +36,9 @@ public class AffinityGroupJoinVO extends BaseViewVO implements ControlledViewEnt
     @Column(name="name")
     private String name;
 
+    @Column(name = "type")
+    private String type;
+
     @Column(name = "description")
     private String description;
 
@@ -114,6 +117,14 @@ public class AffinityGroupJoinVO extends BaseViewVO implements ControlledViewEnt
         this.name = name;
     }
 
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
     @Override
     public long getAccountId() {
         return accountId;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6dccf63a/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index a36be0e..ce651a0 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -512,6 +512,7 @@ CREATE VIEW `cloud`.`affinity_group_view` AS
     select 
         affinity_group.id id,
         affinity_group.name name,
+        affinity_group.type type,
         affinity_group.description description,
         affinity_group.uuid uuid,
         account.id account_id,


[29/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
Dashboard UI: Fix unwanted line breaks on event/alert text


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d51d596b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d51d596b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d51d596b

Branch: refs/heads/ui-mixed-zone-management
Commit: d51d596baa35755c65ea72925bf9d3c36808ed8d
Parents: 320cad3
Author: Brian Federle <br...@citrix.com>
Authored: Thu Apr 18 15:15:24 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Thu Apr 18 15:15:24 2013 -0700

----------------------------------------------------------------------
 ui/css/cloudstack3.css |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d51d596b/ui/css/cloudstack3.css
----------------------------------------------------------------------
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index 2b6d497..18d86b7 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -4372,6 +4372,17 @@ Dialogs*/
   display: block;
   clear: both;
   font-size: 11px;
+  float: left;
+  height: 10px;
+  max-width: 287px;
+  margin-top: 1px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.dashboard.admin .dashboard-container.sub.alerts ul li p br {
+  display: none;
 }
 
 /*** User*/


[11/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
CLOUDSTACK-2069: Anti-Affinity - listVirtualmachines - affinitygroup entity does not include other Vms that are part of this affinity group.

Removed the virtualmachineIds:[] sent in the API response.
The listVirtualMachines Resopnse need not list details beyond the id, name,description etc.
If the user wants to get the list of VMs in the group, listAffinityGroups APi can be used.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3a9c63d8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3a9c63d8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3a9c63d8

Branch: refs/heads/ui-mixed-zone-management
Commit: 3a9c63d8c919deaaea12d40f83272af3162e84d6
Parents: 6dccf63
Author: Prachi Damle <pr...@cloud.com>
Authored: Wed Apr 17 17:48:52 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Wed Apr 17 18:04:15 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/affinity/AffinityGroupResponse.java |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3a9c63d8/api/src/org/apache/cloudstack/affinity/AffinityGroupResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/affinity/AffinityGroupResponse.java b/api/src/org/apache/cloudstack/affinity/AffinityGroupResponse.java
index afd33da..b6d4ff6 100644
--- a/api/src/org/apache/cloudstack/affinity/AffinityGroupResponse.java
+++ b/api/src/org/apache/cloudstack/affinity/AffinityGroupResponse.java
@@ -64,7 +64,6 @@ public class AffinityGroupResponse extends BaseResponse implements ControlledVie
     private List<String> vmIdList;
 
     public AffinityGroupResponse() {
-        this.vmIdList = new ArrayList<String>();
     }
 
     @Override
@@ -149,6 +148,10 @@ public class AffinityGroupResponse extends BaseResponse implements ControlledVie
     }
 
     public void addVMId(String vmId) {
+        if (this.vmIdList == null) {
+            this.vmIdList = new ArrayList<String>();
+        }
+
         this.vmIdList.add(vmId);
     }
 


[24/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
CLOUDSTACK-1977: Add management setup directory to classpath

This way the DB upgrade process can locate the SQL files


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9573f51d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9573f51d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9573f51d

Branch: refs/heads/ui-mixed-zone-management
Commit: 9573f51d3b5c79209262c398c4f13897ceaa19a8
Parents: ce8c2eb
Author: Wido den Hollander <wi...@42on.com>
Authored: Thu Apr 18 21:32:08 2013 +0200
Committer: Wido den Hollander <wi...@42on.com>
Committed: Thu Apr 18 21:32:08 2013 +0200

----------------------------------------------------------------------
 packaging/debian/init/cloud-management |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9573f51d/packaging/debian/init/cloud-management
----------------------------------------------------------------------
diff --git a/packaging/debian/init/cloud-management b/packaging/debian/init/cloud-management
index 1e00831..8431eec 100755
--- a/packaging/debian/init/cloud-management
+++ b/packaging/debian/init/cloud-management
@@ -125,7 +125,7 @@ fi
 # Define other required variables
 CATALINA_PID="/var/run/$NAME.pid"
 BOOTSTRAP_CLASS=org.apache.catalina.startup.Bootstrap
-JSVC_CLASSPATH="/usr/share/java/commons-daemon.jar:$CATALINA_HOME/bin/bootstrap.jar:/etc/cloudstack/management"
+JSVC_CLASSPATH="/usr/share/java/commons-daemon.jar:$CATALINA_HOME/bin/bootstrap.jar:/etc/cloudstack/management:/usr/share/cloudstack-management/setup"
 
 # Look for Java Secure Sockets Extension (JSSE) JARs
 if [ -z "${JSSE_HOME}" -a -r "${JAVA_HOME}/jre/lib/jsse.jar" ]; then


[19/31] git commit: updated refs/heads/ui-mixed-zone-management to e044303

Posted by bf...@apache.org.
Adding RPM and DEB upgrade steps from 3.0.2 to 4.1.0 in release notes

Signed-off-by: Chip Childers <ch...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f4240e1c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f4240e1c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f4240e1c

Branch: refs/heads/ui-mixed-zone-management
Commit: f4240e1cea58be0ea7b50c77a018d7c63e3faf15
Parents: bf12091
Author: Chip Childers <ch...@apache.org>
Authored: Thu Apr 18 12:25:26 2013 -0400
Committer: Chip Childers <ch...@apache.org>
Committed: Thu Apr 18 12:28:10 2013 -0400

----------------------------------------------------------------------
 docs/en-US/Release_Notes.xml |  114 ++++++++++++++++++++++++++++++++-----
 1 files changed, 99 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f4240e1c/docs/en-US/Release_Notes.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml
index 2810269..b07b584 100644
--- a/docs/en-US/Release_Notes.xml
+++ b/docs/en-US/Release_Notes.xml
@@ -4382,23 +4382,107 @@ Done restarting router(s).
                         the community provided yum/apt repositories to gain access to the &PRODUCT;
                         binaries.</para>
                 </listitem>
-                <listitem>
-                    <para>After you have configured an appropriate yum or apt repository, you may execute the
-                        one of the following commands as appropriate for your environment in order to upgrade
-                        &PRODUCT;: <programlisting><prompt>#</prompt> <command>yum</command> update cloud-*</programlisting>
-                        <programlisting><prompt>#</prompt> <command>apt-get</command> update
-                            <prompt>#</prompt> <command>apt-get</command> upgrade cloud-*</programlisting>
-                    </para>
-                    <para>You will, of course, have to agree to the changes suggested by Yum or APT.</para>
-                    <note>
-                        <para>If the upgrade output includes a message similar to the following, then some
-                            custom content was found in your old components.xml, and you need to merge the two
-                            files:</para>
-                        <programlisting>warning: /etc/cloud/management/components.xml created as /etc/cloud/management/components.xml.rpmnew </programlisting>
-                        <para>Instructions follow in the next step.</para>
+                <listitem id="upgrade-deb-packages-302">
+                    <para>If you are using Ubuntu, follow this procedure to upgrade your packages. If not, skip to step <xref linkend="upgrade-rpm-packages-302" />.</para> 
+                    <note><title>Community Packages</title>
+                        <para>This section assumes you're using the community supplied packages for &PRODUCT;. If you've created your own packages and APT repository, substitute your own URL for the ones used in these examples.</para>
                     </note>
+                    <orderedlist id="debsteps-302">
+                        <listitem>
+                            <para>The first order of business will be to change the sources list for each system with &PRODUCT; packages. This means all management servers, and any hosts that have the KVM agent. (No changes should be necessary for hosts that are running VMware or Xen.)</para>
+                            <para>Start by opening <filename>/etc/apt/sources.list.d/cloudstack.list</filename> on any systems that have &PRODUCT; packages installed.</para>
+                            <para>This file should have one line, which contains:</para>
+                            <programlisting language="Bash">deb http://cloudstack.apt-get.eu/ubuntu precise 4.0</programlisting>
+                            <para>We'll change it to point to the new package repository:</para>
+                            <programlisting language="Bash">deb http://cloudstack.apt-get.eu/ubuntu precise 4.1</programlisting>
+                            <para>If you're using your own package repository, change this line to read as appropriate for your 4.1.0 repository.</para>
+                        </listitem>
+                        <listitem>
+                            <para>Now update your apt package list:</para>
+                            <programlisting language="Bash">$ sudo apt-get update</programlisting>
+                        </listitem>
+                        <listitem id="deb-master-302">
+                            <para>Now that you have the repository configured, it's time to install the <filename>cloudstack-management</filename> package. This will pull in any other dependencies you need.</para>
+                            <programlisting language="Bash">$ sudo apt-get install cloudstack-management</programlisting>
+                        </listitem>
+                        <listitem id="kvm-agent-deb-302">
+                            <para>You will need to manually install the <filename>cloudstack-agent</filename> package:</para>
+                            <programlisting language="Bash">$ sudo apt-get install cloudstack-agent</programlisting>
+                            <para>During the installation of <filename>cloudstack-agent</filename>, APT will copy your <filename>agent.properties</filename>, <filename>log4j-cloud.xml</filename>, and <filename>environment.properties</filename> from <filename>/etc/cloud/agent</filename> to <filename>/etc/cloudstack/agent</filename>.</para>
+                            <para>When prompted whether you wish to keep your configuration, say Yes.</para>
+                        </listitem>
+                        <listitem>
+                            <para>Verify that the file <filename>/etc/cloudstack/agent/environment.properties</filename> has a line that reads:</para>
+                            <programlisting language="Bash">paths.script=/usr/share/cloudstack-common</programlisting>
+                            <para>If not, add the line.</para>
+                        </listitem>
+                        <listitem>
+                            <para>Restart the agent:</para>
+                            <programlisting language="Bash">
+service cloud-agent stop
+killall jsvc
+service cloudstack-agent start
+                            </programlisting>
+                        </listitem>
+                        <listitem>
+                            <para>During the upgrade, <filename>log4j-cloud.xml</filename> was simply copied over, so the logs will continue to be added to <filename>/var/log/cloud/agent/agent.log</filename>. There's nothing <emphasis>wrong</emphasis> with this, but if you prefer to be consistent, you can change this by copying over the sample configuration file:</para>
+                            <programlisting language="Bash">
+cd /etc/cloudstack/agent
+mv log4j-cloud.xml.dpkg-dist log4j-cloud.xml
+service cloudstack-agent restart
+                            </programlisting>
+                        </listitem>
+                        <listitem>
+                            <para>Once the agent is running, you can uninstall the old cloud-* packages from your system:</para>
+                            <programlisting language="Bash">sudo dpkg --purge cloud-agent</programlisting>
+                        </listitem> 
+                    </orderedlist>
                 </listitem>
-                <listitem>
+                <listitem id="upgrade-rpm-packages-302">
+                    <para>If you are using CentOS or RHEL, follow this procedure to upgrade your packages. If not, skip to step <xref linkend="correct-components-xml-302" />.</para> 
+                    <note><title>Community Packages</title>
+                        <para>This section assumes you're using the community supplied packages for &PRODUCT;. If you've created your own packages and yum repository, substitute your own URL for the ones used in these examples.</para>
+                    </note>
+                    <orderedlist id="rpmsteps-302">
+                        <listitem>
+                            <para>The first order of business will be to change the yum repository for each system with &PRODUCT; packages. This means all management servers, and any hosts that have the KVM agent. (No changes should be necessary for hosts that are running VMware or Xen.)</para>
+                            <para>Start by opening <filename>/etc/yum.repos.d/cloudstack.repo</filename> on any systems that have &PRODUCT; packages installed.</para>
+                            <para>This file should have content similar to the following:</para>
+                            <programlisting language="Bash">
+[apache-cloudstack]
+name=Apache CloudStack
+baseurl=http://cloudstack.apt-get.eu/rhel/4.0/
+enabled=1
+gpgcheck=0
+                            </programlisting>
+                            <para>If you are using the community provided package repository, change the baseurl to http://cloudstack.apt-get.eu/rhel/4.1/</para>
+                            <para>If you're using your own package repository, change this line to read as appropriate for your 4.1.0 repository.</para>
+                        </listitem>
+                        <listitem id="rpm-master-302">
+                            <para>Now that you have the repository configured, it's time to install the <filename>cloudstack-management</filename> package. This will pull in any other dependencies you need.</para>
+                            <programlisting language="Bash">$ sudo yum install cloudstack-management</programlisting>
+                        </listitem>
+                        <listitem id="kvm-agent-rpm-302">
+                            <para>For KVM hosts, you will need to upgrade the <filename>cloudstack-agent</filename> package:</para>
+                            <programlisting language="Bash">$ sudo yum install cloudstack-agent</programlisting>
+                            <para>During the installation of <filename>cloudstack-agent</filename>, the RPM will copy your <filename>agent.properties</filename>, <filename>log4j-cloud.xml</filename>, and <filename>environment.properties</filename> from <filename>/etc/cloud/agent</filename> to <filename>/etc/cloudstack/agent</filename>.</para>
+                        </listitem>
+                        <listitem>
+                            <para>Verify that the file <filename>/etc/cloudstack/agent/environment.properties</filename> has a line that reads:</para>
+                            <programlisting language="Bash">paths.script=/usr/share/cloudstack-common</programlisting>
+                            <para>If not, add the line.</para>
+                        </listitem>
+                        <listitem>
+                            <para>Restart the agent:</para>
+                            <programlisting language="Bash">
+service cloud-agent stop
+killall jsvc
+service cloudstack-agent start
+                            </programlisting>
+                        </listitem>
+                    </orderedlist>
+                </listitem>
+                <listitem id="correct-components-xml-302">
                     <para>If you have made changes to your copy of
                         <filename>/etc/cloud/management/components.xml</filename> the changes will be
                         preserved in the upgrade. However, you need to do the following steps to place these