nitin-maharana commented on a change in pull request #2048: CLOUDSTACK-9880:
Expansion of Management IP Range.
URL: https://github.com/apache/cloudstack/pull/2048#discussion_r149885329
##########
File path: server/src/com/cloud/configuration/ConfigurationManagerImpl.java
##########
@@ -1097,8 +1095,243 @@ public void doInTransactionWithoutResult(final
TransactionStatus status) {
}
@Override
+ @DB
+ public Pod createPodIpRange(final CreateManagementNetworkIpRangeCmd cmd) {
+
+ //Check if calling account is root admin.
+ final Account account = CallContext.current().getCallingAccount();
+
+ if(!_accountMgr.isRootAdmin(account.getId())) {
+ throw new PermissionDeniedException("Cannot perform this
operation, Calling account is not root admin: " + account.getId());
+ }
+
+ final long podId = cmd.getPodId();
+ final String gateway = cmd.getGateWay();
+ final String netmask = cmd.getNetmask();
+ final String startIp = cmd.getStartIp();
+ String endIp = cmd.getEndIp();
+
+ final HostPodVO pod = _podDao.findById(podId);
+
+ if(pod == null) {
+ throw new InvalidParameterValueException("Unable to find pod by
ID: " + podId);
+ }
+
+ final long zoneId = pod.getDataCenterId();
+
+ //Check if gateway is a valid IP address.
Review comment:
Done!
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services