[GitHub] marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates

2018-01-03 Thread GitBox
marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: 
Bypass Secondary Storage for KVM templates
URL: https://github.com/apache/cloudstack/pull/2379#discussion_r159595450
 
 

 ##
 File path: 
engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateDataFactoryImpl.java
 ##
 @@ -153,4 +164,67 @@ public TemplateInfo getReadyTemplateOnCache(long 
templateId) {
 return tmplObjs;
 }
 
+/**
+ * Given existing spool refs, return one pool id existing on pools and refs
+ * @param existingRefs
+ * @param pools
+ * @return
+ */
+private Long getOneMatchingPoolIdFromRefs(List 
existingRefs, List pools) {
+for (VMTemplateStoragePoolVO ref : existingRefs) {
+for (StoragePoolVO p : pools) {
+if (ref.getPoolId() == p.getId()) {
+return p.getId();
+}
+}
+}
+return null;
+}
+
+/**
+ * Retrieve storage pools with scope = cluster or zone matching clusterId 
or dataCenterId depending on their scope
+ * @param clusterId
+ * @param dataCenterId
+ * @param hypervisorType
+ * @return
+ */
+private List getStoragePoolsFromClusterOrZone(Long 
clusterId, long dataCenterId, Hypervisor.HypervisorType hypervisorType) {
+List pools = new ArrayList<>();
+if (clusterId != null) {
+List clusterPools = 
primaryDataStoreDao.listPoolsByCluster(clusterId);
+pools.addAll(clusterPools);
+}
+List zonePools = 
primaryDataStoreDao.findZoneWideStoragePoolsByHypervisor(dataCenterId, 
hypervisorType);
+pools.addAll(zonePools);
+return pools;
+}
+
+@Override
+public TemplateInfo getReadyBypassedTemplateOnPrimaryStore(long 
templateId, Long poolId, Long hostId) {
+VMTemplateVO templateVO = imageDataDao.findById(templateId);
+if (templateVO == null || !templateVO.isDirectDownload()) {
+return null;
+}
+Long pool = poolId;
+if (poolId == null) {
+//Get ISO from existing pool ref
+HostVO host = hostDao.findById(hostId);
+List pools = 
getStoragePoolsFromClusterOrZone(host.getClusterId(), host.getDataCenterId(), 
host.getHypervisorType());
+List existingRefs = 
templatePoolDao.listByTemplateId(templateId);
+pool = getOneMatchingPoolIdFromRefs(existingRefs, pools);
+}
+VMTemplateStoragePoolVO spoolRef = 
templatePoolDao.findByPoolTemplate(pool, templateId);
 
 Review comment:
   `pool` can be null here, according to 
https://github.com/apache/cloudstack/pull/2379/files#diff-92e0bb0fd44a51c2c2234ae65d88fbbdR181
   Unsure if `findBYPoolTemplate` will like it or not


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates

2018-01-03 Thread GitBox
marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: 
Bypass Secondary Storage for KVM templates
URL: https://github.com/apache/cloudstack/pull/2379#discussion_r159595450
 
 

 ##
 File path: 
engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateDataFactoryImpl.java
 ##
 @@ -153,4 +164,67 @@ public TemplateInfo getReadyTemplateOnCache(long 
templateId) {
 return tmplObjs;
 }
 
+/**
+ * Given existing spool refs, return one pool id existing on pools and refs
+ * @param existingRefs
+ * @param pools
+ * @return
+ */
+private Long getOneMatchingPoolIdFromRefs(List 
existingRefs, List pools) {
+for (VMTemplateStoragePoolVO ref : existingRefs) {
+for (StoragePoolVO p : pools) {
+if (ref.getPoolId() == p.getId()) {
+return p.getId();
+}
+}
+}
+return null;
+}
+
+/**
+ * Retrieve storage pools with scope = cluster or zone matching clusterId 
or dataCenterId depending on their scope
+ * @param clusterId
+ * @param dataCenterId
+ * @param hypervisorType
+ * @return
+ */
+private List getStoragePoolsFromClusterOrZone(Long 
clusterId, long dataCenterId, Hypervisor.HypervisorType hypervisorType) {
+List pools = new ArrayList<>();
+if (clusterId != null) {
+List clusterPools = 
primaryDataStoreDao.listPoolsByCluster(clusterId);
+pools.addAll(clusterPools);
+}
+List zonePools = 
primaryDataStoreDao.findZoneWideStoragePoolsByHypervisor(dataCenterId, 
hypervisorType);
+pools.addAll(zonePools);
+return pools;
+}
+
+@Override
+public TemplateInfo getReadyBypassedTemplateOnPrimaryStore(long 
templateId, Long poolId, Long hostId) {
+VMTemplateVO templateVO = imageDataDao.findById(templateId);
+if (templateVO == null || !templateVO.isDirectDownload()) {
+return null;
+}
+Long pool = poolId;
+if (poolId == null) {
+//Get ISO from existing pool ref
+HostVO host = hostDao.findById(hostId);
+List pools = 
getStoragePoolsFromClusterOrZone(host.getClusterId(), host.getDataCenterId(), 
host.getHypervisorType());
+List existingRefs = 
templatePoolDao.listByTemplateId(templateId);
+pool = getOneMatchingPoolIdFromRefs(existingRefs, pools);
+}
+VMTemplateStoragePoolVO spoolRef = 
templatePoolDao.findByPoolTemplate(pool, templateId);
 
 Review comment:
   `pool` can be null here, according to 
https://github.com/apache/cloudstack/pull/2379/files#diff-92e0bb0fd44a51c2c2234ae65d88fbbdR181


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[cloudstack] branch master updated: CLOUDSTACK-10205: LinkDomainToLdap returns UUID instead of internal id (#2378)

2018-01-03 Thread rohit
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
 new 8131bcc  CLOUDSTACK-10205: LinkDomainToLdap returns UUID instead of 
internal id (#2378)
8131bcc is described below

commit 8131bccd979d764cbab44705dd7f1d9539fd06ef
Author: dahn 
AuthorDate: Thu Jan 4 08:56:21 2018 +0100

CLOUDSTACK-10205: LinkDomainToLdap returns UUID instead of internal id 
(#2378)

The internal id is not usefull to the user. It is a bug to return it 
instead of a uuid.
In the process of fixing the above "name" was deprecated in favour of 
"ldap_domain".
---
 .../org/apache/cloudstack/api/ApiConstants.java|  1 +
 .../api/response/LinkDomainToLdapResponse.java | 21 
 .../apache/cloudstack/ldap/LdapManagerImpl.java| 14 ++-
 .../cloudstack/ldap/LinkDomainToLdapCmdSpec.groovy | 28 +++---
 4 files changed, 44 insertions(+), 20 deletions(-)

diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java 
b/api/src/org/apache/cloudstack/api/ApiConstants.java
index 0e275b5..41cf7d9 100644
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@ -707,6 +707,7 @@ public class ApiConstants {
 
 public static final String HAS_ANNOTATION = "hasannotation";
 public static final String LAST_ANNOTATED = "lastannotated";
+public static final String LDAP_DOMAIN = "ldapdomain";
 
 
 public enum HostDetails {
diff --git 
a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/response/LinkDomainToLdapResponse.java
 
b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/response/LinkDomainToLdapResponse.java
index b0032b0..050eb6c 100644
--- 
a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/response/LinkDomainToLdapResponse.java
+++ 
b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/response/LinkDomainToLdapResponse.java
@@ -27,12 +27,17 @@ public class LinkDomainToLdapResponse extends BaseResponse {
 
 @SerializedName(ApiConstants.DOMAIN_ID)
 @Param(description = "id of the Domain which is linked to LDAP")
-private long domainId;
+private String domainId;
 
+@Deprecated
 @SerializedName(ApiConstants.NAME)
 @Param(description = "name of the group or OU in LDAP which is linked to 
the domain")
 private String name;
 
+@SerializedName(ApiConstants.LDAP_DOMAIN)
+@Param(description = "name of the group or OU in LDAP which is linked to 
the domain")
+private String ldapDomain;
+
 @SerializedName(ApiConstants.TYPE)
 @Param(description = "type of the name in LDAP which is linke to the 
domain")
 private String type;
@@ -45,19 +50,25 @@ public class LinkDomainToLdapResponse extends BaseResponse {
 @Param(description = "Domain Admin accountId that is created")
 private String adminId;
 
-public LinkDomainToLdapResponse(long domainId, String type, String name, 
short accountType) {
+public LinkDomainToLdapResponse(String domainId, String type, String 
ldapDomain, short accountType) {
 this.domainId = domainId;
-this.name = name;
+this.name = ldapDomain;
+this.ldapDomain = ldapDomain;
 this.type = type;
 this.accountType = accountType;
 }
 
-public long getDomainId() {
+public String getDomainId() {
 return domainId;
 }
 
+public String getLdapDomain() {
+return ldapDomain == null ? name : ldapDomain;
+}
+
+@Deprecated
 public String getName() {
-return name;
+return ldapDomain == null ? name : ldapDomain;
 }
 
 public String getType() {
diff --git 
a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManagerImpl.java
 
b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManagerImpl.java
index a4d3406..beb7a61 100644
--- 
a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManagerImpl.java
+++ 
b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManagerImpl.java
@@ -44,6 +44,8 @@ import org.apache.commons.lang.Validate;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
+import com.cloud.domain.DomainVO;
+import com.cloud.domain.dao.DomainDao;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.utils.Pair;
 
@@ -55,6 +57,9 @@ public class LdapManagerImpl implements LdapManager, 
LdapValidator {
 private LdapConfigurationDao _ldapConfigurationDao;
 
 @Inject
+private DomainDao domainDao;
+
+@Inject
 private LdapContextFactory _ldapContextFactory;
 
 @Inject
@@ -270,7 +275,14 @@ public class LdapManagerImpl implements LdapManager, 
LdapValidator {
 Validate.isTrue(accountType==0 || accountType==2, 

[GitHub] rhtyd commented on issue #2378: CLOUDSTACK-10205 make LinkDomainToLdap return UUID instead of internal id

2018-01-03 Thread GitBox
rhtyd commented on issue #2378: CLOUDSTACK-10205 make LinkDomainToLdap return 
UUID instead of internal id
URL: https://github.com/apache/cloudstack/pull/2378#issuecomment-355219656
 
 
   Merging this based on code reviews (2x) lgtms and test results.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd closed pull request #2378: CLOUDSTACK-10205 make LinkDomainToLdap return UUID instead of internal id

2018-01-03 Thread GitBox
rhtyd closed pull request #2378: CLOUDSTACK-10205 make LinkDomainToLdap return 
UUID instead of internal id
URL: https://github.com/apache/cloudstack/pull/2378
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java 
b/api/src/org/apache/cloudstack/api/ApiConstants.java
index 55e8c285e6b..98b5ccb99a1 100644
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@ -705,6 +705,7 @@
 
 public static final String HAS_ANNOTATION = "hasannotation";
 public static final String LAST_ANNOTATED = "lastannotated";
+public static final String LDAP_DOMAIN = "ldapdomain";
 
 public enum HostDetails {
 all, capacity, events, stats, min;
diff --git 
a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/response/LinkDomainToLdapResponse.java
 
b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/response/LinkDomainToLdapResponse.java
index b0032b04b4d..050eb6c3eb5 100644
--- 
a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/response/LinkDomainToLdapResponse.java
+++ 
b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/response/LinkDomainToLdapResponse.java
@@ -27,12 +27,17 @@
 
 @SerializedName(ApiConstants.DOMAIN_ID)
 @Param(description = "id of the Domain which is linked to LDAP")
-private long domainId;
+private String domainId;
 
+@Deprecated
 @SerializedName(ApiConstants.NAME)
 @Param(description = "name of the group or OU in LDAP which is linked to 
the domain")
 private String name;
 
+@SerializedName(ApiConstants.LDAP_DOMAIN)
+@Param(description = "name of the group or OU in LDAP which is linked to 
the domain")
+private String ldapDomain;
+
 @SerializedName(ApiConstants.TYPE)
 @Param(description = "type of the name in LDAP which is linke to the 
domain")
 private String type;
@@ -45,19 +50,25 @@
 @Param(description = "Domain Admin accountId that is created")
 private String adminId;
 
-public LinkDomainToLdapResponse(long domainId, String type, String name, 
short accountType) {
+public LinkDomainToLdapResponse(String domainId, String type, String 
ldapDomain, short accountType) {
 this.domainId = domainId;
-this.name = name;
+this.name = ldapDomain;
+this.ldapDomain = ldapDomain;
 this.type = type;
 this.accountType = accountType;
 }
 
-public long getDomainId() {
+public String getDomainId() {
 return domainId;
 }
 
+public String getLdapDomain() {
+return ldapDomain == null ? name : ldapDomain;
+}
+
+@Deprecated
 public String getName() {
-return name;
+return ldapDomain == null ? name : ldapDomain;
 }
 
 public String getType() {
diff --git 
a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManagerImpl.java
 
b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManagerImpl.java
index a4d340647f4..beb7a61cd70 100644
--- 
a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManagerImpl.java
+++ 
b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManagerImpl.java
@@ -44,6 +44,8 @@
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
+import com.cloud.domain.DomainVO;
+import com.cloud.domain.dao.DomainDao;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.utils.Pair;
 
@@ -54,6 +56,9 @@
 @Inject
 private LdapConfigurationDao _ldapConfigurationDao;
 
+@Inject
+private DomainDao domainDao;
+
 @Inject
 private LdapContextFactory _ldapContextFactory;
 
@@ -270,7 +275,14 @@ public LinkDomainToLdapResponse linkDomainToLdap(Long 
domainId, String type, Str
 Validate.isTrue(accountType==0 || accountType==2, "accountype should 
be either 0(normal user) or 2(domain admin)");
 LinkType linkType = LdapManager.LinkType.valueOf(type.toUpperCase());
 LdapTrustMapVO vo = _ldapTrustMapDao.persist(new 
LdapTrustMapVO(domainId, linkType, name, accountType));
-LinkDomainToLdapResponse response = new 
LinkDomainToLdapResponse(vo.getDomainId(), vo.getType().toString(), 
vo.getName(), vo.getAccountType());
+DomainVO domain = domainDao.findById(vo.getDomainId());
+String domainUuid = "";
+if (domain == null) {
+s_logger.error("no domain in database for id " + vo.getDomainId());
+} else {
+domainUuid = domain.getUuid();
+}
+LinkDomainToLdapResponse response = new 
LinkDomainToLdapResponse(domainUuid, vo.getType().toString(), vo.getName(), 
vo.getAccountType());
 return 

[GitHub] borisstoyanov commented on issue #2381: CLOUDSTACK-10117 Account ldap binding

2018-01-03 Thread GitBox
borisstoyanov commented on issue #2381: CLOUDSTACK-10117 Account ldap binding
URL: https://github.com/apache/cloudstack/pull/2381#issuecomment-355219599
 
 
   I will be running some tests today @rhtyd, I'll post my review by end of day 
today.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] yvsubhash commented on issue #2102: CLOUDSTACK-9889 Dedication of guest vlan range to a domain

2018-01-03 Thread GitBox
yvsubhash commented on issue #2102: CLOUDSTACK-9889 Dedication of guest vlan 
range to a domain
URL: https://github.com/apache/cloudstack/pull/2102#issuecomment-355219610
 
 
   @rhtyd  conflicts are taken care


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates

2018-01-03 Thread GitBox
marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: 
Bypass Secondary Storage for KVM templates
URL: https://github.com/apache/cloudstack/pull/2379#discussion_r159595127
 
 

 ##
 File path: engine/schema/src/com/cloud/storage/VMTemplateVO.java
 ##
 @@ -605,6 +609,10 @@ public void setUpdated(Date updated) {
 this.updated = updated;
 }
 
+public Boolean isDirectDownload() {
 
 Review comment:
   `boolean`


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates

2018-01-03 Thread GitBox
marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: 
Bypass Secondary Storage for KVM templates
URL: https://github.com/apache/cloudstack/pull/2379#discussion_r159595094
 
 

 ##
 File path: engine/schema/resources/META-INF/db/schema-41000to41100.sql
 ##
 @@ -516,3 +516,109 @@ UPDATE `cloud`.`vm_template` SET guest_os_id=99 WHERE 
id=8;
 
 -- Network External Ids
 ALTER TABLE `cloud`.`networks` ADD `external_id` varchar(255);
+
+-- CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates
+ALTER TABLE `cloud`.`vm_template`
+ADD COLUMN `direct_download` TINYINT(1) DEFAULT '0' COMMENT 'Indicates if 
Secondary Storage is bypassed and template is downloaded to Primary Storage';
+
+DROP VIEW IF EXISTS `cloud`.`template_view`;
+CREATE VIEW `template_view` AS
 
 Review comment:
   Better to put those drop & create in a single statement:
   ```sql
   CREATE OR REPLACE VIEW `template_view` AS
   ``` 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates

2018-01-03 Thread GitBox
marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: 
Bypass Secondary Storage for KVM templates
URL: https://github.com/apache/cloudstack/pull/2379#discussion_r159594943
 
 

 ##
 File path: 
engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
 ##
 @@ -1273,6 +1273,7 @@ public void prepareForMigration(VirtualMachineProfile 
vm, DeployDestination dest
 for (int i = 0; i < 2; i++) {
 // retry one more time in case of template reload is required for 
Vmware case
 AsyncCallFuture future = null;
+boolean bypassed = false;
 
 Review comment:
   unused variable


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates

2018-01-03 Thread GitBox
marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: 
Bypass Secondary Storage for KVM templates
URL: https://github.com/apache/cloudstack/pull/2379#discussion_r159594766
 
 

 ##
 File path: 
engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateInfo.java
 ##
 @@ -25,4 +25,6 @@
 String getUniqueName();
 
 String getInstallPath();
+
+boolean isDirectDownload();
 
 Review comment:
   Just for your info, be aware of not mixing `Boolean` and `boolean` types 
since the JVM won't check for those kind of mismatch as it does auto casting to 
the expected type. But you will end up with a NPE when getting a `Boolean` NULL 
on a method expecting a `boolean`.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates

2018-01-03 Thread GitBox
marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: 
Bypass Secondary Storage for KVM templates
URL: https://github.com/apache/cloudstack/pull/2379#discussion_r159594511
 
 

 ##
 File path: 
core/src/org/apache/cloudstack/agent/directdownload/MetalinkDirectDownloadCommand.java
 ##
 @@ -0,0 +1,38 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package org.apache.cloudstack.agent.directdownload;
+
+import org.apache.cloudstack.storage.to.PrimaryDataStoreTO;
+
+public class MetalinkDirectDownloadCommand extends DirectDownloadCommand {
+
+public MetalinkDirectDownloadCommand(String url, Long templateId, 
PrimaryDataStoreTO destPool, String checksum) {
+super(url, templateId, destPool, checksum);
+}
+
+@Override
+public void setExecuteInSequence(boolean inSeq) {
+
+}
 
 Review comment:
   Function can be removed


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates

2018-01-03 Thread GitBox
marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: 
Bypass Secondary Storage for KVM templates
URL: https://github.com/apache/cloudstack/pull/2379#discussion_r159594529
 
 

 ##
 File path: 
core/src/org/apache/cloudstack/agent/directdownload/NfsDirectDownloadCommand.java
 ##
 @@ -0,0 +1,38 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package org.apache.cloudstack.agent.directdownload;
+
+import org.apache.cloudstack.storage.to.PrimaryDataStoreTO;
+
+public class NfsDirectDownloadCommand extends DirectDownloadCommand {
+
+public NfsDirectDownloadCommand(final String url, final Long templateId, 
final PrimaryDataStoreTO destPool, final String checksum) {
+super(url, templateId, destPool, checksum);
+}
+
+@Override
+public void setExecuteInSequence(boolean inSeq) {
+
+}
 
 Review comment:
   Function can be removed


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates

2018-01-03 Thread GitBox
marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: 
Bypass Secondary Storage for KVM templates
URL: https://github.com/apache/cloudstack/pull/2379#discussion_r159594458
 
 

 ##
 File path: 
core/src/org/apache/cloudstack/agent/directdownload/HttpDirectDownloadCommand.java
 ##
 @@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cloudstack.agent.directdownload;
+
+import org.apache.cloudstack.storage.to.PrimaryDataStoreTO;
+
+import java.util.Map;
+
+public class HttpDirectDownloadCommand extends DirectDownloadCommand {
+
+private Map headers;
+
+public HttpDirectDownloadCommand(String url, Long templateId, 
PrimaryDataStoreTO destPool, String checksum, Map headers) {
+super(url, templateId, destPool, checksum);
+this.headers = headers;
+}
+
+public Map getHeaders() {
+return headers;
+}
+
+@Override
+public void setExecuteInSequence(boolean inSeq) {
+}
 
 Review comment:
   Function can be removed


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates

2018-01-03 Thread GitBox
marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: 
Bypass Secondary Storage for KVM templates
URL: https://github.com/apache/cloudstack/pull/2379#discussion_r159594157
 
 

 ##
 File path: 
api/src/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java
 ##
 @@ -263,6 +269,10 @@ public Boolean isRoutingType() {
 return isRoutingType;
 }
 
+public Boolean isDirectDownload() {
 
 Review comment:
   `boolean` here too


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates

2018-01-03 Thread GitBox
marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: 
Bypass Secondary Storage for KVM templates
URL: https://github.com/apache/cloudstack/pull/2379#discussion_r159593979
 
 

 ##
 File path: 
api/src/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java
 ##
 @@ -168,6 +173,10 @@ public Boolean isDynamicallyScalable() {
 return isDynamicallyScalable ==  null ? Boolean.FALSE : 
isDynamicallyScalable;
 }
 
+public Boolean isDirectDownload() {
 
 Review comment:
   can return a `boolean` instead since it cannot be null


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates

2018-01-03 Thread GitBox
marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: 
Bypass Secondary Storage for KVM templates
URL: https://github.com/apache/cloudstack/pull/2379#discussion_r159593522
 
 

 ##
 File path: 
agent/src/com/cloud/agent/direct/download/HttpDirectTemplateDownloader.java
 ##
 @@ -0,0 +1,158 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package com.cloud.agent.direct.download;
+
+import com.cloud.utils.exception.CloudRuntimeException;
+import org.apache.commons.httpclient.Header;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpMethod;
+import org.apache.commons.httpclient.HttpMethodRetryHandler;
+import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
+import org.apache.commons.httpclient.NoHttpResponseException;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.httpclient.params.HttpMethodParams;
+import org.apache.log4j.Logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.RandomAccessFile;
+import java.util.Map;
+
+public class HttpDirectTemplateDownloader extends DirectTemplateDownloaderImpl 
{
+
+private HttpClient client;
+private static final MultiThreadedHttpConnectionManager 
s_httpClientManager = new MultiThreadedHttpConnectionManager();
+private static final int CHUNK_SIZE = 1024 * 1024; //1M
+private final HttpMethodRetryHandler myretryhandler;
+public static final Logger s_logger = 
Logger.getLogger(HttpDirectTemplateDownloader.class.getName());
+private GetMethod request;
+private long remoteSize;
+
+public HttpDirectTemplateDownloader(String url, Long templateId, String 
destPoolPath, String checksum, Map headers) {
+super(url, destPoolPath, templateId, checksum);
+client = new HttpClient(s_httpClientManager);
+myretryhandler = createRetryTwiceHandler();
+request = createRequest(url, headers);
+String downloadDir = getDirectDownloadTempPath(templateId);
+createTemporaryDirectoryAndFile(downloadDir);
+}
+
+private void createTemporaryDirectoryAndFile(String downloadDir) {
+createFolder(getDestPoolPath() + File.separator + downloadDir);
+File f = new File(getDestPoolPath() + File.separator + downloadDir + 
File.separator + getFileNameFromUrl());
+setDownloadedFilePath(f.getAbsolutePath());
+}
+
+private GetMethod createRequest(String downloadUrl, Map 
headers) {
+GetMethod request = new GetMethod(downloadUrl);
+request.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, 
myretryhandler);
+request.setFollowRedirects(true);
+for (String key : headers.keySet()) {
+request.setRequestHeader(key, headers.get(key));
+}
+return request;
+}
+
+private long getRemoteSize(GetMethod request) {
+Header contentLengthHeader = 
request.getResponseHeader("Content-Length");
+long reportedRemoteSize = 0;
+if (contentLengthHeader == null) {
+Header chunkedHeader = 
request.getResponseHeader("Transfer-Encoding");
+if (chunkedHeader == null || 
!"chunked".equalsIgnoreCase(chunkedHeader.getValue())) {
+throw new CloudRuntimeException("Error template remote size");
+}
+} else {
+reportedRemoteSize = 
Long.parseLong(contentLengthHeader.getValue());
+}
+return reportedRemoteSize;
+}
+
+private HttpMethodRetryHandler createRetryTwiceHandler() {
+return new HttpMethodRetryHandler() {
+@Override
+public boolean retryMethod(final HttpMethod method, final 
IOException exception, int executionCount) {
+if (executionCount >= 2) {
+// Do not retry if over max retry count
+return false;
+}
+if (exception instanceof NoHttpResponseException) {
+// Retry if the server dropped connection on us
+return true;
+}
+if (!method.isRequestSent()) {
+  

[GitHub] marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates

2018-01-03 Thread GitBox
marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: 
Bypass Secondary Storage for KVM templates
URL: https://github.com/apache/cloudstack/pull/2379#discussion_r159590751
 
 

 ##
 File path: 
agent/src/com/cloud/agent/direct/download/HttpDirectTemplateDownloader.java
 ##
 @@ -0,0 +1,158 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package com.cloud.agent.direct.download;
+
+import com.cloud.utils.exception.CloudRuntimeException;
+import org.apache.commons.httpclient.Header;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpMethod;
+import org.apache.commons.httpclient.HttpMethodRetryHandler;
+import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
+import org.apache.commons.httpclient.NoHttpResponseException;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.httpclient.params.HttpMethodParams;
+import org.apache.log4j.Logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.RandomAccessFile;
+import java.util.Map;
+
+public class HttpDirectTemplateDownloader extends DirectTemplateDownloaderImpl 
{
+
+private HttpClient client;
+private static final MultiThreadedHttpConnectionManager 
s_httpClientManager = new MultiThreadedHttpConnectionManager();
+private static final int CHUNK_SIZE = 1024 * 1024; //1M
+private final HttpMethodRetryHandler myretryhandler;
+public static final Logger s_logger = 
Logger.getLogger(HttpDirectTemplateDownloader.class.getName());
+private GetMethod request;
+private long remoteSize;
+
+public HttpDirectTemplateDownloader(String url, Long templateId, String 
destPoolPath, String checksum, Map headers) {
+super(url, destPoolPath, templateId, checksum);
+client = new HttpClient(s_httpClientManager);
+myretryhandler = createRetryTwiceHandler();
+request = createRequest(url, headers);
+String downloadDir = getDirectDownloadTempPath(templateId);
+createTemporaryDirectoryAndFile(downloadDir);
+}
+
+private void createTemporaryDirectoryAndFile(String downloadDir) {
+createFolder(getDestPoolPath() + File.separator + downloadDir);
+File f = new File(getDestPoolPath() + File.separator + downloadDir + 
File.separator + getFileNameFromUrl());
+setDownloadedFilePath(f.getAbsolutePath());
+}
+
+private GetMethod createRequest(String downloadUrl, Map 
headers) {
+GetMethod request = new GetMethod(downloadUrl);
+request.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, 
myretryhandler);
+request.setFollowRedirects(true);
+for (String key : headers.keySet()) {
+request.setRequestHeader(key, headers.get(key));
+}
+return request;
+}
+
+private long getRemoteSize(GetMethod request) {
+Header contentLengthHeader = 
request.getResponseHeader("Content-Length");
+long reportedRemoteSize = 0;
+if (contentLengthHeader == null) {
+Header chunkedHeader = 
request.getResponseHeader("Transfer-Encoding");
+if (chunkedHeader == null || 
!"chunked".equalsIgnoreCase(chunkedHeader.getValue())) {
+throw new CloudRuntimeException("Error template remote size");
+}
+} else {
+reportedRemoteSize = 
Long.parseLong(contentLengthHeader.getValue());
+}
+return reportedRemoteSize;
+}
+
+private HttpMethodRetryHandler createRetryTwiceHandler() {
+return new HttpMethodRetryHandler() {
+@Override
+public boolean retryMethod(final HttpMethod method, final 
IOException exception, int executionCount) {
+if (executionCount >= 2) {
+// Do not retry if over max retry count
+return false;
+}
+if (exception instanceof NoHttpResponseException) {
+// Retry if the server dropped connection on us
+return true;
+}
+if (!method.isRequestSent()) {
+  

[GitHub] marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates

2018-01-03 Thread GitBox
marcaurele commented on a change in pull request #2379: CLOUDSTACK-10146: 
Bypass Secondary Storage for KVM templates
URL: https://github.com/apache/cloudstack/pull/2379#discussion_r159590751
 
 

 ##
 File path: 
agent/src/com/cloud/agent/direct/download/HttpDirectTemplateDownloader.java
 ##
 @@ -0,0 +1,158 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+package com.cloud.agent.direct.download;
+
+import com.cloud.utils.exception.CloudRuntimeException;
+import org.apache.commons.httpclient.Header;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpMethod;
+import org.apache.commons.httpclient.HttpMethodRetryHandler;
+import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
+import org.apache.commons.httpclient.NoHttpResponseException;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.httpclient.params.HttpMethodParams;
+import org.apache.log4j.Logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.RandomAccessFile;
+import java.util.Map;
+
+public class HttpDirectTemplateDownloader extends DirectTemplateDownloaderImpl 
{
+
+private HttpClient client;
+private static final MultiThreadedHttpConnectionManager 
s_httpClientManager = new MultiThreadedHttpConnectionManager();
+private static final int CHUNK_SIZE = 1024 * 1024; //1M
+private final HttpMethodRetryHandler myretryhandler;
+public static final Logger s_logger = 
Logger.getLogger(HttpDirectTemplateDownloader.class.getName());
+private GetMethod request;
+private long remoteSize;
+
+public HttpDirectTemplateDownloader(String url, Long templateId, String 
destPoolPath, String checksum, Map headers) {
+super(url, destPoolPath, templateId, checksum);
+client = new HttpClient(s_httpClientManager);
+myretryhandler = createRetryTwiceHandler();
+request = createRequest(url, headers);
+String downloadDir = getDirectDownloadTempPath(templateId);
+createTemporaryDirectoryAndFile(downloadDir);
+}
+
+private void createTemporaryDirectoryAndFile(String downloadDir) {
+createFolder(getDestPoolPath() + File.separator + downloadDir);
+File f = new File(getDestPoolPath() + File.separator + downloadDir + 
File.separator + getFileNameFromUrl());
+setDownloadedFilePath(f.getAbsolutePath());
+}
+
+private GetMethod createRequest(String downloadUrl, Map 
headers) {
+GetMethod request = new GetMethod(downloadUrl);
+request.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, 
myretryhandler);
+request.setFollowRedirects(true);
+for (String key : headers.keySet()) {
+request.setRequestHeader(key, headers.get(key));
+}
+return request;
+}
+
+private long getRemoteSize(GetMethod request) {
+Header contentLengthHeader = 
request.getResponseHeader("Content-Length");
+long reportedRemoteSize = 0;
+if (contentLengthHeader == null) {
+Header chunkedHeader = 
request.getResponseHeader("Transfer-Encoding");
+if (chunkedHeader == null || 
!"chunked".equalsIgnoreCase(chunkedHeader.getValue())) {
+throw new CloudRuntimeException("Error template remote size");
+}
+} else {
+reportedRemoteSize = 
Long.parseLong(contentLengthHeader.getValue());
+}
+return reportedRemoteSize;
+}
+
+private HttpMethodRetryHandler createRetryTwiceHandler() {
+return new HttpMethodRetryHandler() {
+@Override
+public boolean retryMethod(final HttpMethod method, final 
IOException exception, int executionCount) {
+if (executionCount >= 2) {
+// Do not retry if over max retry count
+return false;
+}
+if (exception instanceof NoHttpResponseException) {
+// Retry if the server dropped connection on us
+return true;
+}
+if (!method.isRequestSent()) {
+  

[cloudstack] branch debian9-systemvmtemplate deleted (was d19629a)

2018-01-03 Thread rohit
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a change to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git.


 was d19629a  CLOUDSTACK-10013: Fixes based on code review and test failures

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.

-- 
To stop receiving notification emails like this one, please contact
['"commits@cloudstack.apache.org" '].


[GitHub] rhtyd commented on issue #2381: CLOUDSTACK-10117 Account ldap binding

2018-01-03 Thread GitBox
rhtyd commented on issue #2381: CLOUDSTACK-10117 Account ldap binding
URL: https://github.com/apache/cloudstack/pull/2381#issuecomment-355213223
 
 
   Tests LGTM - `Smoke tests completed. 66 look OK, 0 have error(s)`
   Additional review requested - @nvazquez @borisstoyanov @rafaelweingartner 
@wido @marcaurele @karuturi and others?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on a change in pull request #2381: CLOUDSTACK-10117 Account ldap binding

2018-01-03 Thread GitBox
rhtyd commented on a change in pull request #2381: CLOUDSTACK-10117 Account 
ldap binding
URL: https://github.com/apache/cloudstack/pull/2381#discussion_r159589659
 
 

 ##
 File path: 
plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/response/LdapConfigurationResponse.java
 ##
 @@ -31,18 +34,27 @@
 @Param(description = "port")
 private int port;
 
+@SerializedName("domain_id")
 
 Review comment:
   This can be `domainid` like used/returned by other responses.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on a change in pull request #2381: CLOUDSTACK-10117 Account ldap binding

2018-01-03 Thread GitBox
rhtyd commented on a change in pull request #2381: CLOUDSTACK-10117 Account 
ldap binding
URL: https://github.com/apache/cloudstack/pull/2381#discussion_r159589538
 
 

 ##
 File path: 
plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LinkAccountToLdapCmd.java
 ##
 @@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cloudstack.api.command;
+
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.user.Account;
+import com.cloud.user.User;
+import com.cloud.user.UserAccount;
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.DomainResponse;
+import org.apache.cloudstack.api.response.LinkAccountToLdapResponse;
+import org.apache.cloudstack.api.response.LinkDomainToLdapResponse;
+import org.apache.cloudstack.ldap.LdapManager;
+import org.apache.cloudstack.ldap.LdapUser;
+import org.apache.cloudstack.ldap.NoLdapUserMatchingQueryException;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.UUID;
+
+@APICommand(name = "linkAccountToLdap", description = "link a cloudstack 
account to a group or OU in ldap", responseObject = 
LinkDomainToLdapResponse.class, since = "4.11.0",
+requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
+public class LinkAccountToLdapCmd extends BaseCmd {
+public static final Logger LOGGER = 
Logger.getLogger(LinkAccountToLdapCmd.class.getName());
+public static final String APINAME = "LinkAccountToLdap";
 
 Review comment:
   Fix the case to `linkAccountToLdap`


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on a change in pull request #2381: CLOUDSTACK-10117 Account ldap binding

2018-01-03 Thread GitBox
rhtyd commented on a change in pull request #2381: CLOUDSTACK-10117 Account 
ldap binding
URL: https://github.com/apache/cloudstack/pull/2381#discussion_r159589845
 
 

 ##
 File path: server/src/com/cloud/configuration/Config.java
 ##
 @@ -39,6 +39,10 @@
 import com.cloud.vm.UserVmManager;
 import com.cloud.vm.snapshot.VMSnapshotManager;
 
+/**
+ * @deprecated use the more dynamic ConfigKey
+ */
+@Deprecated
 
 Review comment:
   +1


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on a change in pull request #2381: CLOUDSTACK-10117 Account ldap binding

2018-01-03 Thread GitBox
rhtyd commented on a change in pull request #2381: CLOUDSTACK-10117 Account 
ldap binding
URL: https://github.com/apache/cloudstack/pull/2381#discussion_r159589567
 
 

 ##
 File path: 
plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LinkAccountToLdapCmd.java
 ##
 @@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cloudstack.api.command;
+
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.user.Account;
+import com.cloud.user.User;
+import com.cloud.user.UserAccount;
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.DomainResponse;
+import org.apache.cloudstack.api.response.LinkAccountToLdapResponse;
+import org.apache.cloudstack.api.response.LinkDomainToLdapResponse;
+import org.apache.cloudstack.ldap.LdapManager;
+import org.apache.cloudstack.ldap.LdapUser;
+import org.apache.cloudstack.ldap.NoLdapUserMatchingQueryException;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.UUID;
+
+@APICommand(name = "linkAccountToLdap", description = "link a cloudstack 
account to a group or OU in ldap", responseObject = 
LinkDomainToLdapResponse.class, since = "4.11.0",
 
 Review comment:
   Also add default `authorized`, admin etc.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on a change in pull request #2381: CLOUDSTACK-10117 Account ldap binding

2018-01-03 Thread GitBox
rhtyd commented on a change in pull request #2381: CLOUDSTACK-10117 Account 
ldap binding
URL: https://github.com/apache/cloudstack/pull/2381#discussion_r159589519
 
 

 ##
 File path: 
plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LinkAccountToLdapCmd.java
 ##
 @@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cloudstack.api.command;
+
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.user.Account;
+import com.cloud.user.User;
+import com.cloud.user.UserAccount;
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.DomainResponse;
+import org.apache.cloudstack.api.response.LinkAccountToLdapResponse;
+import org.apache.cloudstack.api.response.LinkDomainToLdapResponse;
+import org.apache.cloudstack.ldap.LdapManager;
+import org.apache.cloudstack.ldap.LdapUser;
+import org.apache.cloudstack.ldap.NoLdapUserMatchingQueryException;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.UUID;
+
+@APICommand(name = "linkAccountToLdap", description = "link a cloudstack 
account to a group or OU in ldap", responseObject = 
LinkDomainToLdapResponse.class, since = "4.11.0",
 
 Review comment:
   `linkAccountToLdap` can be replaced by APINAME


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on a change in pull request #2381: CLOUDSTACK-10117 Account ldap binding

2018-01-03 Thread GitBox
rhtyd commented on a change in pull request #2381: CLOUDSTACK-10117 Account 
ldap binding
URL: https://github.com/apache/cloudstack/pull/2381#discussion_r159589472
 
 

 ##
 File path: 
plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LdapCreateAccountCmd.java
 ##
 @@ -136,10 +136,11 @@ public void execute() throws ServerApiException {
 }
 final CallContext callContext = getCurrentContext();
 String finalAccountName = getAccountName();
+// TODO add domain id to create account and create user calls
 
 Review comment:
   Remove TODO?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2146: CLOUDSTACK-4757: Support OVA files with multiple disks for templates

2018-01-03 Thread GitBox
blueorangutan commented on issue #2146: CLOUDSTACK-4757: Support OVA files with 
multiple disks for templates
URL: https://github.com/apache/cloudstack/pull/2146#issuecomment-355212185
 
 
   @rhtyd a Trillian-Jenkins test job (centos7 mgmt + vmware-55u3) has been 
kicked to run smoke tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2146: CLOUDSTACK-4757: Support OVA files with multiple disks for templates

2018-01-03 Thread GitBox
rhtyd commented on issue #2146: CLOUDSTACK-4757: Support OVA files with 
multiple disks for templates
URL: https://github.com/apache/cloudstack/pull/2146#issuecomment-355212051
 
 
   @blueorangutan test centos7 vmware-55u3
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #1730: VMTemplateZone needs some love

2018-01-03 Thread GitBox
rhtyd commented on issue #1730: VMTemplateZone needs some love
URL: https://github.com/apache/cloudstack/pull/1730#issuecomment-355211905
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #1730: VMTemplateZone needs some love

2018-01-03 Thread GitBox
blueorangutan commented on issue #1730: VMTemplateZone needs some love
URL: https://github.com/apache/cloudstack/pull/1730#issuecomment-355211922
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] marcaurele commented on issue #2384: CLOUDSTACK-10210 cleanup testfile

2018-01-03 Thread GitBox
marcaurele commented on issue #2384: CLOUDSTACK-10210 cleanup testfile
URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355211882
 
 
   typo in nickname ^^, cc @DaanHoogland 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #1775: CLOUDSTACK-9606: While IP address is released, tag are not deleted.

2018-01-03 Thread GitBox
blueorangutan commented on issue #1775: CLOUDSTACK-9606: While IP address is 
released, tag are not deleted.
URL: https://github.com/apache/cloudstack/pull/1775#issuecomment-355211808
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2244: CLOUDSTACK-10054:Volume download times out in 3600 seconds

2018-01-03 Thread GitBox
rhtyd commented on issue #2244: CLOUDSTACK-10054:Volume download times out in 
3600 seconds
URL: https://github.com/apache/cloudstack/pull/2244#issuecomment-355211839
 
 
   Ping @mrunalinikankariya can you address outstanding issues?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #1897: CLOUDSTACK-9733: Concurrent volume snapshots of a VM are not allowed and are not limited per host as per the global configuration parameter "concurrent.snapsho

2018-01-03 Thread GitBox
rhtyd commented on issue #1897: CLOUDSTACK-9733: Concurrent volume snapshots of 
a VM are not allowed and are not limited per host as per the global 
configuration parameter "concurrent.snapshots.threshold.perhost".
URL: https://github.com/apache/cloudstack/pull/1897#issuecomment-355211729
 
 
   Ping @sureshanaparti can you fix the conflicts?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2275: CLOUDSTACK-9975: Allow customizing system VM templates for SSVM and Console Proxy

2018-01-03 Thread GitBox
blueorangutan commented on issue #2275: CLOUDSTACK-9975: Allow customizing 
system VM templates for SSVM and Console Proxy
URL: https://github.com/apache/cloudstack/pull/2275#issuecomment-355211694
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #1775: CLOUDSTACK-9606: While IP address is released, tag are not deleted.

2018-01-03 Thread GitBox
rhtyd commented on issue #1775: CLOUDSTACK-9606: While IP address is released, 
tag are not deleted.
URL: https://github.com/apache/cloudstack/pull/1775#issuecomment-355211750
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2260: CLOUDSTACK-10065: Optimize SQL queries in listTemplate API to improve performance

2018-01-03 Thread GitBox
blueorangutan commented on issue #2260: CLOUDSTACK-10065: Optimize SQL queries 
in listTemplate API to improve performance
URL: https://github.com/apache/cloudstack/pull/2260#issuecomment-355211697
 
 
   @rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been 
kicked to run smoke tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2275: CLOUDSTACK-9975: Allow customizing system VM templates for SSVM and Console Proxy

2018-01-03 Thread GitBox
rhtyd commented on issue #2275: CLOUDSTACK-9975: Allow customizing system VM 
templates for SSVM and Console Proxy
URL: https://github.com/apache/cloudstack/pull/2275#issuecomment-355211686
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2260: CLOUDSTACK-10065: Optimize SQL queries in listTemplate API to improve performance

2018-01-03 Thread GitBox
rhtyd commented on issue #2260: CLOUDSTACK-10065: Optimize SQL queries in 
listTemplate API to improve performance
URL: https://github.com/apache/cloudstack/pull/2260#issuecomment-355211653
 
 
   @blueorangutan test
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2146: CLOUDSTACK-4757: Support OVA files with multiple disks for templates

2018-01-03 Thread GitBox
blueorangutan commented on issue #2146: CLOUDSTACK-4757: Support OVA files with 
multiple disks for templates
URL: https://github.com/apache/cloudstack/pull/2146#issuecomment-355211594
 
 
   Packaging result: ?centos6 ?centos7 ?debian. JID-1563


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] marcaurele commented on a change in pull request #2384: CLOUDSTACK-10210 cleanup testfile

2018-01-03 Thread GitBox
marcaurele commented on a change in pull request #2384: CLOUDSTACK-10210 
cleanup testfile
URL: https://github.com/apache/cloudstack/pull/2384#discussion_r159588962
 
 

 ##
 File path: 
services/secondary-storage/server/test/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResourceTest.java
 ##
 @@ -49,16 +51,22 @@ public void setUp() {
 resource = new NfsSecondaryStorageResource();
 }
 
+String filename = "testfile";
+@After
+public void cleanup() {
+File remnance = new File(filename);
+remnance.deleteOnExit();
 
 Review comment:
   `exists()` check?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2102: CLOUDSTACK-9889 Dedication of guest vlan range to a domain

2018-01-03 Thread GitBox
rhtyd commented on issue #2102: CLOUDSTACK-9889 Dedication of guest vlan range 
to a domain
URL: https://github.com/apache/cloudstack/pull/2102#issuecomment-355211613
 
 
   Ping @yvsubhash can you fix the conflicts?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2088: CLOUDSTACK-9892: Primary storage resource check is broken when using ?

2018-01-03 Thread GitBox
blueorangutan commented on issue #2088: CLOUDSTACK-9892: Primary storage 
resource check is broken when using ?
URL: https://github.com/apache/cloudstack/pull/2088#issuecomment-355211366
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2088: CLOUDSTACK-9892: Primary storage resource check is broken when using ?

2018-01-03 Thread GitBox
rhtyd commented on issue #2088: CLOUDSTACK-9892: Primary storage resource check 
is broken when using ?
URL: https://github.com/apache/cloudstack/pull/2088#issuecomment-355211273
 
 
   Sure @yvsubhash 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] yvsubhash commented on issue #2088: CLOUDSTACK-9892: Primary storage resource check is broken when using ?

2018-01-03 Thread GitBox
yvsubhash commented on issue #2088: CLOUDSTACK-9892: Primary storage resource 
check is broken when using ?
URL: https://github.com/apache/cloudstack/pull/2088#issuecomment-355210769
 
 
   @rhtyd  Most of the failures are related to test cleanup issues. Can you 
please re run the tests as this pr has not been rebased for a long time


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2365: CLOUDSTACK-10197: Rename xentools iso for XenServer 7.0+

2018-01-03 Thread GitBox
blueorangutan commented on issue #2365: CLOUDSTACK-10197: Rename xentools iso 
for XenServer 7.0+
URL: https://github.com/apache/cloudstack/pull/2365#issuecomment-355207231
 
 
   @rhtyd a Trillian-Jenkins test job (centos7 mgmt + xenserver-65sp1) has been 
kicked to run smoke tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2365: CLOUDSTACK-10197: Rename xentools iso for XenServer 7.0+

2018-01-03 Thread GitBox
rhtyd commented on issue #2365: CLOUDSTACK-10197: Rename xentools iso for 
XenServer 7.0+
URL: https://github.com/apache/cloudstack/pull/2365#issuecomment-355207160
 
 
   @blueorangutan test centos7 xenserver-65sp1


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2260: CLOUDSTACK-10065: Optimize SQL queries in listTemplate API to improve performance

2018-01-03 Thread GitBox
blueorangutan commented on issue #2260: CLOUDSTACK-10065: Optimize SQL queries 
in listTemplate API to improve performance
URL: https://github.com/apache/cloudstack/pull/2260#issuecomment-355207147
 
 
   Packaging result: ?centos6 ?centos7 ?debian. JID-1562


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2295: CLOUDSTACK-10109: Enable dedication of public IPs to SSVM and CPVM

2018-01-03 Thread GitBox
blueorangutan commented on issue #2295: CLOUDSTACK-10109: Enable dedication of 
public IPs to SSVM and CPVM
URL: https://github.com/apache/cloudstack/pull/2295#issuecomment-355207060
 
 
   Packaging result: ?centos6 ?centos7 ?debian. JID-1560


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2365: CLOUDSTACK-10197: Rename xentools iso for XenServer 7.0+

2018-01-03 Thread GitBox
blueorangutan commented on issue #2365: CLOUDSTACK-10197: Rename xentools iso 
for XenServer 7.0+
URL: https://github.com/apache/cloudstack/pull/2365#issuecomment-355207062
 
 
   Packaging result: ?centos6 ?centos7 ?debian. JID-1561


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2384: CLOUDSTACK-10210 cleanup testfile

2018-01-03 Thread GitBox
rhtyd commented on issue #2384: CLOUDSTACK-10210 cleanup testfile
URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355205963
 
 
   @rafaelweingartner do we have your +1/lgtm from ML applicable here?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2333: Add Java Default Certificat Authorities into the keystore if using a custom cert SSL

2018-01-03 Thread GitBox
rhtyd commented on issue #2333: Add Java Default Certificat Authorities into 
the keystore if using a custom cert SSL
URL: https://github.com/apache/cloudstack/pull/2333#issuecomment-355205730
 
 
   @svenvogel can you rebase against latest master and see if you can reproduce 
against master which has moved to openjdk8 and debian9 based systemvmtemplate.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #1407: 4.8.0 fix i18n es

2018-01-03 Thread GitBox
rhtyd commented on issue #1407: 4.8.0 fix i18n es
URL: https://github.com/apache/cloudstack/pull/1407#issuecomment-355205349
 
 
   Thanks @ntavares for your PR. The latest master has moved to json/js based 
translation and I checked to find several fixes/changes already in master. On 
this note, I would thank you again and close this. You may re-submit this for 
current master changing the js i18n files as messages.properties files don't 
exist anymore.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd closed pull request #1407: 4.8.0 fix i18n es

2018-01-03 Thread GitBox
rhtyd closed pull request #1407: 4.8.0 fix i18n es
URL: https://github.com/apache/cloudstack/pull/1407
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/client/WEB-INF/classes/resources/messages_es.properties 
b/client/WEB-INF/classes/resources/messages_es.properties
index 93acce6f650..17112b72adb 100644
--- a/client/WEB-INF/classes/resources/messages_es.properties
+++ b/client/WEB-INF/classes/resources/messages_es.properties
@@ -18,11 +18,11 @@
 changed.item.properties=Propiedades del elemento cambiados
 error.installWizard.message=Algo salio mal, debes ir para atr\u00e1s y 
corregir los errores.
 error.login=Su nombre de usuario / contrase\u00f1a no coinciden con nuestros 
registros.
-error.mgmt.server.inaccessible=El Servidor de Gesti\u00c3\u00b3n es 
inaccesible. Por favor, int\u00c3\u00a9ntelo de nuevo m\u00c3\u00a1s tarde.
+error.mgmt.server.inaccessible=El Servidor de Gesti\u00f3n es inaccesible. Por 
favor, int\u00e9ntelo de nuevo m\u00e1s tarde.
 error.password.not.match=Los campos de contrase\u00f1a no coinciden
-error.session.expired=Su sesi\u00c3\u00b3n ha caducado.
+error.session.expired=Su sesi\u00f3n ha caducado.
 error.unresolved.internet.name=El nombre de Internet no se puede resolver.
-force.delete.domain.warning=Advertencia\: Si elige esta opci\u00c3\u00b3n, la 
supresi\u00c3\u00b3n de todos los dominios secundarios y todas las cuentas 
asociadas y sus recursos.
+force.delete.domain.warning=Advertencia\: Si elige esta opci\u00f3n, la 
supresi\u00f3n de todos los dominios secundarios y todas las cuentas asociadas 
y sus recursos.
 force.delete=Forzar el borrado
 force.remove=Forzar el retiro
 force.remove.host.warning=Advertencia\: Si elige esta opci\u00f3n, CloudStack 
para detener la fuerza todas las m\u00e1quinas virtuales en ejecuci\u00f3n 
antes de retirar este host del cl\u00faster.
@@ -40,7 +40,7 @@ label.account=Cuenta
 label.account.id=ID de la cuenta
 label.account.name=Nombre de cuenta
 label.accounts=Cuentas
-label.account.specific=espec\u00c3\u00adficas de la cuenta
+label.account.specific=espec\u00edficas de la cuenta
 label.acquire.new.ip=Adquirir nueva IP
 label.action.attach.disk=Conecte el disco
 label.action.attach.disk.processing=Conectando el disco
@@ -56,9 +56,9 @@ label.action.copy.template=Copiear la plantilla
 label.action.create.template=Crear plantilla
 label.action.create.template.from.vm=Crear plantilla de VM
 label.action.create.template.from.volume=Crear plantilla de volumen
-label.action.create.template.processing=Creaci\u00c3\u00b3n de plantillas 
+label.action.create.template.processing=Creaci\u00f3n de plantillas 
 label.action.create.vm=Crear VM
-label.action.create.vm.processing=Creaci\u00c3\u00b3n de m\u00c3\u00a1quina 
virtual 
+label.action.create.vm.processing=Creaci\u00f3n de m\u00e1quina virtual 
 label.action.create.volume=Crear volumen
 label.action.create.volume.processing=Crear volumen 
 label.action.delete.account=Eliminar cuenta
@@ -68,32 +68,32 @@ label.action.delete.cluster.processing=Borrar Grupo 
 label.action.delete.disk.offering=Borrar disco Ofrenda
 label.action.delete.disk.offering.processing=Borrar disco ofrece 
 label.action.delete.domain=Eliminar de dominio
-label.action.delete.domain.processing=Eliminaci\u00c3\u00b3n de dominio 
+label.action.delete.domain.processing=Eliminaci\u00f3n de dominio 
 label.action.delete.firewall=Eliminar servidor de seguridad
-label.action.delete.firewall.processing=Eliminaci\u00c3\u00b3n de firewall 
+label.action.delete.firewall.processing=Eliminaci\u00f3n de firewall 
 label.action.delete.ingress.rule=Borrar ingreso Regla
-label.action.delete.ingress.rule.processing=Eliminaci\u00c3\u00b3n de ingreso 
regla 
+label.action.delete.ingress.rule.processing=Eliminaci\u00f3n de ingreso regla 

 label.action.delete.IP.range=Eliminar Rango de IP
 label.action.delete.IP.range.processing=Eliminar Rango de IP 
 label.action.delete.ISO=Eliminar ISO
-label.action.delete.ISO.processing=Eliminaci\u00c3\u00b3n de la norma ISO 
+label.action.delete.ISO.processing=Eliminaci\u00f3n de la norma ISO 
 label.action.delete.load.balancer=Eliminar equilibrador de carga
-label.action.delete.load.balancer.processing=Eliminaci\u00c3\u00b3n del 
equilibrador de carga 
+label.action.delete.load.balancer.processing=Eliminaci\u00f3n del equilibrador 
de carga 
 label.action.delete.network=Eliminar Red
-label.action.delete.network.processing=Eliminaci\u00c3\u00b3n de red 
+label.action.delete.network.processing=Eliminaci\u00f3n de red 
 label.action.delete.nexusVswitch=Eliminar Nexus 1000v
 label.action.delete.pod=Eliminar Pod
 label.action.delete.pod.processing=Eliminar Pod 
 

[GitHub] rhtyd closed pull request #2203: [CLOUDSTACK-10029] All private, public, and guest interfaceses are marked as untagged ca?

2018-01-03 Thread GitBox
rhtyd closed pull request #2203: [CLOUDSTACK-10029] All private, public, and 
guest interfaceses are marked as untagged ca?
URL: https://github.com/apache/cloudstack/pull/2203
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 2440e624ffa..c2a759b1e88 100644
--- 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -1695,8 +1695,7 @@ public ExecutionResult prepareNetworkElementCommand(final 
IpAssocCommand cmd) {
 if (nic.getBrName().equalsIgnoreCase(_linkLocalBridgeName)) {
 broadcastUriAllocatedToVM.put("LinkLocal", nicPos);
 } else {
-if (nic.getBrName().equalsIgnoreCase(_publicBridgeName) || 
nic.getBrName().equalsIgnoreCase(_privBridgeName) ||
-
nic.getBrName().equalsIgnoreCase(_guestBridgeName)) {
+if (nic.getBrName() == null) {
 
broadcastUriAllocatedToVM.put(BroadcastDomainType.Vlan.toUri(Vlan.UNTAGGED).toString(),
 nicPos);
 } else {
 final String broadcastUri = 
getBroadcastUriFromBridge(nic.getBrName());
@@ -1749,8 +1748,7 @@ protected ExecutionResult 
cleanupNetworkElementCommand(final IpAssocCommand cmd)
 if (nic.getBrName().equalsIgnoreCase(_linkLocalBridgeName)) {
 broadcastUriAllocatedToVM.put("LinkLocal", nicPos);
 } else {
-if (nic.getBrName().equalsIgnoreCase(_publicBridgeName) || 
nic.getBrName().equalsIgnoreCase(_privBridgeName) ||
-
nic.getBrName().equalsIgnoreCase(_guestBridgeName)) {
+if (nic.getBrName() == null) {
 
broadcastUriAllocatedToVM.put(BroadcastDomainType.Vlan.toUri(Vlan.UNTAGGED).toString(),
 nicPos);
 } else {
 final String broadcastUri = 
getBroadcastUriFromBridge(nic.getBrName());


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2203: [CLOUDSTACK-10029] All private, public, and guest interfaceses are marked as untagged ca?

2018-01-03 Thread GitBox
rhtyd commented on issue #2203: [CLOUDSTACK-10029] All private, public, and 
guest interfaceses are marked as untagged ca?
URL: https://github.com/apache/cloudstack/pull/2203#issuecomment-355205088
 
 
   Given https://github.com/apache/cloudstack/pull/2304 is merged, nics are now 
read from hashmap referenced using the mac address. I'll close this PR given 
this, please re-open/engage if you disagree, thanks for your PR.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2104: CLOUDSTACK-9908 : Primary Storage allocated capacity goes very high after VM snapshot

2018-01-03 Thread GitBox
blueorangutan commented on issue #2104: CLOUDSTACK-9908 : Primary Storage 
allocated capacity goes very high after VM snapshot
URL: https://github.com/apache/cloudstack/pull/2104#issuecomment-355205002
 
 
   @rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been 
kicked to run smoke tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2073: CLOUDSTACK-9896: API: listDedicatedXXX should respect pagination

2018-01-03 Thread GitBox
blueorangutan commented on issue #2073: CLOUDSTACK-9896: API: listDedicatedXXX 
should respect pagination
URL: https://github.com/apache/cloudstack/pull/2073#issuecomment-355204906
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #1906: CLOUDSTACK-9743 - ODL plugin responds to deleteHost causing other plugin in the chain to be ignored

2018-01-03 Thread GitBox
blueorangutan commented on issue #1906: CLOUDSTACK-9743 - ODL plugin responds 
to deleteHost causing other plugin in the chain to be ignored 
URL: https://github.com/apache/cloudstack/pull/1906#issuecomment-355204911
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2104: CLOUDSTACK-9908 : Primary Storage allocated capacity goes very high after VM snapshot

2018-01-03 Thread GitBox
rhtyd commented on issue #2104: CLOUDSTACK-9908 : Primary Storage allocated 
capacity goes very high after VM snapshot
URL: https://github.com/apache/cloudstack/pull/2104#issuecomment-355204913
 
 
   @blueorangutan test


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #1906: CLOUDSTACK-9743 - ODL plugin responds to deleteHost causing other plugin in the chain to be ignored

2018-01-03 Thread GitBox
rhtyd commented on issue #1906: CLOUDSTACK-9743 - ODL plugin responds to 
deleteHost causing other plugin in the chain to be ignored 
URL: https://github.com/apache/cloudstack/pull/1906#issuecomment-355204853
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2073: CLOUDSTACK-9896: API: listDedicatedXXX should respect pagination

2018-01-03 Thread GitBox
rhtyd commented on issue #2073: CLOUDSTACK-9896: API: listDedicatedXXX should 
respect pagination
URL: https://github.com/apache/cloudstack/pull/2073#issuecomment-355204884
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2274: CLOUDSTACK-10096 Can't reset integration.api.port and usage.sanity.ch?

2018-01-03 Thread GitBox
blueorangutan commented on issue #2274: CLOUDSTACK-10096 Can't reset 
integration.api.port and usage.sanity.ch?
URL: https://github.com/apache/cloudstack/pull/2274#issuecomment-355204709
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2271: CLOUDSTACK-10087 Template registration errors out when template URL i?

2018-01-03 Thread GitBox
rhtyd commented on issue #2271: CLOUDSTACK-10087 Template registration errors 
out when template URL i?
URL: https://github.com/apache/cloudstack/pull/2271#issuecomment-355204721
 
 
   Can you update/fix this for master @SudharmaJain 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2274: CLOUDSTACK-10096 Can't reset integration.api.port and usage.sanity.ch?

2018-01-03 Thread GitBox
rhtyd commented on issue #2274: CLOUDSTACK-10096 Can't reset 
integration.api.port and usage.sanity.ch?
URL: https://github.com/apache/cloudstack/pull/2274#issuecomment-355204644
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2185: CLOUDSTACK-9976: Redirect saml2 failed login message to a configurable URL

2018-01-03 Thread GitBox
rhtyd commented on issue #2185: CLOUDSTACK-9976: Redirect saml2 failed login 
message to a configurable URL
URL: https://github.com/apache/cloudstack/pull/2185#issuecomment-355204137
 
 
   Can you verify/fix the failures @GabrielBrascher 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2091: CLOUDSTACK-8609: [VMware] VM is not accessible after migration across clusters

2018-01-03 Thread GitBox
rhtyd commented on issue #2091: CLOUDSTACK-8609: [VMware] VM is not accessible 
after migration across clusters
URL: https://github.com/apache/cloudstack/pull/2091#issuecomment-355204065
 
 
   Ping can you fix the conflicts @sureshanaparti 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2292: CLOUDSTACK-10108:ConfigKey based approach for reading 'ping' configua?

2018-01-03 Thread GitBox
rhtyd commented on issue #2292: CLOUDSTACK-10108:ConfigKey based approach for 
reading 'ping' configua?
URL: https://github.com/apache/cloudstack/pull/2292#issuecomment-355203938
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2292: CLOUDSTACK-10108:ConfigKey based approach for reading 'ping' configua?

2018-01-03 Thread GitBox
blueorangutan commented on issue #2292: CLOUDSTACK-10108:ConfigKey based 
approach for reading 'ping' configua?
URL: https://github.com/apache/cloudstack/pull/2292#issuecomment-355203962
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2368: CLOUDSTACK-10126: Separate Subnet for SSVM and CPVM

2018-01-03 Thread GitBox
blueorangutan commented on issue #2368: CLOUDSTACK-10126: Separate Subnet for 
SSVM and CPVM
URL: https://github.com/apache/cloudstack/pull/2368#issuecomment-355203863
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2079: CLOUDSTACK-9906 Create snapshot after volume resize for the volume with existing snapshot(s)

2018-01-03 Thread GitBox
blueorangutan commented on issue #2079: CLOUDSTACK-9906 Create snapshot after 
volume resize for the volume with existing snapshot(s)
URL: https://github.com/apache/cloudstack/pull/2079#issuecomment-355203857
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2368: CLOUDSTACK-10126: Separate Subnet for SSVM and CPVM

2018-01-03 Thread GitBox
rhtyd commented on issue #2368: CLOUDSTACK-10126: Separate Subnet for SSVM and 
CPVM
URL: https://github.com/apache/cloudstack/pull/2368#issuecomment-355203784
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2097: [4.11] CLOUDSTACK-9813: Extending Config Drive support

2018-01-03 Thread GitBox
blueorangutan commented on issue #2097: [4.11] CLOUDSTACK-9813: Extending 
Config Drive support
URL: https://github.com/apache/cloudstack/pull/2097#issuecomment-355203867
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2079: CLOUDSTACK-9906 Create snapshot after volume resize for the volume with existing snapshot(s)

2018-01-03 Thread GitBox
rhtyd commented on issue #2079: CLOUDSTACK-9906 Create snapshot after volume 
resize for the volume with existing snapshot(s)
URL: https://github.com/apache/cloudstack/pull/2079#issuecomment-355203812
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2378: CLOUDSTACK-10205 make LinkDomainToLdap return UUID instead of internal id

2018-01-03 Thread GitBox
rhtyd commented on issue #2378: CLOUDSTACK-10205 make LinkDomainToLdap return 
UUID instead of internal id
URL: https://github.com/apache/cloudstack/pull/2378#issuecomment-355203722
 
 
   @nvazquez @borisstoyanov can you review this?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2097: [4.11] CLOUDSTACK-9813: Extending Config Drive support

2018-01-03 Thread GitBox
rhtyd commented on issue #2097: [4.11] CLOUDSTACK-9813: Extending Config Drive 
support
URL: https://github.com/apache/cloudstack/pull/2097#issuecomment-355203745
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2146: CLOUDSTACK-4757: Support OVA files with multiple disks for templates

2018-01-03 Thread GitBox
rhtyd commented on issue #2146: CLOUDSTACK-4757: Support OVA files with 
multiple disks for templates
URL: https://github.com/apache/cloudstack/pull/2146#issuecomment-355203546
 
 
   test_01_create_volume failed on both vmware 55u3 and 65, we'll need another 
re-run. /cc @nvazquez @borisstoyanov 
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2146: CLOUDSTACK-4757: Support OVA files with multiple disks for templates

2018-01-03 Thread GitBox
rhtyd commented on issue #2146: CLOUDSTACK-4757: Support OVA files with 
multiple disks for templates
URL: https://github.com/apache/cloudstack/pull/2146#issuecomment-355203424
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2146: CLOUDSTACK-4757: Support OVA files with multiple disks for templates

2018-01-03 Thread GitBox
blueorangutan commented on issue #2146: CLOUDSTACK-4757: Support OVA files with 
multiple disks for templates
URL: https://github.com/apache/cloudstack/pull/2146#issuecomment-355203515
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2377: CLOUDSTACK-10207: updateVpnCustomerGateway: fix defaulting for option?

2018-01-03 Thread GitBox
rhtyd commented on issue #2377: CLOUDSTACK-10207: updateVpnCustomerGateway: fix 
defaulting for option?
URL: https://github.com/apache/cloudstack/pull/2377#issuecomment-355203300
 
 
   Additional review requested


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2379: CLOUDSTACK-10146: Bypass Secondary Storage for KVM templates

2018-01-03 Thread GitBox
rhtyd commented on issue #2379: CLOUDSTACK-10146: Bypass Secondary Storage for 
KVM templates
URL: https://github.com/apache/cloudstack/pull/2379#issuecomment-355203101
 
 
   Tests LGTM. I'll wait for lgtm from @borisstoyanov @DaanHoogland 
@rafaelweingartner 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2260: CLOUDSTACK-10065: Optimize SQL queries in listTemplate API to improve performance

2018-01-03 Thread GitBox
blueorangutan commented on issue #2260: CLOUDSTACK-10065: Optimize SQL queries 
in listTemplate API to improve performance
URL: https://github.com/apache/cloudstack/pull/2260#issuecomment-355203057
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2260: CLOUDSTACK-10065: Optimize SQL queries in listTemplate API to improve performance

2018-01-03 Thread GitBox
rhtyd commented on issue #2260: CLOUDSTACK-10065: Optimize SQL queries in 
listTemplate API to improve performance
URL: https://github.com/apache/cloudstack/pull/2260#issuecomment-355202998
 
 
   Several failures (env related) seen, I'll rekick tests.
   @blueorangutan package
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2365: CLOUDSTACK-10197: Rename xentools iso for XenServer 7.0+

2018-01-03 Thread GitBox
rhtyd commented on issue #2365: CLOUDSTACK-10197: Rename xentools iso for 
XenServer 7.0+
URL: https://github.com/apache/cloudstack/pull/2365#issuecomment-355202924
 
 
   @blueorangutan package
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #2365: CLOUDSTACK-10197: Rename xentools iso for XenServer 7.0+

2018-01-03 Thread GitBox
blueorangutan commented on issue #2365: CLOUDSTACK-10197: Rename xentools iso 
for XenServer 7.0+
URL: https://github.com/apache/cloudstack/pull/2365#issuecomment-355202932
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[cloudstack] branch master updated: CLOUDSTACK-9599: isdynamicallyscalable field missing in updateTemplate Response (#2383)

2018-01-03 Thread rohit
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
 new d7e334b  CLOUDSTACK-9599: isdynamicallyscalable field missing in 
updateTemplate Response (#2383)
d7e334b is described below

commit d7e334b1b4aa39c35bc6029c1e5b0f050c097a78
Author: ernjvr 
AuthorDate: Thu Jan 4 07:33:05 2018 +0200

CLOUDSTACK-9599: isdynamicallyscalable field missing in updateTemplate 
Response (#2383)

Using cloudmonkey, when invoking the update template api call, it does not 
display the isdynamicallyscalable field as part of its template response.
fix done:
org.apache.cloudstack.api.response.TemplateResponse isdynamicallyscalable 
field is now populated in the 
server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java.newUpdateResponse 
method.
Unit test:
the Unit test 
server/test/com/cloud/api/query/dao/TemplateJoinDaoImplTest.java 
testNewUpdateResponse() verifies that the TemplateResponse is populated 
correctly.
Marvin test:
the Marvin nosetest integration/smoke/test_templates.py 
test_02_edit_template(self) confirms that the 
template_response.isdynamicallyscalable field gets populated with the correct 
user data.
Test scenario:
Using cloudmonkey, when invoking the 'update template' API call, it should 
now display the isdynamicallyscalable field as part of its template response.
---
 .../cloud/api/query/dao/TemplateJoinDaoImpl.java   |  7 ++-
 .../api/query/dao/TemplateJoinDaoImplTest.java | 69 ++
 test/integration/smoke/test_templates.py   |  6 ++
 3 files changed, 79 insertions(+), 3 deletions(-)

diff --git a/server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java 
b/server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java
index 67105d0..bc9616a 100644
--- a/server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java
@@ -186,7 +186,7 @@ public class TemplateJoinDaoImpl extends 
GenericDaoBaseWithTagInformation details = new HashMap();
+Map details = new HashMap<>();
 details.put(template.getDetailName(), template.getDetailValue());
 templateResponse.setDetails(details);
 }
@@ -216,6 +216,7 @@ public class TemplateJoinDaoImpl extends 
GenericDaoBaseWithTagInformation details = new HashMap();
+Map details = new HashMap<>();
 details.put(result.getDetailName(), result.getDetailValue());
 response.setDetails(details);
 }
@@ -251,7 +252,7 @@ public class TemplateJoinDaoImpl extends 
GenericDaoBaseWithTagInformation details = templateResponse.getDetails();
 if (details == null) {
-details = new HashMap();
+details = new HashMap<>();
 }
 details.put(template.getDetailName(), template.getDetailValue());
 templateResponse.setDetails(details);
diff --git a/server/test/com/cloud/api/query/dao/TemplateJoinDaoImplTest.java 
b/server/test/com/cloud/api/query/dao/TemplateJoinDaoImplTest.java
index d194e32..a6b33ed 100755
--- a/server/test/com/cloud/api/query/dao/TemplateJoinDaoImplTest.java
+++ b/server/test/com/cloud/api/query/dao/TemplateJoinDaoImplTest.java
@@ -16,7 +16,11 @@
 // under the License.
 package com.cloud.api.query.dao;
 
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.storage.Storage;
+import com.cloud.user.Account;
 import org.apache.cloudstack.api.response.TemplateResponse;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -26,6 +30,10 @@ import org.powermock.modules.junit4.PowerMockRunner;
 
 import com.cloud.api.ApiDBUtils;
 import com.cloud.api.query.vo.TemplateJoinVO;
+import org.springframework.test.util.ReflectionTestUtils;
+
+import java.util.Date;
+import java.util.Map;
 
 @RunWith(PowerMockRunner.class)
 @PrepareForTest(ApiDBUtils.class)
@@ -37,9 +45,29 @@ public class TemplateJoinDaoImplTest extends 
GenericDaoBaseWithTagInformationBas
 private TemplateJoinVO template = new TemplateJoinVO();
 private TemplateResponse templateResponse = new TemplateResponse();
 
+//TemplateJoinVO fields
+private String uuid = "1234567890abc";
+private String name = "xs-tools.iso";
+private String displayText = "xen-pv-drv-iso";
+private boolean publicTemplate = true;
+private Date created = new Date();
+private Storage.ImageFormat format = Storage.ImageFormat.ISO;
+private String guestOSUuid = "987654321cba";
+private String guestOSName = "CentOS 4.5 (32-bit)";
+private boolean bootable = true;
+private Hypervisor.HypervisorType hypervisorType = 
Hypervisor.HypervisorType.XenServer;
+private 

[GitHub] blueorangutan commented on issue #2295: CLOUDSTACK-10109: Enable dedication of public IPs to SSVM and CPVM

2018-01-03 Thread GitBox
blueorangutan commented on issue #2295: CLOUDSTACK-10109: Enable dedication of 
public IPs to SSVM and CPVM
URL: https://github.com/apache/cloudstack/pull/2295#issuecomment-355202731
 
 
   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted 
as I make progress.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd closed pull request #2383: "isdynamicallyscalable" Field to UpdateTemplate Response

2018-01-03 Thread GitBox
rhtyd closed pull request #2383: "isdynamicallyscalable" Field to 
UpdateTemplate Response
URL: https://github.com/apache/cloudstack/pull/2383
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java 
b/server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java
index 67105d0d88e..bc9616a1bb5 100644
--- a/server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java
@@ -186,7 +186,7 @@ public TemplateResponse newTemplateResponse(ResponseView 
view, TemplateJoinVO te
 
 // set details map
 if (template.getDetailName() != null) {
-Map details = new HashMap();
+Map details = new HashMap<>();
 details.put(template.getDetailName(), template.getDetailValue());
 templateResponse.setDetails(details);
 }
@@ -216,6 +216,7 @@ public TemplateResponse newUpdateResponse(TemplateJoinVO 
result) {
 response.setOsTypeName(result.getGuestOSName());
 response.setBootable(result.isBootable());
 response.setHypervisor(result.getHypervisorType().toString());
+response.setDynamicallyScalable(result.isDynamicallyScalable());
 
 // populate owner.
 ApiResponseHelper.populateOwner(response, result);
@@ -226,7 +227,7 @@ public TemplateResponse newUpdateResponse(TemplateJoinVO 
result) {
 
 // set details map
 if (result.getDetailName() != null) {
-Map details = new HashMap();
+Map details = new HashMap<>();
 details.put(result.getDetailName(), result.getDetailValue());
 response.setDetails(details);
 }
@@ -251,7 +252,7 @@ public TemplateResponse setTemplateResponse(ResponseView 
view, TemplateResponse
 if (template.getDetailName() != null) {
 Map details = templateResponse.getDetails();
 if (details == null) {
-details = new HashMap();
+details = new HashMap<>();
 }
 details.put(template.getDetailName(), template.getDetailValue());
 templateResponse.setDetails(details);
diff --git a/server/test/com/cloud/api/query/dao/TemplateJoinDaoImplTest.java 
b/server/test/com/cloud/api/query/dao/TemplateJoinDaoImplTest.java
index d194e32c0f9..a6b33edd1aa 100755
--- a/server/test/com/cloud/api/query/dao/TemplateJoinDaoImplTest.java
+++ b/server/test/com/cloud/api/query/dao/TemplateJoinDaoImplTest.java
@@ -16,7 +16,11 @@
 // under the License.
 package com.cloud.api.query.dao;
 
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.storage.Storage;
+import com.cloud.user.Account;
 import org.apache.cloudstack.api.response.TemplateResponse;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -26,6 +30,10 @@
 
 import com.cloud.api.ApiDBUtils;
 import com.cloud.api.query.vo.TemplateJoinVO;
+import org.springframework.test.util.ReflectionTestUtils;
+
+import java.util.Date;
+import java.util.Map;
 
 @RunWith(PowerMockRunner.class)
 @PrepareForTest(ApiDBUtils.class)
@@ -37,9 +45,29 @@
 private TemplateJoinVO template = new TemplateJoinVO();
 private TemplateResponse templateResponse = new TemplateResponse();
 
+//TemplateJoinVO fields
+private String uuid = "1234567890abc";
+private String name = "xs-tools.iso";
+private String displayText = "xen-pv-drv-iso";
+private boolean publicTemplate = true;
+private Date created = new Date();
+private Storage.ImageFormat format = Storage.ImageFormat.ISO;
+private String guestOSUuid = "987654321cba";
+private String guestOSName = "CentOS 4.5 (32-bit)";
+private boolean bootable = true;
+private Hypervisor.HypervisorType hypervisorType = 
Hypervisor.HypervisorType.XenServer;
+private boolean dynamicallyScalable = true;
+private short accountType = Account.ACCOUNT_TYPE_NORMAL;
+private String accountName = "system";
+private String domainUuid = "abcde1234567890";
+private String domainName = "ROOT";
+private String detailName = "detail_name1";
+private String detailValue = "detail_val";
+
 @Before
 public void setup() {
 prepareSetup();
+populateTemplateJoinVO();
 }
 
 @Test
@@ -47,4 +75,45 @@ public void testUpdateTemplateTagInfo(){
 testUpdateTagInformation(_templateJoinDaoImpl, template, 
templateResponse);
 }
 
+@Test
+public void testNewUpdateResponse() {
+final TemplateResponse response = 
_templateJoinDaoImpl.newUpdateResponse(template);
+ 

[GitHub] rhtyd commented on issue #2295: CLOUDSTACK-10109: Enable dedication of public IPs to SSVM and CPVM

2018-01-03 Thread GitBox
rhtyd commented on issue #2295: CLOUDSTACK-10109: Enable dedication of public 
IPs to SSVM and CPVM
URL: https://github.com/apache/cloudstack/pull/2295#issuecomment-355202707
 
 
   @blueorangutan package


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2383: "isdynamicallyscalable" Field to UpdateTemplate Response

2018-01-03 Thread GitBox
rhtyd commented on issue #2383: "isdynamicallyscalable" Field to UpdateTemplate 
Response
URL: https://github.com/apache/cloudstack/pull/2383#issuecomment-355202625
 
 
   Tests LGTM, @DaanHoogland the issues were intermittent/env related. I'll 
merge this based on code review and test results.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2384: CLOUDSTACK-10210 cleanup testfile

2018-01-03 Thread GitBox
rhtyd commented on issue #2384: CLOUDSTACK-10210 cleanup testfile
URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355202554
 
 
   Additional review requested, test LGTM.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #1740: CLOUDSTACK-9572 Snapshot on primary storage not cleaned up after Stor?

2018-01-03 Thread GitBox
rhtyd commented on issue #1740: CLOUDSTACK-9572 Snapshot on primary storage not 
cleaned up after Stor?
URL: https://github.com/apache/cloudstack/pull/1740#issuecomment-355202506
 
 
   @blueorangutan test centos7 xenserver-65sp1
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] blueorangutan commented on issue #1740: CLOUDSTACK-9572 Snapshot on primary storage not cleaned up after Stor?

2018-01-03 Thread GitBox
blueorangutan commented on issue #1740: CLOUDSTACK-9572 Snapshot on primary 
storage not cleaned up after Stor?
URL: https://github.com/apache/cloudstack/pull/1740#issuecomment-355202539
 
 
   @rhtyd a Trillian-Jenkins test job (centos7 mgmt + xenserver-65sp1) has been 
kicked to run smoke tests


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[cloudstack] branch master updated: CLOUDSTACK-9607: Preventing template deletion when template is in use (#1773)

2018-01-03 Thread rohit
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
 new 25b63f5  CLOUDSTACK-9607: Preventing template deletion when template 
is in use (#1773)
25b63f5 is described below

commit 25b63f5e737aba00067e39ee0003f4b52713d6d6
Author: Mowgli 
AuthorDate: Thu Jan 4 10:59:39 2018 +0530

CLOUDSTACK-9607: Preventing template deletion when template is in use 
(#1773)

Consider this scenario:
1. User launches a VM from Template and keep it running
2. Admin logins and deleted that template [CloudPlatform does not check 
existing / running VM etc. while the deletion is done]
3. User resets the VM
4. CloudPlatform fails to star the VM as it cannot find the corresponding 
template.

It throws error as
java.lang.RuntimeException: Job failed due to exception Resource [Host:11] 
is unreachable: Host 11: Unable to start instance due to can't find ready 
template: 209 for data center 1
at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:113)
at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:495)

Client is requesting better handing of this scenario. We need to check 
existing / running VM's when the template is deleted and warn admin about the 
possible issue that may occur.

REPRO STEPS
==
1. Launches a VM from Template and keep it running
2. Now delete that template
3. Reset the VM
4. CloudPlatform fails to star the VM as it cannot find the corresponding 
template.

EXPECTED BEHAVIOR
==
Cloud platform should throw some warning message while the template is 
deleted if that template is being used by existing / running VM's

ACTUAL BEHAVIOR
==
Cloud platform does not throw as waring etc.
---
 .../command/user/template/DeleteTemplateCmd.java   |  6 +++
 .../schema/src/com/cloud/vm/dao/VMInstanceDao.java |  8 
 .../src/com/cloud/vm/dao/VMInstanceDaoImpl.java| 16 +++
 .../com/cloud/template/TemplateManagerImpl.java| 14 ++
 .../cloud/template/TemplateManagerImplTest.java| 55 ++
 ui/scripts/templates.js| 26 ++
 6 files changed, 117 insertions(+), 8 deletions(-)

diff --git 
a/api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java
 
b/api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java
old mode 100644
new mode 100755
index 98d53be..95b3eee
--- 
a/api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java
+++ 
b/api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java
@@ -52,6 +52,9 @@ public class DeleteTemplateCmd extends BaseAsyncCmd {
 @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, 
entityType = ZoneResponse.class, description = "the ID of zone of the template")
 private Long zoneId;
 
+@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, 
required = false, description = "Force delete a template.", since = "4.9+")
+private Boolean forced;
+
 /
 /// Accessors ///
 /
@@ -64,6 +67,9 @@ public class DeleteTemplateCmd extends BaseAsyncCmd {
 return zoneId;
 }
 
+public boolean isForced() {
+return (forced != null) ? forced : true;
+}
 /
 /// API Implementation///
 /
diff --git a/engine/schema/src/com/cloud/vm/dao/VMInstanceDao.java 
b/engine/schema/src/com/cloud/vm/dao/VMInstanceDao.java
old mode 100644
new mode 100755
index 3c5024b..69efea4
--- a/engine/schema/src/com/cloud/vm/dao/VMInstanceDao.java
+++ b/engine/schema/src/com/cloud/vm/dao/VMInstanceDao.java
@@ -54,6 +54,14 @@ public interface VMInstanceDao extends 
GenericDao, StateDao<
 List listByPodId(long podId);
 
 /**
+ * Lists non-expunged VMs by  templateId
+ * @param templateId
+ * @return list of VMInstanceVO deployed from the specified template, that 
are not expunged
+ */
+public List listNonExpungedByTemplate(long templateId);
+
+
+/**
  * Lists non-expunged VMs by zone ID and templateId
  * @param zoneId
  * @return list of VMInstanceVO in the specified zone, deployed from the 
specified template, that are not expunged
diff --git a/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java 
b/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
old mode 100644
new mode 100755
index 7065350..6e97d12
--- 

[GitHub] rhtyd closed pull request #1773: CLOUDSTACK-9607: Preventing template deletion when template is in use.

2018-01-03 Thread GitBox
rhtyd closed pull request #1773: CLOUDSTACK-9607: Preventing template deletion 
when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java
 
b/api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java
old mode 100644
new mode 100755
index 98d53be836e..95b3059
--- 
a/api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java
+++ 
b/api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java
@@ -52,6 +52,9 @@
 @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, 
entityType = ZoneResponse.class, description = "the ID of zone of the template")
 private Long zoneId;
 
+@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, 
required = false, description = "Force delete a template.", since = "4.9+")
+private Boolean forced;
+
 /
 /// Accessors ///
 /
@@ -64,6 +67,9 @@ public Long getZoneId() {
 return zoneId;
 }
 
+public boolean isForced() {
+return (forced != null) ? forced : true;
+}
 /
 /// API Implementation///
 /
diff --git a/engine/schema/src/com/cloud/vm/dao/VMInstanceDao.java 
b/engine/schema/src/com/cloud/vm/dao/VMInstanceDao.java
old mode 100644
new mode 100755
index 3c5024b833e..69efea42df9
--- a/engine/schema/src/com/cloud/vm/dao/VMInstanceDao.java
+++ b/engine/schema/src/com/cloud/vm/dao/VMInstanceDao.java
@@ -53,6 +53,14 @@
  */
 List listByPodId(long podId);
 
+/**
+ * Lists non-expunged VMs by  templateId
+ * @param templateId
+ * @return list of VMInstanceVO deployed from the specified template, that 
are not expunged
+ */
+public List listNonExpungedByTemplate(long templateId);
+
+
 /**
  * Lists non-expunged VMs by zone ID and templateId
  * @param zoneId
diff --git a/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java 
b/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
old mode 100644
new mode 100755
index 7065350a57e..6e97d1275a6
--- a/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
+++ b/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
@@ -72,6 +72,7 @@
 protected SearchBuilder IdStatesSearch;
 protected SearchBuilder AllFieldsSearch;
 protected SearchBuilder ZoneTemplateNonExpungedSearch;
+protected SearchBuilder TemplateNonExpungedSearch;
 protected SearchBuilder NameLikeSearch;
 protected SearchBuilder StateChangeSearch;
 protected SearchBuilder TransitionSearch;
@@ -165,6 +166,12 @@ protected void init() {
 ZoneTemplateNonExpungedSearch.and("state", 
ZoneTemplateNonExpungedSearch.entity().getState(), Op.NEQ);
 ZoneTemplateNonExpungedSearch.done();
 
+
+TemplateNonExpungedSearch = createSearchBuilder();
+TemplateNonExpungedSearch.and("template", 
TemplateNonExpungedSearch.entity().getTemplateId(), Op.EQ);
+TemplateNonExpungedSearch.and("state", 
TemplateNonExpungedSearch.entity().getState(), Op.NEQ);
+TemplateNonExpungedSearch.done();
+
 NameLikeSearch = createSearchBuilder();
 NameLikeSearch.and("name", NameLikeSearch.entity().getHostName(), 
Op.LIKE);
 NameLikeSearch.done();
@@ -334,6 +341,15 @@ protected void init() {
 return listBy(sc);
 }
 
+@Override
+public List listNonExpungedByTemplate(long templateId) {
+SearchCriteria sc = TemplateNonExpungedSearch.create();
+
+sc.setParameters("template", templateId);
+sc.setParameters("state", State.Expunging);
+return listBy(sc);
+}
+
 @Override
 public List listNonExpungedByZoneAndTemplate(long zoneId, 
long templateId) {
 SearchCriteria sc = 
ZoneTemplateNonExpungedSearch.create();
diff --git a/server/src/com/cloud/template/TemplateManagerImpl.java 
b/server/src/com/cloud/template/TemplateManagerImpl.java
old mode 100644
new mode 100755
index f6494c3b77e..41f11af68d0
--- a/server/src/com/cloud/template/TemplateManagerImpl.java
+++ b/server/src/com/cloud/template/TemplateManagerImpl.java
@@ -38,6 +38,7 @@
 import com.cloud.utils.DateUtil;
 import com.cloud.utils.Pair;
 import com.cloud.utils.EnumUtils;
+import com.google.common.base.Joiner;
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 
@@ -1235,6 +1236,19 @@ public boolean deleteTemplate(DeleteTemplateCmd cmd) {
   

[GitHub] rhtyd commented on issue #1773: CLOUDSTACK-9607: Preventing template deletion when template is in use.

2018-01-03 Thread GitBox
rhtyd commented on issue #1773: CLOUDSTACK-9607: Preventing template deletion 
when template is in use.
URL: https://github.com/apache/cloudstack/pull/1773#issuecomment-35520
 
 
   Merging this based on code review lgtms and test results.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2046: CLOUDSTACK-7958: Add configuration for limit to CIDRs for Admin API calls

2018-01-03 Thread GitBox
rhtyd commented on issue #2046: CLOUDSTACK-7958: Add configuration for limit to 
CIDRs for Admin API calls
URL: https://github.com/apache/cloudstack/pull/2046#issuecomment-355202001
 
 
   Merging this based on 2 code reviews lgtm and test results. Checked and 
found the one failing smoketest to be env related.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on issue #2046: CLOUDSTACK-7958: Add configuration for limit to CIDRs for Admin API calls

2018-01-03 Thread GitBox
rhtyd commented on issue #2046: CLOUDSTACK-7958: Add configuration for limit to 
CIDRs for Admin API calls
URL: https://github.com/apache/cloudstack/pull/2046#issuecomment-355202001
 
 
   Merging this based on 2 code reviews lgtm and test results.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[cloudstack] branch master updated: CLOUDSTACK-7958: Add configuration for limit to CIDRs for Admin API calls (#2046)

2018-01-03 Thread rohit
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
 new 9988c26  CLOUDSTACK-7958: Add configuration for limit to CIDRs for 
Admin API calls (#2046)
9988c26 is described below

commit 9988c269b259b84c0b8436bad17f88dbc1d706e7
Author: Wido den Hollander 
AuthorDate: Thu Jan 4 06:26:30 2018 +0100

CLOUDSTACK-7958: Add configuration for limit to CIDRs for Admin API calls 
(#2046)

* Cleanup and Improve NetUtils

This class had many unused methods, inconsistent names and redundant code.

This commit cleans up code, renames a few methods and constants.

The global/account setting 'api.allowed.source.cidr.list' is set
to 0.0.0.0/0,::/0 by default preserve the current behavior and thus
allow API calls for accounts from all IPv4 and IPv6 subnets.

Users can set it to a comma-separated list of IPv4/IPv6 subnets to
restrict API calls for Admin accounts to certain parts of their network(s).

This is to improve Security. Should an attacker steal the Access/Secret key
of an account he/she still needs to be in a subnet from where accounts are
allowed to perform API calls.

This is a good security measure for APIs which are connected to the public 
internet.

Signed-off-by: Wido den Hollander 
---
 .../consoleproxy/ConsoleProxyResource.java |   4 +-
 .../apache/cloudstack/api/ApiServerService.java|   2 +-
 .../user/firewall/CreateEgressFirewallRuleCmd.java |   6 +-
 .../user/firewall/CreateFirewallRuleCmd.java   |   4 +-
 .../user/firewall/CreatePortForwardingRuleCmd.java |   2 +-
 .../loadbalancer/AssignToLoadBalancerRuleCmd.java  |   2 +-
 .../command/user/network/CreateNetworkACLCmd.java  |   2 +-
 .../api/command/user/vm/AddIpToVmNicCmd.java   |   2 +-
 .../api/command/user/vm/UpdateVmNicIpCmd.java  |   2 +-
 .../cloudstack/config/ApiServiceConfiguration.java |   7 +-
 .../src/com/cloud/network/HAProxyConfigurator.java |  10 +-
 .../cloudstack/alert/snmp/SnmpTrapAppender.java|   2 +-
 .../cloudstack/syslog/AlertsSyslogAppender.java|   2 +-
 .../LibvirtGetVmIpAddressCommandWrapper.java   |   4 +-
 .../ovm3/resources/helpers/Ovm3Configuration.java  |   2 +-
 .../CitrixGetVmIpAddressCommandWrapper.java|   2 +-
 .../cloud/network/resource/NetscalerResource.java  |   4 +-
 server/src/com/cloud/api/ApiServer.java|  62 +++--
 server/src/com/cloud/api/ApiServlet.java   |  33 ++-
 .../configuration/ConfigurationManagerImpl.java|  58 ++---
 .../consoleproxy/ConsoleProxyManagerImpl.java  |   2 +-
 server/src/com/cloud/network/NetworkModelImpl.java |  10 +-
 .../src/com/cloud/network/NetworkServiceImpl.java  |  18 +-
 .../cloud/network/StorageNetworkManagerImpl.java   |   6 +-
 .../network/firewall/FirewallManagerImpl.java  |   4 +-
 .../router/VirtualNetworkApplianceManagerImpl.java |   4 +-
 .../network/security/SecurityGroupManagerImpl.java |   2 +-
 .../cloud/network/vpc/NetworkACLServiceImpl.java   |   2 +-
 .../src/com/cloud/network/vpc/VpcManagerImpl.java  |   4 +-
 .../network/vpn/RemoteAccessVpnManagerImpl.java|   4 +-
 .../cloud/network/vpn/Site2SiteVpnManagerImpl.java |   6 +-
 server/src/com/cloud/test/PodZoneConfig.java   |   4 +-
 server/src/com/cloud/user/AccountManagerImpl.java  |  28 ++-
 server/src/com/cloud/vm/UserVmManagerImpl.java |   4 +-
 server/test/com/cloud/api/ApiServletTest.java  |  24 +-
 .../SecondaryStorageManagerImpl.java   |   4 +-
 .../resource/NfsSecondaryStorageResource.java  |   4 +-
 ui/l10n/en.js  |   2 +-
 .../main/java/com/cloud/utils/net/NetUtils.java| 251 ++---
 .../java/com/cloud/utils/net/NetUtilsTest.java | 114 --
 .../hypervisor/vmware/mo/HypervisorHostHelper.java |   2 +-
 41 files changed, 369 insertions(+), 342 deletions(-)

diff --git 
a/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java 
b/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java
index 86d3beb..b3b17e7 100644
--- a/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java
+++ b/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java
@@ -276,12 +276,12 @@ public class ConsoleProxyResource extends 
ServerResourceBase implements ServerRe
 s_logger.debug("addRouteToInternalIp: destIp is null");
 return;
 }
-if (!NetUtils.isValidIp(destIpOrCidr) && 
!NetUtils.isValidCIDR(destIpOrCidr)) {
+if (!NetUtils.isValidIp4(destIpOrCidr) && 
!NetUtils.isValidIp4Cidr(destIpOrCidr)) {
 s_logger.warn(" destIp is not a valid ip address or cidr destIp=" 
+ destIpOrCidr);
 return;
 }
 

  1   2   3   >