[GitHub] cloudstack pull request #1894: CLOUDSTACK-9700 Allow user to Register/Copy t...

2017-02-28 Thread rashmidixit
GitHub user rashmidixit reopened a pull request:

https://github.com/apache/cloudstack/pull/1894

CLOUDSTACK-9700 Allow user to Register/Copy templates to multiple zones at 
the same time

A user can currently copy or register a template with only one zone at a 
time.
The idea of this feature is to allow the user to allow copying or 
registering of one template to multiple zones at the same time.

For RegisterTemplate and CopyTemplate APIs have been modified to add a new 
parameter called zoneIds. This is not compulsory to keep backward compatibility.

The UIs have been changes - When you add, the earlier select control for 
zones now is a multi select and you can choose multiple zones at the same time. 
For CopyTemplate a new dialog has been added - this shows all the zones you 
can copy to and allows you to select multiple at a time.

Please see 
[CLOUDSTACK-9700](https://issues.apache.org/jira/browse/CLOUDSTACK-9700) for 
more details. Snapshots of the UI have been attached there.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/Accelerite/cloudstack CLOUDSTACK-9700

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/1894.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1894


commit 95bf9f0f5b640f6673606e7f56fce39654e16fff
Author: rashmidixit 
Date:   2017-02-28T06:33:07Z

CLOUDSTACK-9700: Allow user to Register/Copy templates to multiple zones at 
the same time




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request #1894: CLOUDSTACK-9700 Allow user to Register/Copy t...

2017-02-28 Thread rashmidixit
Github user rashmidixit closed the pull request at:

https://github.com/apache/cloudstack/pull/1894


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request #1894: CLOUDSTACK-9700 Allow user to Register/Copy t...

2017-03-03 Thread priyankparihar
Github user priyankparihar commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1894#discussion_r104105003
  
--- Diff: api/src/org/apache/cloudstack/api/ResponseGenerator.java ---
@@ -307,7 +307,11 @@
 
 TemplateResponse createTemplateUpdateResponse(ResponseView view, 
VirtualMachineTemplate result);
 
-List createTemplateResponses(ResponseView view, 
VirtualMachineTemplate result, Long zoneId, boolean readyOnly);
+List createTemplateResponses(ResponseView view, 
VirtualMachineTemplate result,
+   Long zoneId, boolean 
readyOnly);
--- End diff --

what is difference between line 310 and 311 ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request #1894: CLOUDSTACK-9700 Allow user to Register/Copy t...

2017-03-03 Thread priyankparihar
Github user priyankparihar commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1894#discussion_r104105564
  
--- Diff: 
api/src/org/apache/cloudstack/api/command/admin/template/CopyTemplateCmdByAdmin.java
 ---
@@ -40,11 +40,20 @@
 @Override
 public void execute() throws ResourceAllocationException{
 try {
+if (destZoneId == null && (destZoneIds == null || 
destZoneIds.size() == 0))
+throw new ServerApiException(ApiErrorCode.PARAM_ERROR,
+"Either destzoneid or destzoneids parameters have 
to be specified.");
+
--- End diff --

Error statement and conditional statement logic are not conveying same 
message. Some correction is required.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request #1894: CLOUDSTACK-9700 Allow user to Register/Copy t...

2017-03-03 Thread priyankparihar
Github user priyankparihar commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1894#discussion_r104106536
  
--- Diff: 
api/src/org/apache/cloudstack/api/command/admin/template/RegisterTemplateCmdByAdmin.java
 ---
@@ -40,10 +40,23 @@
 @Override
 public void execute() throws ResourceAllocationException{
 try {
+if ((zoneId != null) && (zoneIds != null && 
!zoneIds.isEmpty()))
--- End diff --

Unnecessary brackets should be removed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request #1894: CLOUDSTACK-9700 Allow user to Register/Copy t...

2017-03-03 Thread priyankparihar
Github user priyankparihar commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1894#discussion_r104114043
  
--- Diff: 
api/src/org/apache/cloudstack/api/command/user/template/CopyTemplateCmd.java ---
@@ -51,25 +52,46 @@
 @Parameter(name = ApiConstants.DESTINATION_ZONE_ID,
type = CommandType.UUID,
entityType = ZoneResponse.class,
-   required = true,
+   required = false,
description = "ID of the zone the template is being copied 
to.")
-private Long destZoneId;
+protected Long destZoneId;
 
-@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType 
= TemplateResponse.class, required = true, description = "Template ID.")
+@Parameter(name = ApiConstants.ID, type = CommandType.UUID,
+entityType = TemplateResponse.class, required = true, 
description = "Template ID.")
 private Long id;
 
 @Parameter(name = ApiConstants.SOURCE_ZONE_ID,
type = CommandType.UUID,
entityType = ZoneResponse.class,
-description = "ID of the zone the template is currently hosted 
on. If not specified and template is cross-zone, then we will sync this 
template to region wide image store.")
+description = "ID of the zone the template is currently hosted 
on. " +
+"If not specified and template is cross-zone, " +
+"then we will sync this template to region wide image 
store.")
--- End diff --

This change is not required. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request #1894: CLOUDSTACK-9700 Allow user to Register/Copy t...

2017-01-06 Thread rashmidixit
GitHub user rashmidixit opened a pull request:

https://github.com/apache/cloudstack/pull/1894

CLOUDSTACK-9700 Allow user to Register/Copy templates to multiple zones at 
the same time

A user can currently copy or register a template with only one zone at a 
time.
The idea of this feature is to allow the user to allow copying or 
registering of one template to multiple zones at the same time.

For RegisterTemplate and CopyTemplate APIs have been modified to add a new 
parameter called zoneIds. This is not compulsory to keep backward compatibility.

The UIs have been changes - When you add, the earlier select control for 
zones now is a multi select and you can choose multiple zones at the same time. 
For CopyTemplate a new dialog has been added - this shows all the zones you 
can copy to and allows you to select multiple at a time.

Please see 
[CLOUDSTACK-9700](https://issues.apache.org/jira/browse/CLOUDSTACK-9700) for 
more details. Snapshots of the UI have been attached there.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/Accelerite/cloudstack CLOUDSTACK-9700

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/1894.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1894


commit c4d97f366d0e79f97649b5574f734b3c14125281
Author: rashmidixit 
Date:   2016-07-06T12:05:47Z

CLOUDSTACK-9700 RegisterTemplate API and Add Template UI changes to support 
template registration to multiple zones
Reviewed-By Rajani K, Kaushik D, Hari P, Nitin M

This change enabled to register a template
to multiple zones in one go. The UI has been changed to allow this.
RegisterTemplate API has also been updated for this. ~10 junit tests
have been added to test the API.

Conflicts:

api/src/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java

plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalTemplateAdapter.java

plugins/hypervisors/baremetal/src/com/cloud/wds/networkservice/WdsTemplateAdapter.java
server/src/com/cloud/template/HypervisorTemplateAdapter.java
server/src/com/cloud/template/TemplateAdapterBase.java
ui/scripts/templates.js

commit 4d5554401edfcf3da4d8b2bdf4eb458e0ac40dd4
Author: sanket_thite 
Date:   2016-09-01T05:25:42Z

CLOUDSTACK-9700 Copy Template to multiple zones Instead of Single/All Zones
Reviewed-By: Rashmi,Rajani,Harikrishna,Nitin.

Conflicts:
client/WEB-INF/classes/resources/messages.properties
server/src/com/cloud/template/TemplateManagerImpl.java
ui/css/cloudstack3.css
ui/dictionary2.jsp
ui/index.html

commit d92b1e4a151b60aa4440f1c741f23b275d0a6951
Author: rashmidixit 
Date:   2017-01-06T12:25:32Z

CLOUDSTACK-9700 Added missing License information to the new files.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---