Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
f2a98adf
Commit
f2a98adf
authored
Jul 05, 2017
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix conflict with org.bouncycastle
parent
486005b2
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
73 additions
and
55 deletions
+73
-55
Dockerfile
Dockerfiles/manager/Dockerfile
+1
-2
NOTES
docs/NOTES
+1
-1
pom.xml
drip-commons/pom.xml
+2
-2
AAUtils.java
.../src/main/java/nl/uva/sne/drip/commons/utils/AAUtils.java
+41
-31
docker_swarm.pyc
drip-deployer/docker_swarm.pyc
+0
-0
rpc_server.py
drip-deployer/rpc_server.py
+3
-3
pom.xml
drip-provisioner/pom.xml
+10
-2
MessageParsing.java
...l/uva/sne/drip/drip/provisioner/utils/MessageParsing.java
+8
-7
PropertyValues.java
...l/uva/sne/drip/drip/provisioner/utils/PropertyValues.java
+2
-3
Consumer.java
...in/java/nl/uva/sne/drip/drip/provisioner/v1/Consumer.java
+5
-4
No files found.
Dockerfiles/manager/Dockerfile
View file @
f2a98adf
...
@@ -13,7 +13,7 @@ ARG CERTS=/etc/grid-security/certificates
...
@@ -13,7 +13,7 @@ ARG CERTS=/etc/grid-security/certificates
ENV
DEBIAN_FRONTEND=noninteractive
ENV
DEBIAN_FRONTEND=noninteractive
RUN
apt-get update
&&
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-y
--no-install-recommends
RUN
apt-get update
&&
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-y
--no-install-recommends
RUN
apt-get upgrade
-y
RUN
apt-get upgrade
-y
RUN
apt-get
install
-y
wget software-properties-common mongodb-clients
RUN
apt-get
install
-y
wget software-properties-common mongodb-clients
openssh-client
# RUN apt-get install -y python-software-properties debconf-utils apt-utils
# RUN apt-get install -y python-software-properties debconf-utils apt-utils
RUN
add-apt-repository
-y
ppa:webupd8team/java
RUN
add-apt-repository
-y
ppa:webupd8team/java
RUN
apt-get update
RUN
apt-get update
...
@@ -22,7 +22,6 @@ RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-s
...
@@ -22,7 +22,6 @@ RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-s
RUN
echo
debconf shared/accepted-oracle-license-v1-1 seen
true
| debconf-set-selections
RUN
echo
debconf shared/accepted-oracle-license-v1-1 seen
true
| debconf-set-selections
RUN
apt-get
install
-y
oracle-java8-installer
RUN
apt-get
install
-y
oracle-java8-installer
##install drip-manager
##install drip-manager
WORKDIR
/root
WORKDIR
/root
# RUN wget http://www-eu.apache.org/dist/tomcat/tomcat-7/v7.0.75/bin/apache-tomcat-7.0.75.tar.gz
# RUN wget http://www-eu.apache.org/dist/tomcat/tomcat-7/v7.0.75/bin/apache-tomcat-7.0.75.tar.gz
...
...
docs/NOTES
View file @
f2a98adf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
docker run --hostname my-rabbit --name some-rabbit -p 127.0.0.1:15672:15672 -p 127.0.0.1:4369:4369 -p 127.0.0.1:5671-5672:5671-5672 -p 127.0.0.1:15671:15671 -d rabbitmq:3-management
docker run --hostname my-rabbit --name some-rabbit -p 127.0.0.1:15672:15672 -p 127.0.0.1:4369:4369 -p 127.0.0.1:5671-5672:5671-5672 -p 127.0.0.1:15671:15671 -d rabbitmq:3-management
docker run --name mongo-inst -p 127.0.0.1:27017:27017 -d mongo:3
docker run --name mongo-inst -p 127.0.0.1:27017:27017 -d mongo:3
docker run --name drip-inst -p 127.0.0.1:8080:8080 -d drip-manager
docker run --name drip-inst -p 127.0.0.1:8080:8080 -d drip-manager
sudo
docker run --hostname my-proxy --name some-myproxy -p 7512:7512 -p 7513:7513 -p 10022:22 agaveapi/myproxy
docker run --hostname my-proxy --name some-myproxy -p 7512:7512 -p 7513:7513 -p 10022:22 agaveapi/myproxy
#--------Add admin-----------------
#--------Add admin-----------------
docker exec -t mongo-inst mongo -eval 'db.user.insert({"password":"$2a$10$QdysFgsH0sl6Y4BD84UhGO7yyNfoDPXjjEHkDJ3pX6cRfHDj2Q0BO","roles":["ADMIN"],"username":"admin","accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true})' localhost/drip
docker exec -t mongo-inst mongo -eval 'db.user.insert({"password":"$2a$10$QdysFgsH0sl6Y4BD84UhGO7yyNfoDPXjjEHkDJ3pX6cRfHDj2Q0BO","roles":["ADMIN"],"username":"admin","accountNonExpired":true,"accountNonLocked":true,"credentialsNonExpired":true,"enabled":true})' localhost/drip
drip-commons/pom.xml
View file @
f2a98adf
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
<version>
4.2.1.RELEASE
</version>
<version>
4.2.1.RELEASE
</version>
<type>
jar
</type>
<type>
jar
</type>
</dependency>
</dependency>
<dependency>
<!--
<dependency>
<groupId>org.jglobus</groupId>
<groupId>org.jglobus</groupId>
<artifactId>ssl-proxies</artifactId>
<artifactId>ssl-proxies</artifactId>
<version>2.1.0</version>
<version>2.1.0</version>
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
<artifactId>myproxy</artifactId>
<artifactId>myproxy</artifactId>
<version>2.1.0</version>
<version>2.1.0</version>
<type>jar</type>
<type>jar</type>
</dependency>
</dependency>
-->
</dependencies>
</dependencies>
<properties>
<properties>
<maven.compiler.source>
1.8
</maven.compiler.source>
<maven.compiler.source>
1.8
</maven.compiler.source>
...
...
drip-commons/src/main/java/nl/uva/sne/drip/commons/utils/AAUtils.java
View file @
f2a98adf
...
@@ -24,18 +24,20 @@ import java.net.MalformedURLException;
...
@@ -24,18 +24,20 @@ import java.net.MalformedURLException;
import
java.net.URL
;
import
java.net.URL
;
import
java.nio.channels.Channels
;
import
java.nio.channels.Channels
;
import
java.nio.channels.ReadableByteChannel
;
import
java.nio.channels.ReadableByteChannel
;
import
java.nio.file.Files
;
import
java.nio.file.Paths
;
import
java.security.cert.CertificateEncodingException
;
import
java.security.cert.CertificateEncodingException
;
import
java.util.List
;
import
java.util.List
;
import
static
nl
.
uva
.
sne
.
drip
.
commons
.
utils
.
FileUtils
.
untar
;
import
static
nl
.
uva
.
sne
.
drip
.
commons
.
utils
.
FileUtils
.
untar
;
import
org.globus.common.CoGProperties
;
//
import org.globus.common.CoGProperties;
import
org.globus.myproxy.GetParams
;
//
import org.globus.myproxy.GetParams;
import
org.globus.myproxy.MyProxyException
;
//
import org.globus.myproxy.MyProxyException;
import
org.globus.util.Util
;
//
import org.globus.util.Util;
import
org.gridforum.jgss.ExtendedGSSCredential
;
//
import org.gridforum.jgss.ExtendedGSSCredential;
import
org.gridforum.jgss.ExtendedGSSManager
;
//
import org.gridforum.jgss.ExtendedGSSManager;
import
org.ietf.jgss.GSSCredential
;
//
import org.ietf.jgss.GSSCredential;
import
org.ietf.jgss.GSSException
;
//
import org.ietf.jgss.GSSException;
import
org.ietf.jgss.GSSManager
;
//
import org.ietf.jgss.GSSManager;
/**
/**
*
*
...
@@ -48,32 +50,40 @@ public class AAUtils {
...
@@ -48,32 +50,40 @@ public class AAUtils {
CERTIFICATE
,
PROXY_FILE
CERTIFICATE
,
PROXY_FILE
}
}
public
static
String
generateProxy
(
String
accessKeyId
,
String
secretKey
,
SOURCE
source
,
String
myProxyEndpoint
,
List
voname
)
throws
IOException
,
CertificateEncodingException
,
GSSException
,
MyProxyException
{
public
static
String
generateProxy
(
String
accessKeyId
,
String
secretKey
,
SOURCE
source
,
String
myProxyEndpoint
,
List
voname
)
throws
IOException
,
CertificateEncodingException
{
File
proxy_file
=
null
;
File
proxy_file
=
null
;
switch
(
source
)
{
switch
(
source
)
{
case
MY_PROXY:
case
MY_PROXY:
GetParams
getRequest
=
new
GetParams
();
// GetParams getRequest = new GetParams();
getRequest
.
setUserName
(
accessKeyId
);
// getRequest.setUserName(accessKeyId);
getRequest
.
setCredentialName
(
null
);
// getRequest.setCredentialName(null);
getRequest
.
setLifetime
(
43200
);
// getRequest.setLifetime(43200);
getRequest
.
setWantTrustroots
(
false
);
// getRequest.setWantTrustroots(false);
getRequest
.
setPassphrase
(
secretKey
);
// getRequest.setPassphrase(secretKey);
getRequest
.
setVoname
(
voname
);
// getRequest.setVoname(voname);
GSSManager
manager
=
ExtendedGSSManager
.
getInstance
();
// GSSManager manager = ExtendedGSSManager.getInstance();
GSSCredential
credential
=
manager
.
createCredential
(
GSSCredential
.
INITIATE_ONLY
);
// GSSCredential credential = manager.createCredential(GSSCredential.INITIATE_ONLY);
org
.
globus
.
myproxy
.
MyProxy
myProxy
=
new
org
.
globus
.
myproxy
.
MyProxy
(
myProxyEndpoint
,
7512
);
// org.globus.myproxy.MyProxy myProxy = new org.globus.myproxy.MyProxy(myProxyEndpoint, 7512);
GSSCredential
newCred
=
myProxy
.
get
(
credential
,
getRequest
);
// GSSCredential newCred = myProxy.get(credential, getRequest);
CoGProperties
properties
=
CoGProperties
.
getDefault
();
// CoGProperties properties = CoGProperties.getDefault();
String
outputFile
=
properties
.
getProxyFile
();
// String outputFile = properties.getProxyFile();
proxy_file
=
new
File
(
outputFile
);
// proxy_file = new File(outputFile);
String
path
=
proxy_file
.
getPath
();
// String path = proxy_file.getPath();
try
(
FileOutputStream
out
=
new
FileOutputStream
(
path
);)
{
// byte[] data
Util
.
setOwnerAccessOnly
(
path
);
// = ((ExtendedGSSCredential) newCred).export(ExtendedGSSCredential.IMPEXP_OPAQUE);
byte
[]
data
// Util.setOwnerAccessOnly(path);
=
((
ExtendedGSSCredential
)
newCred
).
export
(
ExtendedGSSCredential
.
IMPEXP_OPAQUE
);
// Files.write(Paths.get(path), data);
out
.
write
(
data
);
//// try (FileOutputStream out = new FileOutputStream(path);) {
}
break
;
//// Util.setOwnerAccessOnly(path);
//// byte[] data
//// = ((ExtendedGSSCredential) newCred).export(ExtendedGSSCredential.IMPEXP_OPAQUE);
//// out.write(data);
//// }
break
;
case
PROXY_FILE:
case
PROXY_FILE:
secretKey
+=
"\n"
;
Files
.
write
(
Paths
.
get
(
"/tmp/x509up_u1000"
),
secretKey
.
getBytes
());
proxy_file
=
new
File
(
"/tmp/x509up_u1000"
);
break
;
break
;
case
CERTIFICATE:
case
CERTIFICATE:
break
;
break
;
...
...
drip-deployer/docker_swarm.pyc
View file @
f2a98adf
No preview for this file type
drip-deployer/rpc_server.py
View file @
f2a98adf
...
@@ -69,8 +69,8 @@ def handleDelivery(message):
...
@@ -69,8 +69,8 @@ def handleDelivery(message):
fo
.
close
()
fo
.
close
()
elif
name
==
"composer"
:
elif
name
==
"composer"
:
value
=
param
[
"value"
]
value
=
param
[
"value"
]
docker
-
composer
=
path
+
"docker-composer.yml"
docker
_
composer
=
path
+
"docker-composer.yml"
fo
=
open
(
docker
-
composer
,
"w"
)
fo
=
open
(
docker
_
composer
,
"w"
)
fo
.
write
(
value
)
fo
.
write
(
value
)
fo
.
close
()
fo
.
close
()
...
@@ -83,7 +83,7 @@ def handleDelivery(message):
...
@@ -83,7 +83,7 @@ def handleDelivery(message):
ret
=
docker_swarm
.
run
(
vm_list
)
ret
=
docker_swarm
.
run
(
vm_list
)
if
"ERROR"
in
ret
:
return
ret
if
"ERROR"
in
ret
:
return
ret
ret1
=
control_agent
.
run
(
vm_list
)
ret1
=
control_agent
.
run
(
vm_list
)
#deploy_composer.run(vm_list,docker
-
composer)
#deploy_composer.run(vm_list,docker
_
composer)
if
"ERROR"
in
ret1
:
ret
=
ret1
if
"ERROR"
in
ret1
:
ret
=
ret1
return
ret
return
ret
elif
manager_type
==
"ansible"
:
elif
manager_type
==
"ansible"
:
...
...
drip-provisioner/pom.xml
View file @
f2a98adf
...
@@ -22,6 +22,12 @@
...
@@ -22,6 +22,12 @@
<groupId>
nl.uva.sne.drip
</groupId>
<groupId>
nl.uva.sne.drip
</groupId>
<artifactId>
drip-commons
</artifactId>
<artifactId>
drip-commons
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<version>
1.0-SNAPSHOT
</version>
<exclusions>
<exclusion>
<groupId>
org.bouncycastle
</groupId>
<artifactId>
bcprov-jdk15on
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependency>
<dependency>
<dependency>
...
@@ -63,12 +69,14 @@
...
@@ -63,12 +69,14 @@
</dependency>
</dependency>
<dependency>
<!--bcprov-jdk16-1.46-->
<!-- <dependency>
<groupId>org.jglobus</groupId>
<groupId>org.jglobus</groupId>
<artifactId>myproxy</artifactId>
<artifactId>myproxy</artifactId>
<version>2.0.6</version>
<version>2.0.6</version>
</dependency>
</dependency>
-->
<dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-compress
</artifactId>
<artifactId>
commons-compress
</artifactId>
...
...
drip-provisioner/src/main/java/nl/uva/sne/drip/drip/provisioner/utils/MessageParsing.java
View file @
f2a98adf
...
@@ -39,7 +39,7 @@ import nl.uva.sne.drip.commons.utils.AAUtils.SOURCE;
...
@@ -39,7 +39,7 @@ import nl.uva.sne.drip.commons.utils.AAUtils.SOURCE;
import
static
nl
.
uva
.
sne
.
drip
.
commons
.
utils
.
AAUtils
.
downloadCACertificates
;
import
static
nl
.
uva
.
sne
.
drip
.
commons
.
utils
.
AAUtils
.
downloadCACertificates
;
import
nl.uva.sne.drip.drip.commons.data.internal.MessageParameter
;
import
nl.uva.sne.drip.drip.commons.data.internal.MessageParameter
;
import
nl.uva.sne.drip.drip.commons.data.v1.external.CloudCredentials
;
import
nl.uva.sne.drip.drip.commons.data.v1.external.CloudCredentials
;
import
org.globus.myproxy.MyProxyException
;
//
import org.globus.myproxy.MyProxyException;
import
org.ietf.jgss.GSSException
;
import
org.ietf.jgss.GSSException
;
import
org.json.JSONArray
;
import
org.json.JSONArray
;
import
org.json.JSONException
;
import
org.json.JSONException
;
...
@@ -138,7 +138,7 @@ public class MessageParsing {
...
@@ -138,7 +138,7 @@ public class MessageParsing {
return
map
;
return
map
;
}
}
public
static
List
<
Credential
>
getCloudCredentials
(
JSONArray
parameters
,
String
tempInputDirPath
)
throws
JSONException
,
FileNotFoundException
,
IOException
,
MyProxyException
,
CertificateEncodingException
,
GSSException
{
public
static
List
<
Credential
>
getCloudCredentials
(
JSONArray
parameters
,
String
tempInputDirPath
)
throws
JSONException
,
FileNotFoundException
,
IOException
,
CertificateEncodingException
,
GSSException
{
List
<
Credential
>
credentials
=
new
ArrayList
<>();
List
<
Credential
>
credentials
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
parameters
.
length
();
i
++)
{
for
(
int
i
=
0
;
i
<
parameters
.
length
();
i
++)
{
JSONObject
param
=
(
JSONObject
)
parameters
.
get
(
i
);
JSONObject
param
=
(
JSONObject
)
parameters
.
get
(
i
);
...
@@ -175,12 +175,13 @@ public class MessageParsing {
...
@@ -175,12 +175,13 @@ public class MessageParsing {
if
(
att
!=
null
&&
att
.
containsKey
(
"myProxyEndpoint"
))
{
if
(
att
!=
null
&&
att
.
containsKey
(
"myProxyEndpoint"
))
{
myProxyEndpoint
=
(
String
)
att
.
get
(
"myProxyEndpoint"
);
myProxyEndpoint
=
(
String
)
att
.
get
(
"myProxyEndpoint"
);
}
}
if
(
myProxyEndpoint
==
null
&&
PropertyValues
.
MY_PROXY_ENDPOINT
!=
null
)
{
myProxyEndpoint
=
PropertyValues
.
MY_PROXY_ENDPOINT
;
}
if
(
myProxyEndpoint
!=
null
)
{
if
(
myProxyEndpoint
!=
null
)
{
String
[]
myVOs
=
((
String
)
att
.
get
(
"vo_names"
)).
split
(
","
);
String
[]
myVOs
=
null
;
List
voNames
=
(
List
)
Arrays
.
asList
(
myVOs
);
List
voNames
=
null
;
if
(
att
!=
null
&&
att
.
containsKey
(
"voms"
))
{
myVOs
=
((
String
)
att
.
get
(
"voms"
)).
split
(
","
);
voNames
=
(
List
)
Arrays
.
asList
(
myVOs
);
}
egi
.
proxyFilePath
=
AAUtils
.
generateProxy
(
cred
.
getAccessKeyId
(),
cred
.
getSecretKey
(),
SOURCE
.
MY_PROXY
,
myProxyEndpoint
,
voNames
);
egi
.
proxyFilePath
=
AAUtils
.
generateProxy
(
cred
.
getAccessKeyId
(),
cred
.
getSecretKey
(),
SOURCE
.
MY_PROXY
,
myProxyEndpoint
,
voNames
);
}
else
{
}
else
{
egi
.
proxyFilePath
=
AAUtils
.
generateProxy
(
cred
.
getAccessKeyId
(),
cred
.
getSecretKey
(),
SOURCE
.
PROXY_FILE
,
myProxyEndpoint
,
null
);
egi
.
proxyFilePath
=
AAUtils
.
generateProxy
(
cred
.
getAccessKeyId
(),
cred
.
getSecretKey
(),
SOURCE
.
PROXY_FILE
,
myProxyEndpoint
,
null
);
...
...
drip-provisioner/src/main/java/nl/uva/sne/drip/drip/provisioner/utils/PropertyValues.java
View file @
f2a98adf
...
@@ -34,7 +34,7 @@ public class PropertyValues {
...
@@ -34,7 +34,7 @@ public class PropertyValues {
public
static
String
HOST
=
"127.0.0.1"
;
public
static
String
HOST
=
"127.0.0.1"
;
public
static
String
TRUSTED_CERTIFICATE_FOLDER
;
public
static
String
TRUSTED_CERTIFICATE_FOLDER
;
public
static
URL
CA_BUNDLE_URL
;
public
static
URL
CA_BUNDLE_URL
;
public
static
String
MY_PROXY_ENDPOINT
=
"myproxy1.egee.cesnet.cz"
;
// public static String MY_PROXY_ENDPOINT
;
public
static
String
DOMAIN_INFO_PATH
=
"etc"
;
public
static
String
DOMAIN_INFO_PATH
=
"etc"
;
public
static
void
setPropertyValues
(
Properties
prop
)
throws
MalformedURLException
{
public
static
void
setPropertyValues
(
Properties
prop
)
throws
MalformedURLException
{
...
@@ -45,8 +45,7 @@ public class PropertyValues {
...
@@ -45,8 +45,7 @@ public class PropertyValues {
CA_BUNDLE_URL
=
new
URL
(
prop
.
getProperty
(
"ca.bundle.url"
,
CA_BUNDLE_URL
=
new
URL
(
prop
.
getProperty
(
"ca.bundle.url"
,
"https://dist.eugridpma.info/distribution/igtf/current/accredited/igtf-preinstalled-bundle-classic.tar.gz"
));
"https://dist.eugridpma.info/distribution/igtf/current/accredited/igtf-preinstalled-bundle-classic.tar.gz"
));
MY_PROXY_ENDPOINT
=
prop
.
getProperty
(
"my.proxy.endpoint"
,
// MY_PROXY_ENDPOINT = prop.getProperty("my.proxy.endpoint");
"myproxy1.egee.cesnet.cz"
);
DOMAIN_INFO_PATH
=
prop
.
getProperty
(
"domain.info.path"
,
DOMAIN_INFO_PATH
=
prop
.
getProperty
(
"domain.info.path"
,
"etc"
);
"etc"
);
...
...
drip-provisioner/src/main/java/nl/uva/sne/drip/drip/provisioner/v1/Consumer.java
View file @
f2a98adf
...
@@ -43,7 +43,7 @@ import nl.uva.sne.drip.drip.provisioner.utils.MessageParsing;
...
@@ -43,7 +43,7 @@ import nl.uva.sne.drip.drip.provisioner.utils.MessageParsing;
import
nl.uva.sne.drip.drip.provisioner.utils.PropertyValues
;
import
nl.uva.sne.drip.drip.provisioner.utils.PropertyValues
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.io.FilenameUtils
;
import
org.apache.commons.io.FilenameUtils
;
import
org.globus.myproxy.MyProxyException
;
//
import org.globus.myproxy.MyProxyException;
import
org.ietf.jgss.GSSException
;
import
org.ietf.jgss.GSSException
;
import
org.json.JSONArray
;
import
org.json.JSONArray
;
import
org.json.JSONException
;
import
org.json.JSONException
;
...
@@ -57,6 +57,7 @@ import provisioning.database.EC2.EC2Database;
...
@@ -57,6 +57,7 @@ import provisioning.database.EC2.EC2Database;
import
provisioning.database.EGI.EGIDatabase
;
import
provisioning.database.EGI.EGIDatabase
;
import
provisioning.database.UserDatabase
;
import
provisioning.database.UserDatabase
;
import
provisioning.engine.TEngine.TEngine
;
import
provisioning.engine.TEngine.TEngine
;
import
provisioning.engine.VEngine.EGI.EGIAgent
;
import
topologyAnalysis.TopologyAnalysisMain
;
import
topologyAnalysis.TopologyAnalysisMain
;
import
topologyAnalysis.dataStructure.SubTopologyInfo
;
import
topologyAnalysis.dataStructure.SubTopologyInfo
;
import
topologyAnalysis.dataStructure.VM
;
import
topologyAnalysis.dataStructure.VM
;
...
@@ -100,7 +101,7 @@ public class Consumer extends DefaultConsumer {
...
@@ -100,7 +101,7 @@ public class Consumer extends DefaultConsumer {
String
response
=
""
;
String
response
=
""
;
try
{
try
{
//The queue only moves bytes so we need to convert them to st
t
ing
//The queue only moves bytes so we need to convert them to st
r
ing
String
message
=
new
String
(
body
,
"UTF-8"
);
String
message
=
new
String
(
body
,
"UTF-8"
);
String
tempInputDirPath
=
System
.
getProperty
(
"java.io.tmpdir"
)
+
File
.
separator
+
"Input-"
+
Long
.
toString
(
System
.
nanoTime
())
+
File
.
separator
;
String
tempInputDirPath
=
System
.
getProperty
(
"java.io.tmpdir"
)
+
File
.
separator
+
"Input-"
+
Long
.
toString
(
System
.
nanoTime
())
+
File
.
separator
;
...
@@ -209,7 +210,7 @@ public class Consumer extends DefaultConsumer {
...
@@ -209,7 +210,7 @@ public class Consumer extends DefaultConsumer {
}
}
userDatabase
=
getUserDB
();
userDatabase
=
getUserDB
();
/*ProvisionRequest pq = new ProvisionRequest();
/*ProvisionRequest pq = new ProvisionRequest();
pq.topologyName = "ec2_zh_b";
pq.topologyName = "ec2_zh_b";
ArrayList<ProvisionRequest> provisionReqs = new ArrayList<ProvisionRequest>();
ArrayList<ProvisionRequest> provisionReqs = new ArrayList<ProvisionRequest>();
...
@@ -467,7 +468,7 @@ public class Consumer extends DefaultConsumer {
...
@@ -467,7 +468,7 @@ public class Consumer extends DefaultConsumer {
return
userDatabase
;
return
userDatabase
;
}
}
private
UserCredential
getUserCredential
(
JSONArray
parameters
,
String
tempInputDirPath
)
throws
JSONException
,
IOException
,
FileNotFoundException
,
MyProxyException
,
CertificateEncodingException
,
GSSException
{
private
UserCredential
getUserCredential
(
JSONArray
parameters
,
String
tempInputDirPath
)
throws
JSONException
,
IOException
,
FileNotFoundException
,
CertificateEncodingException
,
GSSException
{
UserCredential
userCredential
=
new
UserCredential
();
UserCredential
userCredential
=
new
UserCredential
();
List
<
Credential
>
credentials
=
MessageParsing
.
getCloudCredentials
(
parameters
,
tempInputDirPath
);
List
<
Credential
>
credentials
=
MessageParsing
.
getCloudCredentials
(
parameters
,
tempInputDirPath
);
for
(
Credential
cred
:
credentials
)
{
for
(
Credential
cred
:
credentials
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment