incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject [1/14] git commit: Merge branch 'master' into vpc
Date Mon, 23 Jul 2012 23:37:39 GMT
Updated Branches:
  refs/heads/vpc f1e2be715 -> 766b7a270


Merge branch 'master' into vpc

Conflicts:
	server/src/com/cloud/api/ApiResponseHelper.java


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

Branch: refs/heads/vpc
Commit: 766b7a2706b7763a882e94bf765ac36840eedfae
Parents: 46cd99f 11f5bd2
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Mon Jul 23 16:38:58 2012 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Mon Jul 23 16:38:58 2012 -0700

----------------------------------------------------------------------
 .../cloud/bridge/service/EC2SoapServiceImpl.java   |  431 +++++++++++----
 .../service/core/ec2/EC2DescribeInstances.java     |    9 +
 .../service/core/ec2/EC2DescribeSnapshots.java     |    9 +
 .../bridge/service/core/ec2/EC2DescribeTags.java   |   34 ++
 .../service/core/ec2/EC2DescribeTagsResponse.java  |   37 ++
 .../service/core/ec2/EC2DescribeVolumes.java       |    9 +
 .../cloud/bridge/service/core/ec2/EC2Engine.java   |  217 +++++++-
 .../cloud/bridge/service/core/ec2/EC2Image.java    |   15 +-
 .../cloud/bridge/service/core/ec2/EC2Instance.java |   12 +-
 .../service/core/ec2/EC2InstanceFilterSet.java     |   45 ++-
 .../bridge/service/core/ec2/EC2RegisterImage.java  |   24 +-
 .../bridge/service/core/ec2/EC2ResourceTag.java    |   64 +++
 .../cloud/bridge/service/core/ec2/EC2Snapshot.java |   12 +
 .../service/core/ec2/EC2SnapshotFilterSet.java     |   45 ++-
 .../bridge/service/core/ec2/EC2TagKeyValue.java    |   44 ++
 .../bridge/service/core/ec2/EC2TagTypeId.java      |   47 ++
 .../com/cloud/bridge/service/core/ec2/EC2Tags.java |   44 ++
 .../bridge/service/core/ec2/EC2TagsFilterSet.java  |  107 ++++
 .../cloud/bridge/service/core/ec2/EC2Volume.java   |   15 +-
 .../service/core/ec2/EC2VolumeFilterSet.java       |   43 ++-
 awsapi/src/com/cloud/stack/CloudStackApi.java      |   90 +++-
 .../src/com/cloud/stack/models/ApiConstants.java   |   10 +
 .../cloud/stack/models/CloudStackResourceTag.java  |   50 ++
 .../com/cloud/stack/models/CloudStackSnapshot.java |    9 +
 .../com/cloud/stack/models/CloudStackTemplate.java |   10 +
 .../com/cloud/stack/models/CloudStackUserVm.java   |    9 +
 .../com/cloud/stack/models/CloudStackVolume.java   |   10 +
 server/src/com/cloud/api/ApiResponseHelper.java    |    4 +-
 .../src/com/cloud/server/ManagementServerImpl.java |   25 +-
 .../src/com/cloud/storage/StorageManagerImpl.java  |   21 +-
 ui/css/cloudstack3.css                             |  198 +++++++
 ui/index.jsp                                       |    1 +
 ui/scripts/sharedFunctions.js                      |   78 +++
 ui/scripts/ui/widgets/detailView.js                |   48 ++-
 ui/scripts/ui/widgets/multiEdit.js                 |   12 +-
 ui/scripts/ui/widgets/tagger.js                    |  201 +++++++
 36 files changed, 1831 insertions(+), 208 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/766b7a27/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/api/ApiResponseHelper.java
index 0899c2a,433d263..01b1f79
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@@ -760,30 -743,32 +760,32 @@@ public class ApiResponseHelper implemen
      }
  
      @Override
 -    public IPAddressResponse createIPAddressResponse(IpAddress ipAddress) {
 -        VlanVO vlan = ApiDBUtils.findVlanById(ipAddress.getVlanId());
 +    public IPAddressResponse createIPAddressResponse(IpAddress ipAddr) {
 +        VlanVO vlan = ApiDBUtils.findVlanById(ipAddr.getVlanId());
          boolean forVirtualNetworks = vlan.getVlanType().equals(VlanType.VirtualNetwork);
 -        long zoneId = ipAddress.getDataCenterId();
 +        long zoneId = ipAddr.getDataCenterId();
  
          IPAddressResponse ipResponse = new IPAddressResponse();
 -        ipResponse.setId(ipAddress.getId());
 -        ipResponse.setIpAddress(ipAddress.getAddress().toString());
 -        if (ipAddress.getAllocatedTime() != null) {
 -            ipResponse.setAllocated(ipAddress.getAllocatedTime());
 +        ipResponse.setId(ipAddr.getId());
 +        ipResponse.setIpAddress(ipAddr.getAddress().toString());
 +        if (ipAddr.getAllocatedTime() != null) {
 +            ipResponse.setAllocated(ipAddr.getAllocatedTime());
          }
          ipResponse.setZoneId(zoneId);
 -        ipResponse.setZoneName(ApiDBUtils.findZoneById(ipAddress.getDataCenterId()).getName());
 -        ipResponse.setSourceNat(ipAddress.isSourceNat());
 -        ipResponse.setIsSystem(ipAddress.getSystem());
 +        ipResponse.setZoneName(ApiDBUtils.findZoneById(ipAddr.getDataCenterId()).getName());
 +        ipResponse.setSourceNat(ipAddr.isSourceNat());
 +        ipResponse.setIsSystem(ipAddr.getSystem());
  
          // get account information
-         populateOwner(ipResponse, ipAddr);
 -        if (ipAddress.getAllocatedToAccountId() != null) {
 -            populateOwner(ipResponse, ipAddress);
++        if (ipAddr.getAllocatedToAccountId() != null) {
++            populateOwner(ipResponse, ipAddr);
+         }
  
          ipResponse.setForVirtualNetwork(forVirtualNetworks);
 -        ipResponse.setStaticNat(ipAddress.isOneToOneNat());
 +        ipResponse.setStaticNat(ipAddr.isOneToOneNat());
  
 -        if (ipAddress.getAssociatedWithVmId() != null) {
 -            UserVm vm = ApiDBUtils.findUserVmById(ipAddress.getAssociatedWithVmId());
 +        if (ipAddr.getAssociatedWithVmId() != null) {
 +            UserVm vm = ApiDBUtils.findUserVmById(ipAddr.getAssociatedWithVmId());
              ipResponse.setVirtualMachineId(vm.getId());
              ipResponse.setVirtualMachineName(vm.getHostName());
              if (vm.getDisplayName() != null) {

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/766b7a27/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/server/ManagementServerImpl.java
index e79a75f,047305e..f0e8afa
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@@ -1711,26 -1689,32 +1711,33 @@@ public class ManagementServerImpl imple
          Long ipId = cmd.getId();
          Boolean sourceNat = cmd.getIsSourceNat();
          Boolean staticNat = cmd.getIsStaticNat();
 +        Long vpcId = cmd.getVpcId();
          Map<String, String> tags = cmd.getTags();
  
-         Account caller = UserContext.current().getCaller();
-         List<Long> permittedAccounts = new ArrayList<Long>();
 -        
 +
          Boolean isAllocated = cmd.isAllocatedOnly();
          if (isAllocated == null) {
              isAllocated = Boolean.TRUE;
          }
 -        
 +
-         Ternary<Long, Boolean, ListProjectResourcesCriteria> domainIdRecursiveListProject
= new Ternary<Long, Boolean, ListProjectResourcesCriteria>(cmd.getDomainId(), cmd.isRecursive(),
null);
-         _accountMgr.buildACLSearchParameters(caller, cmd.getId(), cmd.getAccountName(),
cmd.getProjectId(), permittedAccounts, domainIdRecursiveListProject, cmd.listAll(), false);
-         Long domainId = domainIdRecursiveListProject.first();
-         Boolean isRecursive = domainIdRecursiveListProject.second();
-         ListProjectResourcesCriteria listProjectResourcesCriteria = domainIdRecursiveListProject.third();
- 
          Filter searchFilter = new Filter(IPAddressVO.class, "address", false, cmd.getStartIndex(),
cmd.getPageSizeVal());
          SearchBuilder<IPAddressVO> sb = _publicIpAddressDao.createSearchBuilder();
+         Long domainId = null;
+         Boolean isRecursive = null;
+         List<Long> permittedAccounts = new ArrayList<Long>();
+         ListProjectResourcesCriteria listProjectResourcesCriteria = null;
+         if (isAllocated) {
+             Account caller = UserContext.current().getCaller();
+ 
+             Ternary<Long, Boolean, ListProjectResourcesCriteria> domainIdRecursiveListProject
= 
+                     new Ternary<Long, Boolean, ListProjectResourcesCriteria>(cmd.getDomainId(),
cmd.isRecursive(), null);
+             _accountMgr.buildACLSearchParameters(caller, cmd.getId(), cmd.getAccountName(),
cmd.getProjectId(), 
+                     permittedAccounts, domainIdRecursiveListProject, cmd.listAll(), false);
+             domainId = domainIdRecursiveListProject.first();
+             isRecursive = domainIdRecursiveListProject.second();
+             listProjectResourcesCriteria = domainIdRecursiveListProject.third();
 -            _accountMgr.buildACLSearchBuilder(sb, domainId, isRecursive, permittedAccounts,
listProjectResourcesCriteria);
 +        _accountMgr.buildACLSearchBuilder(sb, domainId, isRecursive, permittedAccounts,
listProjectResourcesCriteria);
+         }      
  
          sb.and("dataCenterId", sb.entity().getDataCenterId(), SearchCriteria.Op.EQ);
          sb.and("address", sb.entity().getAddress(), SearchCriteria.Op.EQ);
@@@ -1798,10 -1771,12 +1805,12 @@@
          }
  
          SearchCriteria<IPAddressVO> sc = sb.create();
+         if (isAllocated) {
 -          _accountMgr.buildACLSearchCriteria(sc, domainId, isRecursive, permittedAccounts,
listProjectResourcesCriteria);
 +        _accountMgr.buildACLSearchCriteria(sc, domainId, isRecursive, permittedAccounts,
listProjectResourcesCriteria);
+         }
  
          sc.setJoinParameters("vlanSearch", "vlanType", vlanType);
 -        
 +
          if (tags != null && !tags.isEmpty()) {
              int count = 0;
              sc.setJoinParameters("tagSearch", "resourceType", TaggedResourceType.PublicIpAddress.toString());

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

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/766b7a27/ui/index.jsp
----------------------------------------------------------------------
diff --cc ui/index.jsp
index 56afc5d,d942bb9..2b0a626
--- a/ui/index.jsp
+++ b/ui/index.jsp
@@@ -1615,7 -1614,8 +1615,8 @@@
      <script type="text/javascript" src="scripts/ui/widgets/listView.js?t=<%=now%>"></script>
      <script type="text/javascript" src="scripts/ui/widgets/detailView.js?t=<%=now%>"></script>
      <script type="text/javascript" src="scripts/ui/widgets/treeView.js?t=<%=now%>"></script>
 -    <script type="text/javascript" src="scripts/ui/widgets/notifications.js?t=<%=now%>"></script>
 +    <script type="text/javascript" src="scripts/ui/widgets/notifications.js?t=<%=now%>"></script>

+     <script type="text/javascript" src="scripts/ui/widgets/tagger.js?t=<%=now%>"></script>
      
      <script type="text/javascript" src="scripts/cloud.core.callbacks.js?t=<%=now%>"></script>
      <script type="text/javascript" src="scripts/sharedFunctions.js?t=<%=now%>"></script>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/766b7a27/ui/scripts/ui/widgets/multiEdit.js
----------------------------------------------------------------------


Mime
View raw message