Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
5e4fa5b8
Commit
5e4fa5b8
authored
Jan 13, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
indent
parent
85a9d13e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
util/vpc-tools/abbey.py
+18
-18
No files found.
util/vpc-tools/abbey.py
View file @
5e4fa5b8
...
...
@@ -30,28 +30,28 @@ class MongoConnection:
def
__init__
(
self
):
try
:
mongo
=
MongoClient
(
host
=
args
.
mongo_host
,
port
=
args
.
mongo_port
)
mongo_db
=
getattr
(
mongo
,
args
.
mongo_db
)
if
args
.
mongo_ami_collection
not
in
mongo_db
.
collection_names
():
mongo_db
.
create_collection
(
args
.
mongo_ami_collection
)
if
args
.
mongo_deployment_collection
not
in
mongo_db
.
collection_names
():
mongo_db
.
create_collection
(
args
.
mongo_deployment_collection
)
self
.
mongo_ami
=
getattr
(
mongo_db
,
args
.
mongo_ami_collection
)
self
.
mongo_deployment
=
getattr
(
mongo_db
,
args
.
mongo_deployment_collection
)
self
.
query
=
{
'play'
:
args
.
play
,
'env'
:
args
.
environment
,
'deployment'
:
args
.
deployment
,
'configuration_ref'
:
args
.
configuration_version
,
'configuration_secure_ref'
:
args
.
configuration_secure_version
,
'vars'
:
extra_vars
,
}
except
ConnectionFailure
:
print
"Unable to connect to the mongo database specified"
sys
.
exit
(
1
)
mongo_db
=
getattr
(
mongo
,
args
.
mongo_db
)
if
args
.
mongo_ami_collection
not
in
mongo_db
.
collection_names
():
mongo_db
.
create_collection
(
args
.
mongo_ami_collection
)
if
args
.
mongo_deployment_collection
not
in
mongo_db
.
collection_names
():
mongo_db
.
create_collection
(
args
.
mongo_deployment_collection
)
self
.
mongo_ami
=
getattr
(
mongo_db
,
args
.
mongo_ami_collection
)
self
.
mongo_deployment
=
getattr
(
mongo_db
,
args
.
mongo_deployment_collection
)
self
.
query
=
{
'play'
:
args
.
play
,
'env'
:
args
.
environment
,
'deployment'
:
args
.
deployment
,
'configuration_ref'
:
args
.
configuration_version
,
'configuration_secure_ref'
:
args
.
configuration_secure_version
,
'vars'
:
extra_vars
,
}
def
update_ami
(
self
,
status
,
ami
=
None
):
"""
Creates a new document in the AMI
...
...
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