@@ -540,7 +540,7 @@ protected Map<PublicIp, Set<Service>> getIpToServices(List<PublicIp> publicIps,
540
540
}
541
541
542
542
protected boolean canIpUsedForNonConserveService (PublicIp ip , Service service ) {
543
- // If it's non-conserve mode, then the new ip should not be used by any other services
543
+ // If it's non-conserve mode, then the new IP should not be used by any other services
544
544
List <PublicIp > ipList = new ArrayList <PublicIp >();
545
545
ipList .add (ip );
546
546
Map <PublicIp , Set <Service >> ipToServices = getIpToServices (ipList , false , false );
@@ -549,7 +549,7 @@ protected boolean canIpUsedForNonConserveService(PublicIp ip, Service service) {
549
549
if (services == null || services .isEmpty ()) {
550
550
return true ;
551
551
}
552
- // Since it's non-conserve mode, only one service should used for IP
552
+ // Since it's non-conserve mode, only one service should be used for IP
553
553
if (services .size () != 1 ) {
554
554
throw new InvalidParameterException ("There are multiple services used ip " + ip .getAddress () + "." );
555
555
}
@@ -920,7 +920,7 @@ public NicSecondaryIp allocateSecondaryGuestIP(final long nicId, IpAddresses req
920
920
ip6addr = ipv6AddrMgr .allocateGuestIpv6 (network , ipv6Address );
921
921
}
922
922
} else if (network .getGuestType () == Network .GuestType .Shared ) {
923
- //for basic zone, need to provide the podId to ensure proper ip alloation
923
+ //for basic zone, need to provide the podId to ensure proper IP allocation
924
924
Long podId = null ;
925
925
DataCenter dc = _dcDao .findById (network .getDataCenterId ());
926
926
@@ -951,7 +951,7 @@ public NicSecondaryIp allocateSecondaryGuestIP(final long nicId, IpAddresses req
951
951
}
952
952
953
953
if (!StringUtils .isAllBlank (ipaddr , ip6addr )) {
954
- // we got the ip addr so up the nics table and secodary ip
954
+ // we got the IP addr so up the nics table and secondary IP
955
955
final String ip4AddrFinal = ipaddr ;
956
956
final String ip6AddrFinal = ip6addr ;
957
957
long id = Transaction .execute (new TransactionCallback <Long >() {
@@ -1016,7 +1016,7 @@ public boolean releaseSecondaryIpFromNic(long ipAddressId) {
1016
1016
List <NicSecondaryIpVO > ipList = _nicSecondaryIpDao .listByNicId (nicId );
1017
1017
boolean lastIp = false ;
1018
1018
if (ipList .size () == 1 ) {
1019
- // this is the last secondary ip to nic
1019
+ // this is the last secondary IP to NIC
1020
1020
lastIp = true ;
1021
1021
}
1022
1022
@@ -1027,7 +1027,7 @@ public boolean releaseSecondaryIpFromNic(long ipAddressId) {
1027
1027
1028
1028
logger .debug ("Calling secondary ip " + secIpVO .getIp4Address () + " release " );
1029
1029
if (dc .getNetworkType () == NetworkType .Advanced && network .getGuestType () == Network .GuestType .Isolated ) {
1030
- //check PF or static NAT is configured on this ip address
1030
+ //check PF or static NAT is configured on this IP address
1031
1031
String secondaryIp = secIpVO .getIp4Address ();
1032
1032
List <FirewallRuleVO > fwRulesList = _firewallDao .listByNetworkAndPurpose (network .getId (), Purpose .PortForwarding );
1033
1033
@@ -1039,7 +1039,7 @@ public boolean releaseSecondaryIpFromNic(long ipAddressId) {
1039
1039
}
1040
1040
}
1041
1041
}
1042
- //check if the secondary ip associated with any static nat rule
1042
+ //check if the secondary IP associated with any static nat rule
1043
1043
IPAddressVO publicIpVO = _ipAddressDao .findByIpAndNetworkId (secIpVO .getNetworkId (), secondaryIp );
1044
1044
if (publicIpVO != null ) {
1045
1045
logger .debug ("VM nic IP " + secondaryIp + " is associated with the static NAT rule public IP address id " + publicIpVO .getId ());
@@ -1290,7 +1290,7 @@ private boolean releaseIpAddressInternal(long ipAddressId) throws InsufficientAd
1290
1290
throw new IllegalArgumentException ("only ip addresses that belong to a virtual network may be disassociated." );
1291
1291
}
1292
1292
1293
- // don't allow releasing system ip address
1293
+ // don't allow releasing system IP address
1294
1294
if (ipVO .getSystem ()) {
1295
1295
throwInvalidIdException ("Can't release system IP address with specified id" , ipVO .getUuid (), "systemIpAddrId" );
1296
1296
}
@@ -1729,7 +1729,7 @@ public Network createGuestNetwork(CreateNetworkCmd cmd) throws InsufficientCapac
1729
1729
domainId , isDomainSpecific , subdomainAccess , vpcId , startIPv6 , endIPv6 , ip6Gateway , ip6Cidr , displayNetwork , aclId , secondaryVlanId , privateVlanType , ntwkOff , pNtwk , aclType , owner , cidr , createVlan ,
1730
1730
externalId , routerIPv4 , routerIPv6 , associatedNetwork , ip4Dns1 , ip4Dns2 , ip6Dns1 , ip6Dns2 , interfaceMTUs );
1731
1731
1732
- // retrieve, acquire and associate the correct ip adresses
1732
+ // retrieve, acquire and associate the correct IP addresses
1733
1733
checkAndSetRouterSourceNatIp (owner , cmd , network );
1734
1734
1735
1735
if (hideIpAddressUsage ) {
@@ -1787,7 +1787,7 @@ private boolean checkAndUpdateRouterSourceNatIp(UpdateNetworkCmd cmd, Network ne
1787
1787
if (! userIps .isEmpty ()) {
1788
1788
try {
1789
1789
_ipAddrMgr .updateSourceNatIpAddress (requestedIp , userIps );
1790
- } catch (Exception e ) { // pokemon execption from transaction
1790
+ } catch (Exception e ) { // pokemon exception from transaction
1791
1791
String msg = String .format ("Update of source NAT ip to %s for network \" %s\" /%s failed due to %s" ,
1792
1792
requestedIp .getAddress ().addr (), network .getName (), network .getUuid (), e .getLocalizedMessage ());
1793
1793
logger .error (msg );
@@ -1806,7 +1806,7 @@ private IPAddressVO checkSourceNatIpAddressForUpdate(UpdateNetworkCmd cmd, Netwo
1806
1806
} else {
1807
1807
logger .info (String .format ("updating network %s to have source NAT ip %s" , cmd .getNetworkName (), sourceNatIp ));
1808
1808
}
1809
- // check if the address is already aqcuired for this network
1809
+ // check if the address is already acquired for this network
1810
1810
IPAddressVO requestedIp = _ipAddressDao .findByIp (sourceNatIp );
1811
1811
if (requestedIp == null || requestedIp .getAssociatedWithNetworkId () == null || ! requestedIp .getAssociatedWithNetworkId ().equals (network .getId ())) {
1812
1812
logger .warn (String .format ("Source NAT IP %s is not associated with network %s/%s. It cannot be used as source NAT IP." ,
@@ -1815,7 +1815,7 @@ private IPAddressVO checkSourceNatIpAddressForUpdate(UpdateNetworkCmd cmd, Netwo
1815
1815
}
1816
1816
// check if it is the current source NAT address
1817
1817
if (requestedIp .isSourceNat ()) {
1818
- logger .info (String .format ("IP address %s is allready the source Nat address. Not updating!" , sourceNatIp ));
1818
+ logger .info (String .format ("IP address %s is already the source Nat address. Not updating!" , sourceNatIp ));
1819
1819
return null ;
1820
1820
}
1821
1821
return requestedIp ;
@@ -3051,7 +3051,7 @@ public Network updateGuestNetwork(final UpdateNetworkCmd cmd) {
3051
3051
3052
3052
// network offering and domain suffix can be updated for Isolated networks only in 3.0
3053
3053
if ((networkOfferingId != null || domainSuffix != null ) && network .getGuestType () != GuestType .Isolated ) {
3054
- throw new InvalidParameterValueException ("NetworkOffering and domain suffix upgrade can be perfomed for Isolated networks only" );
3054
+ throw new InvalidParameterValueException ("NetworkOffering and domain suffix upgrade can be performed for Isolated networks only" );
3055
3055
}
3056
3056
3057
3057
boolean networkOfferingChanged = false ;
@@ -3953,7 +3953,7 @@ private boolean canMoveToPhysicalNetwork(Network network, long oldNetworkOfferin
3953
3953
return false ;
3954
3954
}
3955
3955
3956
- // Check all ips
3956
+ // Check all IPs
3957
3957
List <IPAddressVO > userIps = _ipAddressDao .listByAssociatedNetwork (network .getId (), null );
3958
3958
List <PublicIp > publicIps = new ArrayList <PublicIp >();
3959
3959
if (userIps != null && !userIps .isEmpty ()) {
@@ -4103,10 +4103,10 @@ public PhysicalNetworkVO doInTransaction(TransactionStatus status) {
4103
4103
// add security group provider to the physical network
4104
4104
addDefaultSecurityGroupProviderToPhysicalNetwork (pNetwork .getId ());
4105
4105
4106
- // add VPCVirtualRouter as the defualt network service provider
4106
+ // add VPCVirtualRouter as the default network service provider
4107
4107
addDefaultVpcVirtualRouterToPhysicalNetwork (pNetwork .getId ());
4108
4108
4109
- // add baremetal as the defualt network service provider
4109
+ // add baremetal as the default network service provider
4110
4110
addDefaultBaremetalProvidersToPhysicalNetwork (pNetwork .getId ());
4111
4111
4112
4112
//Add Internal Load Balancer element as a default network service provider
@@ -4187,7 +4187,7 @@ public PhysicalNetwork updatePhysicalNetwork(Long id, String networkSpeed, List<
4187
4187
}
4188
4188
4189
4189
// If tags are null, then check if there are any other networks with null tags
4190
- // of the same traffic type. If so then dont update the tags
4190
+ // of the same traffic type. If so then don't update the tags
4191
4191
if (tags != null && tags .size () == 0 ) {
4192
4192
checkForPhysicalNetworksWithoutTag (network );
4193
4193
}
@@ -4272,7 +4272,7 @@ public void addOrRemoveVnets(String[] listOfRanges, final PhysicalNetworkVO netw
4272
4272
vnetsInDb .addAll (tempVnets );
4273
4273
}
4274
4274
4275
- //sorting the vnets in Db to generate a comma separated list of the vnet string.
4275
+ //sorting the vnets in Db to generate a comma separated list of the vnet string.
4276
4276
if (vnetsInDb .size () != 0 ) {
4277
4277
commaSeparatedStringOfVnetRanges = generateVnetString (new ArrayList <String >(vnetsInDb ));
4278
4278
}
@@ -4316,7 +4316,7 @@ private List<Pair<Integer, Integer>> validateVlanRange(PhysicalNetworkVO network
4316
4316
4317
4317
// for GRE phynets allow up to 32bits
4318
4318
// TODO: Not happy about this test.
4319
- // What about guru-like objects for physical networs ?
4319
+ // What about guru-like objects for physical networks ?
4320
4320
logger .debug ("ISOLATION METHODS:" + network .getIsolationMethods ());
4321
4321
// Java does not have unsigned types...
4322
4322
if (network .getIsolationMethods ().contains ("GRE" )) {
@@ -5070,7 +5070,7 @@ public PhysicalNetworkServiceProvider updateNetworkServiceProvider(Long id, Stri
5070
5070
}
5071
5071
5072
5072
if (enabledServices != null ) {
5073
- // check if services can be turned of
5073
+ // check if services can be turned off
5074
5074
if (!element .canEnableIndividualServices ()) {
5075
5075
throw new InvalidParameterValueException ("Cannot update set of Services for this Service Provider '" + provider .getProviderName () + "'" );
5076
5076
}
@@ -5228,7 +5228,7 @@ public PhysicalNetworkTrafficType addTrafficTypeToPhysicalNetwork(Long physicalN
5228
5228
}
5229
5229
5230
5230
// Check if there are more than 1 physical network with null tags in same traffic type.
5231
- // If so then dont allow to add traffic type.
5231
+ // If so then don't allow to add traffic type.
5232
5232
List <String > tags = network .getTags ();
5233
5233
if (CollectionUtils .isEmpty (tags )) {
5234
5234
checkForPhysicalNetworksWithoutTag (network , trafficType );
@@ -5578,14 +5578,14 @@ public IpAddress associateIPToNetwork(long ipId, long networkId)
5578
5578
5579
5579
Network network = _networksDao .findById (networkId );
5580
5580
if (network == null ) {
5581
- // release the acquired IP addrress before throwing the exception
5581
+ // release the acquired IP address before throwing the exception
5582
5582
// else it will always be in allocating state
5583
5583
releaseIpAddress (ipId );
5584
5584
throw new InvalidParameterValueException ("Invalid network id is given" );
5585
5585
}
5586
5586
5587
5587
if (network .getVpcId () != null ) {
5588
- // release the acquired IP addrress before throwing the exception
5588
+ // release the acquired IP address before throwing the exception
5589
5589
// else it will always be in allocating state
5590
5590
releaseIpAddress (ipId );
5591
5591
throw new InvalidParameterValueException ("Can't assign ip to the network directly when network belongs" + " to VPC.Specify vpcId to associate ip address to VPC" );
@@ -5622,7 +5622,7 @@ public Network createPrivateNetwork(final String networkName, final String displ
5622
5622
}
5623
5623
5624
5624
// VALIDATE IP INFO
5625
- // if end ip is not specified, default it to startIp
5625
+ // if end IP is not specified, default it to startIp
5626
5626
if (!NetUtils .isValidIp4 (startIp )) {
5627
5627
throw new InvalidParameterValueException ("Invalid format for the ip address parameter" );
5628
5628
}
@@ -5646,7 +5646,7 @@ public Network createPrivateNetwork(final String networkName, final String displ
5646
5646
URI uri = BroadcastDomainType .fromString (broadcastUriString );
5647
5647
uriString = uri .toString ();
5648
5648
BroadcastDomainType tiep = BroadcastDomainType .getSchemeValue (uri );
5649
- // numeric vlan or vlan uri are ok for now
5649
+ // numeric vlan or vlan URI are ok for now
5650
5650
// TODO make a test for any supported scheme
5651
5651
if (!(tiep == BroadcastDomainType .Vlan || tiep == BroadcastDomainType .Lswitch )) {
5652
5652
throw new InvalidParameterValueException ("unsupported type of broadcastUri specified: " + broadcastUriString );
0 commit comments