Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Melodic
melodic-integration
Commits
b9fa9323
Commit
b9fa9323
authored
Oct 19, 2021
by
Jan Marchel
Committed by
Marta Różańska
Oct 19, 2021
Browse files
Update .gitlab-ci.yml add parameter to deploy "only: - morphemic-rc2.0" and...
parent
8a4d00a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
connectors/proactive_client/pom.xml
View file @
b9fa9323
...
...
@@ -20,7 +20,7 @@
<dependency>
<groupId>
org.activeeon
</groupId>
<artifactId>
scheduling-abstraction-layer
</artifactId>
<version>
3.
6
-SNAPSHOT
</version>
<version>
3.
7
-SNAPSHOT
</version>
</dependency>
</dependencies>
...
...
mule_esb/mule-integration/src/main/java/cloud/morphemic/mule_integration/proactive/ProactiveClientServiceForIntegrationImpl.java
View file @
b9fa9323
...
...
@@ -22,6 +22,12 @@ public class ProactiveClientServiceForIntegrationImpl extends ProactiveClientSer
super
(
restUrl
,
login
,
password
,
encryptorPassword
);
}
/*Fields that are used only for openstack deployment:
-domain
-identityVersion
-scopePrefix
-scopeVariable
*/
@Override
public
void
callAddClouds
(
@Payload
List
<
Object
>
cloudDefinitions
)
{
log
.
info
(
"ProactiveClientServiceForIntegrationImpl->callAddClouds: cloudDefinitions size= {}"
,
cloudDefinitions
.
size
());
...
...
@@ -32,8 +38,8 @@ public class ProactiveClientServiceForIntegrationImpl extends ProactiveClientSer
for
(
Object
cloudDefinition
:
cloudDefinitions
)
{
cloudJSON
=
new
JSONObject
();
log
.
debug
(
"ProactiveClientServiceForIntegrationImpl->callAddClouds: cloudDefinition: class= {}"
,
cloudDefinition
.
getClass
());
log
.
debug
(
"ProactiveClientServiceForIntegrationImpl->callAddClouds: cloudDefinition: toString= {}"
,
cloudDefinition
.
toString
());
log
.
info
(
"ProactiveClientServiceForIntegrationImpl->callAddClouds: cloudDefinition: class= {}"
,
cloudDefinition
.
getClass
());
log
.
info
(
"ProactiveClientServiceForIntegrationImpl->callAddClouds: cloudDefinition: toString= {}"
,
cloudDefinition
.
toString
());
cloudJSON
.
put
(
"cloudID"
,
MoreObjects
.
firstNonNull
(((
LinkedHashMap
)
cloudDefinition
).
get
(
"id"
),
UUID
.
randomUUID
().
toString
()));
cloudJSON
.
put
(
"cloudType"
,
((
LinkedHashMap
)
cloudDefinition
).
get
(
"cloudType"
));
...
...
@@ -45,47 +51,47 @@ public class ProactiveClientServiceForIntegrationImpl extends ProactiveClientSer
throw
new
RuntimeException
(
"Got cloud definition without credentials - user and secret are required to operate with cloud service provider"
);
}
credentialsJSON
=
new
JSONObject
();
credentialsJSON
.
put
(
"domain"
,
credentials
.
get
(
"domain"
));
credentialsJSON
.
put
(
"user"
,
credentials
.
get
(
"user"
));
credentialsJSON
.
put
(
"secret"
,
credentials
.
get
(
"secret"
));
String
securityGroup
=
null
;
String
nodeGroup
=
null
;
String
domain
=
null
;
String
identityVersion
=
null
;
Integer
identityVersion
;
String
scopePrefix
=
null
;
String
scopeValue
=
null
;
String
defaultNetwork
=
null
;
String
regionBlacklist
=
null
;
Integer
identityVersion
;
String
scopePrefix
;
String
scopeValue
;
JSONObject
scopeJSON
=
new
JSONObject
();
LinkedHashMap
cloudConfiguration
=
(
LinkedHashMap
)((
LinkedHashMap
)
cloudDefinition
).
get
(
"cloudConfiguration"
);
if
(
ObjectUtils
.
isNotEmpty
(
cloudConfiguration
))
{
identityVersion
=
(
cloudConfiguration
.
get
(
"identityVersion"
)
!=
null
)
?
Integer
.
parseInt
((
String
)
cloudConfiguration
.
get
(
"identityVersion"
))
:
null
;
scopePrefix
=
(
cloudConfiguration
.
get
(
"scopePrefix"
)
!=
null
)
?
(
String
)
cloudConfiguration
.
get
(
"scopePrefix"
)
:
null
;
scopeValue
=
(
cloudConfiguration
.
get
(
"scopeValue"
)
!=
null
)
?
(
String
)
cloudConfiguration
.
get
(
"scopeValue"
)
:
null
;
cloudJSON
.
put
(
"identityVersion"
,
identityVersion
);
scopeJSON
.
put
(
"prefix"
,
scopePrefix
);
scopeJSON
.
put
(
"value"
,
scopeValue
);
cloudJSON
.
put
(
"scope"
,
scopeJSON
);
LinkedHashMap
properties
=
(
LinkedHashMap
)
cloudConfiguration
.
get
(
"properties"
);
if
(
ObjectUtils
.
isNotEmpty
(
properties
))
{
securityGroup
=
(
String
)
properties
.
get
(
"securityGroup"
);
identityVersion
=
(
String
)
properties
.
get
(
"identityVersion"
);
domain
=
(
String
)
properties
.
get
(
"credentialsDomain"
);
scopePrefix
=
(
String
)
properties
.
get
(
"scopePrefix"
);
scopeValue
=
(
String
)
properties
.
get
(
"scopeValue"
);
defaultNetwork
=
(
String
)
properties
.
get
(
"defaultNetwork"
);
regionBlacklist
=
(
String
)
properties
.
get
(
"regionBlacklist"
);
}
nodeGroup
=
(
String
)
cloudConfiguration
.
get
(
"nodeGroup"
);
}
cloudJSON
.
put
(
"securityGroup"
,
MoreObjects
.
firstNonNull
(
securityGroup
,
JSONObject
.
NULL
));
cloudJSON
.
put
(
"defaultNetwork"
,
MoreObjects
.
firstNonNull
(
defaultNetwork
,
JSONObject
.
NULL
));
cloudJSON
.
put
(
"blacklist"
,
MoreObjects
.
firstNonNull
(
regionBlacklist
,
JSONObject
.
NULL
));
credentialsJSON
.
put
(
"domain"
,
MoreObjects
.
firstNonNull
(
domain
,
JSONObject
.
NULL
));
cloudJSON
.
put
(
"credentials"
,
credentialsJSON
);
cloudJSON
.
put
(
"identityVersion"
,
MoreObjects
.
firstNonNull
(
identityVersion
,
JSONObject
.
NULL
));
scopeJSON
.
put
(
"prefix"
,
MoreObjects
.
firstNonNull
(
scopePrefix
,
JSONObject
.
NULL
));
scopeJSON
.
put
(
"value"
,
MoreObjects
.
firstNonNull
(
scopeValue
,
JSONObject
.
NULL
));
cloudJSON
.
put
(
"scope"
,
scopeJSON
);
cloudJSON
.
put
(
"nodeGroup"
,
MoreObjects
.
firstNonNull
(
nodeGroup
,
JSONObject
.
NULL
));
cloudsJSONArray
.
put
(
cloudJSON
);
log
.
info
(
cloudsJSONArray
.
toString
());
}
log
.
debug
(
"ProactiveClientServiceForIntegrationImpl->callAddClouds: addClouds->cloudsJSONArray= {}"
,
cloudsJSONArray
.
toString
());
log
.
info
(
"ProactiveClientServiceForIntegrationImpl->callAddClouds: addClouds->cloudsJSONArray= {}"
,
cloudsJSONArray
.
toString
());
log
.
info
(
"ProactiveClientServiceForIntegrationImpl->callAddClouds: cloudsJSONArray length= {}"
,
cloudsJSONArray
.
length
());
int
ret
=
addClouds
(
cloudsJSONArray
);
log
.
info
(
"ProactiveClientServiceForIntegrationImpl->callAddClouds: addClouds returned= {}"
,
ret
);
...
...
Write
Preview
Supports
Markdown
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