示例#1
0
from igs.utils import cli
from igs.utils import functional as func

from vappio.webservice import credential

from vappio.tasks.utils import runTaskStatus

from vappio.credentials import manager


OPTIONS = [
    ('cred_name', '', '--cred-name', 'Name of the credential', cli.notNone),
    ('cred_desc', '', '--desc', 'Description of the credential', cli.defaultIfNone('')),
    ('ctype', '', '--ctype', 'Cluster type this cert is for (ec2, nimbus, diag, adhoc, local)',
     cli.restrictValues(['diag', 'nimbus', 'ec2', 'local', 'adhoc'])),
    ('cert', '-c', '--cert', 'Path to cert', func.identity),
    ('pkey', '-p', '--pkey', 'path to private key', func.identity),
    ('devel', '-d', '--devel', 'Path to devel1.pem', func.identity),    
    ('metadata', '-m', '',
     ('Add metadata in a key=value notation.  Multiple options are valid.  '
      'Ex: -m ec2_url=http://foo/bar/zoom -m comment="This works"'),
     cli.defaultIfNone([]),
     cli.LIST),
    ('print_task_name', '-t', '--print-task-name', 'Print the name of the task at the end',
     cli.defaultIfNone(False), cli.BINARY)    
    ]


def main(options, _args):
示例#2
0
from igs.utils import cli
from igs.utils import functional as func

from vappio.webservice import credential

from vappio.tasks.utils import runTaskStatus

from vappio.credentials import manager

OPTIONS = [
    ('cred_name', '', '--cred-name', 'Name of the credential', cli.notNone),
    ('cred_desc', '', '--desc', 'Description of the credential',
     cli.defaultIfNone('')),
    ('ctype', '', '--ctype',
     'Cluster type this cert is for (ec2, nimbus, diag, adhoc, local)',
     cli.restrictValues(['diag', 'nimbus', 'ec2', 'local', 'adhoc'])),
    ('cert', '-c', '--cert', 'Path to cert', func.identity),
    ('pkey', '-p', '--pkey', 'path to private key', func.identity),
    ('devel', '-d', '--devel', 'Path to devel1.pem', func.identity),
    ('metadata', '-m', '',
     ('Add metadata in a key=value notation.  Multiple options are valid.  '
      'Ex: -m ec2_url=http://foo/bar/zoom -m comment="This works"'),
     cli.defaultIfNone([]), cli.LIST),
    ('print_task_name', '-t',
     '--print-task-name', 'Print the name of the task at the end',
     cli.defaultIfNone(False), cli.BINARY)
]


def main(options, _args):
示例#3
0
from vappio.tasks.utils import runTaskStatus


OPTIONS = [
    ('host', '', '--host', 'Host of web services to connect to, defaults to local host', cli.defaultIfNone('localhost')),
    ('cluster',
     '',
     '--cluster',
     'Name of cluster to run this transfer on, --src-cluster and --dst-cluster must be in terms of this clusters perspective',
     cli.defaultIfNone('local')),
    ('tag_name', '', '--tag-name', 'Name of tag to upload', cli.notNone),
    ('src_cluster', '', '--src-cluster', 'Name of source cluster, hardcoded to local for now', cli.defaultIfNone('local')),
    ('dst_cluster', '', '--dst-cluster', 'Name of dest cluster', cli.defaultIfNone('local')),
    ('transfer_type', '', '--transfer-type', 'Type of transfer to do (cluster, s3) default is cluster',
     func.compose(cli.restrictValues(['cluster', 's3']), cli.defaultIfNone('cluster'))),
    ('block', '-b', '--block', 'Block until cluster is up (no longer used)', func.identity, cli.BINARY),
    ('dst_type', '', '--dst-type', 'Set type of destination. (stage,local) default is stage', cli.defaultIfNone('stage')),
    ('compress', '', '--compress', 'Compress files', func.identity, cli.BINARY),
    ('compress_dir', '', '--compress-dir', 'Compress files into the specified directory', cli.defaultIfNone(None)),
    ('expand', '', '--expand', 'Expand files (always on regardless of this right now )', func.identity, cli.BINARY),
    ('print_task_name', '-t', '--print-task-name', 'Print the name of the task at the end', cli.defaultIfNone(False), cli.BINARY),
    ]


def transferBetweenClusters(options):
    return tag.transferTag(options('general.host'),
                           options('general.cluster'),
                           options('general.tag_name'),
                           options('general.src_cluster'),
                           options('general.dst_cluster'),
示例#4
0
OPTIONS = [
    ('host', '', '--host',
     'Host of web services to connect to, defaults to local host',
     cli.defaultIfNone('localhost')),
    ('cluster', '', '--cluster',
     'Name of cluster to run this transfer on, --src-cluster and --dst-cluster must be in terms of this clusters perspective',
     cli.defaultIfNone('local')),
    ('tag_name', '', '--tag-name', 'Name of tag to upload', cli.notNone),
    ('src_cluster', '', '--src-cluster',
     'Name of source cluster, hardcoded to local for now',
     cli.defaultIfNone('local')),
    ('dst_cluster', '', '--dst-cluster', 'Name of dest cluster',
     cli.defaultIfNone('local')),
    ('transfer_type', '', '--transfer-type',
     'Type of transfer to do (cluster, s3) default is cluster',
     func.compose(cli.restrictValues(['cluster', 's3']),
                  cli.defaultIfNone('cluster'))),
    ('block', '-b', '--block', 'Block until cluster is up (no longer used)',
     func.identity, cli.BINARY),
    ('dst_type', '', '--dst-type',
     'Set type of destination. (stage,local) default is stage',
     cli.defaultIfNone('stage')),
    ('compress', '', '--compress', 'Compress files', func.identity,
     cli.BINARY),
    ('compress_dir', '', '--compress-dir',
     'Compress files into the specified directory', cli.defaultIfNone(None)),
    ('expand', '', '--expand',
     'Expand files (always on regardless of this right now )', func.identity,
     cli.BINARY),
    ('print_task_name', '-t',
     '--print-task-name', 'Print the name of the task at the end',