#!/usr/bin/python

import sys
import boto.sdb

if len(sys.argv) != 3:
    print "must supply cluster and hostname to remove"
    sys.exit(1)

cluster = sys.argv[1]
hostname = sys.argv[2]
print "Removing hostname %s from cluster %s:" % (hostname, cluster)

sdb = boto.sdb.connect_to_region("us-east-1")
ii = sdb.lookup("InstanceIdentity", validate=True)

result = sdb.select(
    'InstanceIdentity',
    'select * from InstanceIdentity where (appId="%s" or appId="%s-dead") and hostname="%s"'
    % (cluster, cluster, hostname))
for l in result:
    print "Removing Item %s: " % l.name
    ii.delete_item(l)
#!/usr/bin/python

import boto.sdb
import sys
from pprint import pprint

sdb = boto.sdb.connect_to_region("us-east-1")
result = sdb.select('PriamProperties', 'select * from PriamProperties')

for l in result:
  sys.stdout.write("Item %s: " % l.name)
  pprint(l)

Beispiel #3
0
#!/usr/bin/python

import sys
import boto.sdb

if len(sys.argv) != 2:
    print "must supply cluster to remove"
    sys.exit(1)

cluster = sys.argv[1]
print "Removing cluster %s:" % cluster

sdb = boto.sdb.connect_to_region("us-east-1")
ii = sdb.lookup("InstanceIdentity", validate=True)

result = sdb.select(
    'InstanceIdentity',
    'select * from InstanceIdentity where appId="%s" or appId="%s-dead"' %
    (cluster, cluster))
for l in result:
    print "Removing Item %s: " % l.name
    ii.delete_item(l)
#!/usr/bin/python

import sys
import boto.sdb

if len(sys.argv) != 2:
  print "must supply cluster to remove"
  sys.exit(1)

cluster = sys.argv[1]
print "Removing cluster %s:" % cluster

sdb = boto.sdb.connect_to_region("us-east-1")
ii = sdb.lookup("InstanceIdentity", validate=True)

result = sdb.select('InstanceIdentity', 'select * from InstanceIdentity where appId="%s" or appId="%s-dead"' % (cluster, cluster))
for l in result:
  print "Removing Item %s: " % l.name
  ii.delete_item(l)

Beispiel #5
0
#!/usr/bin/python

import boto.sdb
import sys
from pprint import pprint

sdb = boto.sdb.connect_to_region("us-east-1")
result = sdb.select('InstanceIdentity', 'select * from InstanceIdentity')

for l in result:
    sys.stdout.write("Item %s: " % l.name)
    pprint(l)
#!/usr/bin/python

import sys
import boto.sdb

if len(sys.argv) != 2:
    print "must supply cluster to remove"
    sys.exit(1)

cluster = sys.argv[1]
print "Removing cluster %s:" % cluster

sdb = boto.sdb.connect_to_region("us-east-1")
pp = sdb.lookup("PriamProperties", validate=True)

result = sdb.select(
    'PriamProperties',
    'select * from PriamProperties where appId="%s" or appId="%s-dead"' %
    (cluster, cluster))
for l in result:
    print "Removing Item %s: " % l.name
    pp.delete_item(l)
#!/usr/bin/python

import boto.sdb
import sys
from pprint import pprint

sdb = boto.sdb.connect_to_region("us-east-1")
result = sdb.select('InstanceIdentity', 'select * from InstanceIdentity')

for l in result:
  sys.stdout.write("Item %s: " % l.name)
  pprint(l)

Beispiel #8
0
#!/usr/bin/python

import boto.sdb
import sys
from pprint import pprint

sdb = boto.sdb.connect_to_region("us-east-1")
result = sdb.select('PriamProperties', 'select * from PriamProperties')

for l in result:
    sys.stdout.write("Item %s: " % l.name)
    pprint(l)