git://git.onelab.eu
/
plstackapi.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Set backend status when saving backend version of object
[plstackapi.git]
/
planetstack
/
ec2_observer
/
aws_lib.py
1
import os
2
import json
3
4
class AwsException(Exception):
5
pass
6
7
def aws_run(cmd):
8
cmd = 'aws %s'%cmd
9
pipe = os.popen(cmd)
10
output_str = pipe.read()
11
12
if (not pipe.close()):
13
output = json.loads(output_str)
14
return output
15
else:
16
raise AwsException("Error running command: %s"%cmd)
17
18