@@ -540,7 +540,7 @@ protected Map<PublicIp, Set<Service>> getIpToServices(List<PublicIp> publicIps,
540540 }
541541
542542 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
544544 List <PublicIp > ipList = new ArrayList <PublicIp >();
545545 ipList .add (ip );
546546 Map <PublicIp , Set <Service >> ipToServices = getIpToServices (ipList , false , false );
@@ -549,7 +549,7 @@ protected boolean canIpUsedForNonConserveService(PublicIp ip, Service service) {
549549 if (services == null || services .isEmpty ()) {
550550 return true ;
551551 }
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
553553 if (services .size () != 1 ) {
554554 throw new InvalidParameterException ("There are multiple services used ip " + ip .getAddress () + "." );
555555 }
@@ -920,7 +920,7 @@ public NicSecondaryIp allocateSecondaryGuestIP(final long nicId, IpAddresses req
920920 ip6addr = ipv6AddrMgr .allocateGuestIpv6 (network , ipv6Address );
921921 }
922922 } 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
924924 Long podId = null ;
925925 DataCenter dc = _dcDao .findById (network .getDataCenterId ());
926926
@@ -951,7 +951,7 @@ public NicSecondaryIp allocateSecondaryGuestIP(final long nicId, IpAddresses req
951951 }
952952
953953 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
955955 final String ip4AddrFinal = ipaddr ;
956956 final String ip6AddrFinal = ip6addr ;
957957 long id = Transaction .execute (new TransactionCallback <Long >() {
@@ -1016,7 +1016,7 @@ public boolean releaseSecondaryIpFromNic(long ipAddressId) {
10161016 List <NicSecondaryIpVO > ipList = _nicSecondaryIpDao .listByNicId (nicId );
10171017 boolean lastIp = false ;
10181018 if (ipList .size () == 1 ) {
1019- // this is the last secondary ip to nic
1019+ // this is the last secondary IP to NIC
10201020 lastIp = true ;
10211021 }
10221022
@@ -1027,7 +1027,7 @@ public boolean releaseSecondaryIpFromNic(long ipAddressId) {
10271027
10281028 logger .debug ("Calling secondary ip " + secIpVO .getIp4Address () + " release " );
10291029 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
10311031 String secondaryIp = secIpVO .getIp4Address ();
10321032 List <FirewallRuleVO > fwRulesList = _firewallDao .listByNetworkAndPurpose (network .getId (), Purpose .PortForwarding );
10331033
@@ -1039,7 +1039,7 @@ public boolean releaseSecondaryIpFromNic(long ipAddressId) {
10391039 }
10401040 }
10411041 }
1042- //check if the secondary ip associated with any static nat rule
1042+ //check if the secondary IP associated with any static nat rule
10431043 IPAddressVO publicIpVO = _ipAddressDao .findByIpAndNetworkId (secIpVO .getNetworkId (), secondaryIp );
10441044 if (publicIpVO != null ) {
10451045 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
12901290 throw new IllegalArgumentException ("only ip addresses that belong to a virtual network may be disassociated." );
12911291 }
12921292
1293- // don't allow releasing system ip address
1293+ // don't allow releasing system IP address
12941294 if (ipVO .getSystem ()) {
12951295 throwInvalidIdException ("Can't release system IP address with specified id" , ipVO .getUuid (), "systemIpAddrId" );
12961296 }
@@ -1729,7 +1729,7 @@ public Network createGuestNetwork(CreateNetworkCmd cmd) throws InsufficientCapac
17291729 domainId , isDomainSpecific , subdomainAccess , vpcId , startIPv6 , endIPv6 , ip6Gateway , ip6Cidr , displayNetwork , aclId , secondaryVlanId , privateVlanType , ntwkOff , pNtwk , aclType , owner , cidr , createVlan ,
17301730 externalId , routerIPv4 , routerIPv6 , associatedNetwork , ip4Dns1 , ip4Dns2 , ip6Dns1 , ip6Dns2 , interfaceMTUs );
17311731
1732- // retrieve, acquire and associate the correct ip adresses
1732+ // retrieve, acquire and associate the correct IP addresses
17331733 checkAndSetRouterSourceNatIp (owner , cmd , network );
17341734
17351735 if (hideIpAddressUsage ) {
@@ -1787,7 +1787,7 @@ private boolean checkAndUpdateRouterSourceNatIp(UpdateNetworkCmd cmd, Network ne
17871787 if (! userIps .isEmpty ()) {
17881788 try {
17891789 _ipAddrMgr .updateSourceNatIpAddress (requestedIp , userIps );
1790- } catch (Exception e ) { // pokemon execption from transaction
1790+ } catch (Exception e ) { // pokemon exception from transaction
17911791 String msg = String .format ("Update of source NAT ip to %s for network \" %s\" /%s failed due to %s" ,
17921792 requestedIp .getAddress ().addr (), network .getName (), network .getUuid (), e .getLocalizedMessage ());
17931793 logger .error (msg );
@@ -1806,7 +1806,7 @@ private IPAddressVO checkSourceNatIpAddressForUpdate(UpdateNetworkCmd cmd, Netwo
18061806 } else {
18071807 logger .info (String .format ("updating network %s to have source NAT ip %s" , cmd .getNetworkName (), sourceNatIp ));
18081808 }
1809- // check if the address is already aqcuired for this network
1809+ // check if the address is already acquired for this network
18101810 IPAddressVO requestedIp = _ipAddressDao .findByIp (sourceNatIp );
18111811 if (requestedIp == null || requestedIp .getAssociatedWithNetworkId () == null || ! requestedIp .getAssociatedWithNetworkId ().equals (network .getId ())) {
18121812 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
18151815 }
18161816 // check if it is the current source NAT address
18171817 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 ));
18191819 return null ;
18201820 }
18211821 return requestedIp ;
@@ -3051,7 +3051,7 @@ public Network updateGuestNetwork(final UpdateNetworkCmd cmd) {
30513051
30523052 // network offering and domain suffix can be updated for Isolated networks only in 3.0
30533053 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" );
30553055 }
30563056
30573057 boolean networkOfferingChanged = false ;
@@ -3953,7 +3953,7 @@ private boolean canMoveToPhysicalNetwork(Network network, long oldNetworkOfferin
39533953 return false ;
39543954 }
39553955
3956- // Check all ips
3956+ // Check all IPs
39573957 List <IPAddressVO > userIps = _ipAddressDao .listByAssociatedNetwork (network .getId (), null );
39583958 List <PublicIp > publicIps = new ArrayList <PublicIp >();
39593959 if (userIps != null && !userIps .isEmpty ()) {
@@ -4103,10 +4103,10 @@ public PhysicalNetworkVO doInTransaction(TransactionStatus status) {
41034103 // add security group provider to the physical network
41044104 addDefaultSecurityGroupProviderToPhysicalNetwork (pNetwork .getId ());
41054105
4106- // add VPCVirtualRouter as the defualt network service provider
4106+ // add VPCVirtualRouter as the default network service provider
41074107 addDefaultVpcVirtualRouterToPhysicalNetwork (pNetwork .getId ());
41084108
4109- // add baremetal as the defualt network service provider
4109+ // add baremetal as the default network service provider
41104110 addDefaultBaremetalProvidersToPhysicalNetwork (pNetwork .getId ());
41114111
41124112 //Add Internal Load Balancer element as a default network service provider
@@ -4187,7 +4187,7 @@ public PhysicalNetwork updatePhysicalNetwork(Long id, String networkSpeed, List<
41874187 }
41884188
41894189 // 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
41914191 if (tags != null && tags .size () == 0 ) {
41924192 checkForPhysicalNetworksWithoutTag (network );
41934193 }
@@ -4272,7 +4272,7 @@ public void addOrRemoveVnets(String[] listOfRanges, final PhysicalNetworkVO netw
42724272 vnetsInDb .addAll (tempVnets );
42734273 }
42744274
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.
42764276 if (vnetsInDb .size () != 0 ) {
42774277 commaSeparatedStringOfVnetRanges = generateVnetString (new ArrayList <String >(vnetsInDb ));
42784278 }
@@ -4316,7 +4316,7 @@ private List<Pair<Integer, Integer>> validateVlanRange(PhysicalNetworkVO network
43164316
43174317 // for GRE phynets allow up to 32bits
43184318 // TODO: Not happy about this test.
4319- // What about guru-like objects for physical networs ?
4319+ // What about guru-like objects for physical networks ?
43204320 logger .debug ("ISOLATION METHODS:" + network .getIsolationMethods ());
43214321 // Java does not have unsigned types...
43224322 if (network .getIsolationMethods ().contains ("GRE" )) {
@@ -5070,7 +5070,7 @@ public PhysicalNetworkServiceProvider updateNetworkServiceProvider(Long id, Stri
50705070 }
50715071
50725072 if (enabledServices != null ) {
5073- // check if services can be turned of
5073+ // check if services can be turned off
50745074 if (!element .canEnableIndividualServices ()) {
50755075 throw new InvalidParameterValueException ("Cannot update set of Services for this Service Provider '" + provider .getProviderName () + "'" );
50765076 }
@@ -5228,7 +5228,7 @@ public PhysicalNetworkTrafficType addTrafficTypeToPhysicalNetwork(Long physicalN
52285228 }
52295229
52305230 // 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.
52325232 List <String > tags = network .getTags ();
52335233 if (CollectionUtils .isEmpty (tags )) {
52345234 checkForPhysicalNetworksWithoutTag (network , trafficType );
@@ -5578,14 +5578,14 @@ public IpAddress associateIPToNetwork(long ipId, long networkId)
55785578
55795579 Network network = _networksDao .findById (networkId );
55805580 if (network == null ) {
5581- // release the acquired IP addrress before throwing the exception
5581+ // release the acquired IP address before throwing the exception
55825582 // else it will always be in allocating state
55835583 releaseIpAddress (ipId );
55845584 throw new InvalidParameterValueException ("Invalid network id is given" );
55855585 }
55865586
55875587 if (network .getVpcId () != null ) {
5588- // release the acquired IP addrress before throwing the exception
5588+ // release the acquired IP address before throwing the exception
55895589 // else it will always be in allocating state
55905590 releaseIpAddress (ipId );
55915591 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
56225622 }
56235623
56245624 // 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
56265626 if (!NetUtils .isValidIp4 (startIp )) {
56275627 throw new InvalidParameterValueException ("Invalid format for the ip address parameter" );
56285628 }
@@ -5646,7 +5646,7 @@ public Network createPrivateNetwork(final String networkName, final String displ
56465646 URI uri = BroadcastDomainType .fromString (broadcastUriString );
56475647 uriString = uri .toString ();
56485648 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
56505650 // TODO make a test for any supported scheme
56515651 if (!(tiep == BroadcastDomainType .Vlan || tiep == BroadcastDomainType .Lswitch )) {
56525652 throw new InvalidParameterValueException ("unsupported type of broadcastUri specified: " + broadcastUriString );
0 commit comments