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
ece0b4bf
Commit
ece0b4bf
authored
7 years ago
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implemented ansible output
parent
17993265
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
639 additions
and
0 deletions
+639
-0
DeployService.java
.../main/java/nl/uva/sne/drip/api/service/DeployService.java
+1
-0
AnsibleOutput.java
.../uva/sne/drip/data/v1/external/ansible/AnsibleOutput.java
+75
-0
AnsibleResult.java
.../uva/sne/drip/data/v1/external/ansible/AnsibleResult.java
+89
-0
AnsibleResult_.java
...uva/sne/drip/data/v1/external/ansible/AnsibleResult_.java
+154
-0
Invocation.java
.../nl/uva/sne/drip/data/v1/external/ansible/Invocation.java
+75
-0
ModuleArgs.java
.../nl/uva/sne/drip/data/v1/external/ansible/ModuleArgs.java
+245
-0
No files found.
drip-api/src/main/java/nl/uva/sne/drip/api/service/DeployService.java
View file @
ece0b4bf
...
@@ -227,6 +227,7 @@ public class DeployService {
...
@@ -227,6 +227,7 @@ public class DeployService {
}
}
if
(
name
.
equals
(
"ansible_output"
))
{
if
(
name
.
equals
(
"ansible_output"
))
{
String
value
=
p
.
getValue
();
String
value
=
p
.
getValue
();
System
.
err
.
println
(
value
);
}
}
}
}
save
(
deployResponse
);
save
(
deployResponse
);
...
...
This diff is collapsed.
Click to expand it.
drip-api/src/main/java/nl/uva/sne/drip/data/v1/external/ansible/AnsibleOutput.java
0 → 100644
View file @
ece0b4bf
/*
* Copyright 2017 S. Koulouzis, Wang Junchao, Huan Zhou, Yang Hu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
nl
.
uva
.
sne
.
drip
.
data
.
v1
.
external
.
ansible
;
/**
*
* @author S. Koulouzis
*/
import
java.util.HashMap
;
import
java.util.Map
;
import
com.fasterxml.jackson.annotation.JsonAnyGetter
;
import
com.fasterxml.jackson.annotation.JsonAnySetter
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonPropertyOrder
;
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
@JsonPropertyOrder
({
"host"
,
"result"
})
public
class
AnsibleOutput
{
@JsonProperty
(
"host"
)
private
String
host
;
@JsonProperty
(
"result"
)
private
AnsibleResult
result
;
@JsonIgnore
private
Map
<
String
,
Object
>
additionalProperties
=
new
HashMap
<
String
,
Object
>();
@JsonProperty
(
"host"
)
public
String
getHost
()
{
return
host
;
}
@JsonProperty
(
"host"
)
public
void
setHost
(
String
host
)
{
this
.
host
=
host
;
}
@JsonProperty
(
"result"
)
public
AnsibleResult
getAnsiibleResult
()
{
return
result
;
}
@JsonProperty
(
"result"
)
public
void
setAnsiibleResult
(
AnsibleResult
result
)
{
this
.
result
=
result
;
}
@JsonAnyGetter
public
Map
<
String
,
Object
>
getAdditionalProperties
()
{
return
this
.
additionalProperties
;
}
@JsonAnySetter
public
void
setAdditionalProperty
(
String
name
,
Object
value
)
{
this
.
additionalProperties
.
put
(
name
,
value
);
}
}
This diff is collapsed.
Click to expand it.
drip-api/src/main/java/nl/uva/sne/drip/data/v1/external/ansible/AnsibleResult.java
0 → 100644
View file @
ece0b4bf
/*
* Copyright 2017 S. Koulouzis, Wang Junchao, Huan Zhou, Yang Hu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
nl
.
uva
.
sne
.
drip
.
data
.
v1
.
external
.
ansible
;
/**
*
* @author S. Koulouzis
*/
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.fasterxml.jackson.annotation.JsonAnyGetter
;
import
com.fasterxml.jackson.annotation.JsonAnySetter
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonPropertyOrder
;
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
@JsonPropertyOrder
({
"msg"
,
"changed"
,
"results"
})
public
class
AnsibleResult
{
@JsonProperty
(
"msg"
)
private
String
msg
;
@JsonProperty
(
"changed"
)
private
Boolean
changed
;
@JsonProperty
(
"results"
)
private
List
<
AnsibleResult_
>
results
=
null
;
@JsonIgnore
private
Map
<
String
,
Object
>
additionalProperties
=
new
HashMap
<
String
,
Object
>();
@JsonProperty
(
"msg"
)
public
String
getMsg
()
{
return
msg
;
}
@JsonProperty
(
"msg"
)
public
void
setMsg
(
String
msg
)
{
this
.
msg
=
msg
;
}
@JsonProperty
(
"changed"
)
public
Boolean
getChanged
()
{
return
changed
;
}
@JsonProperty
(
"changed"
)
public
void
setChanged
(
Boolean
changed
)
{
this
.
changed
=
changed
;
}
@JsonProperty
(
"results"
)
public
List
<
AnsibleResult_
>
getAnsibleResults
()
{
return
results
;
}
@JsonProperty
(
"results"
)
public
void
setAnsibleResults
(
List
<
AnsibleResult_
>
results
)
{
this
.
results
=
results
;
}
@JsonAnyGetter
public
Map
<
String
,
Object
>
getAdditionalProperties
()
{
return
this
.
additionalProperties
;
}
@JsonAnySetter
public
void
setAdditionalProperty
(
String
name
,
Object
value
)
{
this
.
additionalProperties
.
put
(
name
,
value
);
}
}
This diff is collapsed.
Click to expand it.
drip-api/src/main/java/nl/uva/sne/drip/data/v1/external/ansible/AnsibleResult_.java
0 → 100644
View file @
ece0b4bf
/*
* Copyright 2017 S. Koulouzis, Wang Junchao, Huan Zhou, Yang Hu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
nl
.
uva
.
sne
.
drip
.
data
.
v1
.
external
.
ansible
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.fasterxml.jackson.annotation.JsonAnyGetter
;
import
com.fasterxml.jackson.annotation.JsonAnySetter
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonPropertyOrder
;
/**
*
* @author S. Koulouzis
*/
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
@JsonPropertyOrder
({
"_ansible_parsed"
,
"changed"
,
"_ansible_no_log"
,
"cache_updated"
,
"_ansible_item_result"
,
"item"
,
"invocation"
,
"cache_update_time"
})
public
class
AnsibleResult_
{
@JsonProperty
(
"_ansible_parsed"
)
private
Boolean
ansibleParsed
;
@JsonProperty
(
"changed"
)
private
Boolean
changed
;
@JsonProperty
(
"_ansible_no_log"
)
private
Boolean
ansibleNoLog
;
@JsonProperty
(
"cache_updated"
)
private
Boolean
cacheUpdated
;
@JsonProperty
(
"_ansible_item_result"
)
private
Boolean
ansibleItemAnsibleResult
;
@JsonProperty
(
"item"
)
private
List
<
String
>
item
=
null
;
@JsonProperty
(
"invocation"
)
private
Invocation
invocation
;
@JsonProperty
(
"cache_update_time"
)
private
Integer
cacheUpdateTime
;
@JsonIgnore
private
Map
<
String
,
Object
>
additionalProperties
=
new
HashMap
<
String
,
Object
>();
@JsonProperty
(
"_ansible_parsed"
)
public
Boolean
getAnsibleParsed
()
{
return
ansibleParsed
;
}
@JsonProperty
(
"_ansible_parsed"
)
public
void
setAnsibleParsed
(
Boolean
ansibleParsed
)
{
this
.
ansibleParsed
=
ansibleParsed
;
}
@JsonProperty
(
"changed"
)
public
Boolean
getChanged
()
{
return
changed
;
}
@JsonProperty
(
"changed"
)
public
void
setChanged
(
Boolean
changed
)
{
this
.
changed
=
changed
;
}
@JsonProperty
(
"_ansible_no_log"
)
public
Boolean
getAnsibleNoLog
()
{
return
ansibleNoLog
;
}
@JsonProperty
(
"_ansible_no_log"
)
public
void
setAnsibleNoLog
(
Boolean
ansibleNoLog
)
{
this
.
ansibleNoLog
=
ansibleNoLog
;
}
@JsonProperty
(
"cache_updated"
)
public
Boolean
getCacheUpdated
()
{
return
cacheUpdated
;
}
@JsonProperty
(
"cache_updated"
)
public
void
setCacheUpdated
(
Boolean
cacheUpdated
)
{
this
.
cacheUpdated
=
cacheUpdated
;
}
@JsonProperty
(
"_ansible_item_result"
)
public
Boolean
getAnsibleItemAnsibleResult
()
{
return
ansibleItemAnsibleResult
;
}
@JsonProperty
(
"_ansible_item_result"
)
public
void
setAnsibleItemAnsibleResult
(
Boolean
ansibleItemAnsibleResult
)
{
this
.
ansibleItemAnsibleResult
=
ansibleItemAnsibleResult
;
}
@JsonProperty
(
"item"
)
public
List
<
String
>
getItem
()
{
return
item
;
}
@JsonProperty
(
"item"
)
public
void
setItem
(
List
<
String
>
item
)
{
this
.
item
=
item
;
}
@JsonProperty
(
"invocation"
)
public
Invocation
getInvocation
()
{
return
invocation
;
}
@JsonProperty
(
"invocation"
)
public
void
setInvocation
(
Invocation
invocation
)
{
this
.
invocation
=
invocation
;
}
@JsonProperty
(
"cache_update_time"
)
public
Integer
getCacheUpdateTime
()
{
return
cacheUpdateTime
;
}
@JsonProperty
(
"cache_update_time"
)
public
void
setCacheUpdateTime
(
Integer
cacheUpdateTime
)
{
this
.
cacheUpdateTime
=
cacheUpdateTime
;
}
@JsonAnyGetter
public
Map
<
String
,
Object
>
getAdditionalProperties
()
{
return
this
.
additionalProperties
;
}
@JsonAnySetter
public
void
setAdditionalProperty
(
String
name
,
Object
value
)
{
this
.
additionalProperties
.
put
(
name
,
value
);
}
}
This diff is collapsed.
Click to expand it.
drip-api/src/main/java/nl/uva/sne/drip/data/v1/external/ansible/Invocation.java
0 → 100644
View file @
ece0b4bf
/*
* Copyright 2017 S. Koulouzis, Wang Junchao, Huan Zhou, Yang Hu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
nl
.
uva
.
sne
.
drip
.
data
.
v1
.
external
.
ansible
;
/**
*
* @author S. Koulouzis
*/
import
java.util.HashMap
;
import
java.util.Map
;
import
com.fasterxml.jackson.annotation.JsonAnyGetter
;
import
com.fasterxml.jackson.annotation.JsonAnySetter
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonPropertyOrder
;
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
@JsonPropertyOrder
({
"module_name"
,
"module_args"
})
public
class
Invocation
{
@JsonProperty
(
"module_name"
)
private
String
moduleName
;
@JsonProperty
(
"module_args"
)
private
ModuleArgs
moduleArgs
;
@JsonIgnore
private
Map
<
String
,
Object
>
additionalProperties
=
new
HashMap
<
String
,
Object
>();
@JsonProperty
(
"module_name"
)
public
String
getModuleName
()
{
return
moduleName
;
}
@JsonProperty
(
"module_name"
)
public
void
setModuleName
(
String
moduleName
)
{
this
.
moduleName
=
moduleName
;
}
@JsonProperty
(
"module_args"
)
public
ModuleArgs
getModuleArgs
()
{
return
moduleArgs
;
}
@JsonProperty
(
"module_args"
)
public
void
setModuleArgs
(
ModuleArgs
moduleArgs
)
{
this
.
moduleArgs
=
moduleArgs
;
}
@JsonAnyGetter
public
Map
<
String
,
Object
>
getAdditionalProperties
()
{
return
this
.
additionalProperties
;
}
@JsonAnySetter
public
void
setAdditionalProperty
(
String
name
,
Object
value
)
{
this
.
additionalProperties
.
put
(
name
,
value
);
}
}
This diff is collapsed.
Click to expand it.
drip-api/src/main/java/nl/uva/sne/drip/data/v1/external/ansible/ModuleArgs.java
0 → 100644
View file @
ece0b4bf
/*
* Copyright 2017 S. Koulouzis, Wang Junchao, Huan Zhou, Yang Hu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
nl
.
uva
.
sne
.
drip
.
data
.
v1
.
external
.
ansible
;
/**
*
* @author S. Koulouzis
*/
import
java.util.HashMap
;
import
java.util.Map
;
import
com.fasterxml.jackson.annotation.JsonAnyGetter
;
import
com.fasterxml.jackson.annotation.JsonAnySetter
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonPropertyOrder
;
import
java.util.List
;
@JsonInclude
(
JsonInclude
.
Include
.
NON_NULL
)
@JsonPropertyOrder
({
"dpkg_options"
,
"autoremove"
,
"force"
,
"name"
,
"install_recommends"
,
"package"
,
"purge"
,
"allow_unauthenticated"
,
"state"
,
"upgrade"
,
"update_cache"
,
"deb"
,
"only_upgrade"
,
"default_release"
,
"cache_valid_time"
})
public
class
ModuleArgs
{
@JsonProperty
(
"dpkg_options"
)
private
String
dpkgOptions
;
@JsonProperty
(
"autoremove"
)
private
Boolean
autoremove
;
@JsonProperty
(
"force"
)
private
Boolean
force
;
@JsonProperty
(
"name"
)
private
List
<
String
>
name
=
null
;
@JsonProperty
(
"install_recommends"
)
private
Object
installRecommends
;
@JsonProperty
(
"package"
)
private
List
<
String
>
_package
=
null
;
@JsonProperty
(
"purge"
)
private
Boolean
purge
;
@JsonProperty
(
"allow_unauthenticated"
)
private
Boolean
allowUnauthenticated
;
@JsonProperty
(
"state"
)
private
String
state
;
@JsonProperty
(
"upgrade"
)
private
Object
upgrade
;
@JsonProperty
(
"update_cache"
)
private
Boolean
updateCache
;
@JsonProperty
(
"deb"
)
private
Object
deb
;
@JsonProperty
(
"only_upgrade"
)
private
Boolean
onlyUpgrade
;
@JsonProperty
(
"default_release"
)
private
Object
defaultRelease
;
@JsonProperty
(
"cache_valid_time"
)
private
Integer
cacheValidTime
;
@JsonIgnore
private
Map
<
String
,
Object
>
additionalProperties
=
new
HashMap
<
String
,
Object
>();
@JsonProperty
(
"dpkg_options"
)
public
String
getDpkgOptions
()
{
return
dpkgOptions
;
}
@JsonProperty
(
"dpkg_options"
)
public
void
setDpkgOptions
(
String
dpkgOptions
)
{
this
.
dpkgOptions
=
dpkgOptions
;
}
@JsonProperty
(
"autoremove"
)
public
Boolean
getAutoremove
()
{
return
autoremove
;
}
@JsonProperty
(
"autoremove"
)
public
void
setAutoremove
(
Boolean
autoremove
)
{
this
.
autoremove
=
autoremove
;
}
@JsonProperty
(
"force"
)
public
Boolean
getForce
()
{
return
force
;
}
@JsonProperty
(
"force"
)
public
void
setForce
(
Boolean
force
)
{
this
.
force
=
force
;
}
@JsonProperty
(
"name"
)
public
List
<
String
>
getName
()
{
return
name
;
}
@JsonProperty
(
"name"
)
public
void
setName
(
List
<
String
>
name
)
{
this
.
name
=
name
;
}
@JsonProperty
(
"install_recommends"
)
public
Object
getInstallRecommends
()
{
return
installRecommends
;
}
@JsonProperty
(
"install_recommends"
)
public
void
setInstallRecommends
(
Object
installRecommends
)
{
this
.
installRecommends
=
installRecommends
;
}
@JsonProperty
(
"package"
)
public
List
<
String
>
getPackage
()
{
return
_package
;
}
@JsonProperty
(
"package"
)
public
void
setPackage
(
List
<
String
>
_package
)
{
this
.
_package
=
_package
;
}
@JsonProperty
(
"purge"
)
public
Boolean
getPurge
()
{
return
purge
;
}
@JsonProperty
(
"purge"
)
public
void
setPurge
(
Boolean
purge
)
{
this
.
purge
=
purge
;
}
@JsonProperty
(
"allow_unauthenticated"
)
public
Boolean
getAllowUnauthenticated
()
{
return
allowUnauthenticated
;
}
@JsonProperty
(
"allow_unauthenticated"
)
public
void
setAllowUnauthenticated
(
Boolean
allowUnauthenticated
)
{
this
.
allowUnauthenticated
=
allowUnauthenticated
;
}
@JsonProperty
(
"state"
)
public
String
getState
()
{
return
state
;
}
@JsonProperty
(
"state"
)
public
void
setState
(
String
state
)
{
this
.
state
=
state
;
}
@JsonProperty
(
"upgrade"
)
public
Object
getUpgrade
()
{
return
upgrade
;
}
@JsonProperty
(
"upgrade"
)
public
void
setUpgrade
(
Object
upgrade
)
{
this
.
upgrade
=
upgrade
;
}
@JsonProperty
(
"update_cache"
)
public
Boolean
getUpdateCache
()
{
return
updateCache
;
}
@JsonProperty
(
"update_cache"
)
public
void
setUpdateCache
(
Boolean
updateCache
)
{
this
.
updateCache
=
updateCache
;
}
@JsonProperty
(
"deb"
)
public
Object
getDeb
()
{
return
deb
;
}
@JsonProperty
(
"deb"
)
public
void
setDeb
(
Object
deb
)
{
this
.
deb
=
deb
;
}
@JsonProperty
(
"only_upgrade"
)
public
Boolean
getOnlyUpgrade
()
{
return
onlyUpgrade
;
}
@JsonProperty
(
"only_upgrade"
)
public
void
setOnlyUpgrade
(
Boolean
onlyUpgrade
)
{
this
.
onlyUpgrade
=
onlyUpgrade
;
}
@JsonProperty
(
"default_release"
)
public
Object
getDefaultRelease
()
{
return
defaultRelease
;
}
@JsonProperty
(
"default_release"
)
public
void
setDefaultRelease
(
Object
defaultRelease
)
{
this
.
defaultRelease
=
defaultRelease
;
}
@JsonProperty
(
"cache_valid_time"
)
public
Integer
getCacheValidTime
()
{
return
cacheValidTime
;
}
@JsonProperty
(
"cache_valid_time"
)
public
void
setCacheValidTime
(
Integer
cacheValidTime
)
{
this
.
cacheValidTime
=
cacheValidTime
;
}
@JsonAnyGetter
public
Map
<
String
,
Object
>
getAdditionalProperties
()
{
return
this
.
additionalProperties
;
}
@JsonAnySetter
public
void
setAdditionalProperty
(
String
name
,
Object
value
)
{
this
.
additionalProperties
.
put
(
name
,
value
);
}
}
This diff is collapsed.
Click to expand it.
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