Skip to content

Commit

Permalink
Updates to build.gradle file
Browse files Browse the repository at this point in the history
  • Loading branch information
gc4rella committed May 3, 2018
1 parent 68559f3 commit b792231
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
10 changes: 1 addition & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ buildscript {
}
}
plugins {
id 'net.researchgate.release' version '2.1.2'
id 'net.researchgate.release' version '2.6.0'
id "nebula.ospackage" version "4.5.1"
id 'com.github.sherter.google-java-format' version '0.5'
}
Expand All @@ -39,14 +39,6 @@ apply from: 'gradle/gradle/git.helpers.gradle'
* Project settings
*/
project.ext {
//------------------------------------------------//
/**
* Spring Related Variables
*/
springVersion = '4.2.0.RELEASE'
springBootVersion = '1.5.8.RELEASE'
//------------------------------------------------//
//------------------------------------------------//
/**
* Application Related Version
*/
Expand Down
33 changes: 20 additions & 13 deletions src/main/java/org/openbaton/drivers/amazon/AmazonDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ private List<Address> getUnallocatedAddresses(AmazonEC2 client) {

/**
* Get the interfaces attached to a certain VM
*
* @param client amazonec2 client
* @param instanceId id of the vm
* @return list of interfaces
Expand Down Expand Up @@ -411,9 +412,10 @@ private String imageExistsOnAWS(String nameId, AmazonEC2 client) throws AmazonCl
}

/**
* Creates an interface for the instance in order to connect to subnet. Does not assign floating ip,
* this method is used in case multiple interfaces are supposed to be created for on instance. Elastic ips
* are then assgined after creation.
* Creates an interface for the instance in order to connect to subnet. Does not assign floating
* ip, this method is used in case multiple interfaces are supposed to be created for on instance.
* Elastic ips are then assgined after creation.
*
* @param net subnet inside AWS represented through NFVO network
* @param deviceIndex device index for the interface is required by AWS
* @param secIDs security group ID
Expand All @@ -440,22 +442,25 @@ private InstanceNetworkInterfaceSpecification createInterface(
}

/**
* Creates an interface for the instance in order to connect to subnet and assigns public ip to it connecting
* the instance to internet. Used only if the instance has no more than one network interface. It is made in order
* to conserve the limited amount of elastic ips on AWS (5 only generally) and not use them if not necessary.
* Creates an interface for the instance in order to connect to subnet and assigns public ip to it
* connecting the instance to internet. Used only if the instance has no more than one network
* interface. It is made in order to conserve the limited amount of elastic ips on AWS (5 only
* generally) and not use them if not necessary.
*
* @param net subnet inside AWS represented through NFVO network
* @param deviceIndex device index for the interface is required by AWS
* @param secIDs security group ID
* @return
*/
private InstanceNetworkInterfaceSpecification createInterfaceWithPublicIp(
BaseNetwork net, int deviceIndex, Set<String> secIDs) {
BaseNetwork net, int deviceIndex, Set<String> secIDs) {
InstanceNetworkInterfaceSpecification interSpec =
new InstanceNetworkInterfaceSpecification()
.withDeleteOnTermination(true)
.withSubnetId(net.getExtId())
.withGroups(secIDs)
.withDeviceIndex(deviceIndex).withAssociatePublicIpAddress(true);
new InstanceNetworkInterfaceSpecification()
.withDeleteOnTermination(true)
.withSubnetId(net.getExtId())
.withGroups(secIDs)
.withDeviceIndex(deviceIndex)
.withAssociatePublicIpAddress(true);
log.info("Device index" + deviceIndex);
return interSpec;

Expand Down Expand Up @@ -623,7 +628,8 @@ public java.util.List<Server> listServer(BaseVimInstance vimInstanceBase)
}

@Override
public Server rebuildServer(BaseVimInstance vimInstance, String serverId, String imageId) throws VimDriverException {
public Server rebuildServer(BaseVimInstance vimInstance, String serverId, String imageId)
throws VimDriverException {
return null;
}

Expand Down Expand Up @@ -779,6 +785,7 @@ public BaseNetwork createNetwork(BaseVimInstance vimInstanceBase, BaseNetwork ne

/**
* Get the table of VPCs name to id by name
*
* @param vimInstance
* @return
* @throws VimDriverException
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/org/openbaton/drivers/amazon/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ static org.openbaton.catalogue.nfvo.Server getServer(Instance instance, List<Bas
* Converts aws subnet to nfvo network
*
* <p>AWS EC2 VPCs do not have internal networks. Subnet is converted to network with one subnet
* in order to map the resource as precisely as possible Is the subnet has not name tag, which is allowed
* in AWS the id will be assigned to name to ensure consistency
* in order to map the resource as precisely as possible Is the subnet has not name tag, which is
* allowed in AWS the id will be assigned to name to ensure consistency
*
* @param subnet aws subnet
* @return created nfvo network
Expand All @@ -92,7 +92,9 @@ static org.openbaton.catalogue.nfvo.networks.AWSNetwork getNetworkFromSubnet(
nfvoNetwork.setName(tag.getValue());
}
}
if (nfvoNetwork.getName() == null || nfvoNetwork.getName().isEmpty() || nfvoNetwork.equals("")) {
if (nfvoNetwork.getName() == null
|| nfvoNetwork.getName().isEmpty()
|| nfvoNetwork.equals("")) {
nfvoNetwork.setName(subnet.getSubnetId());
}
nfvoNetwork.setIpv4cidr(subnet.getCidrBlock());
Expand Down

0 comments on commit b792231

Please sign in to comment.