
manage
******


boto.manage
===========


boto.manage.cmdshell
====================

class class boto.manage.cmdshell.FakeServer(instance, ssh_key_file)

   A little class to fake out SSHClient (which is expecting a
   :class`boto.manage.server.Server` instance.  This allows us to

class class boto.manage.cmdshell.LocalClient(server, host_key_file=None, uname='root')

   close()

   exists(path)

   get_file(src, dst)

   isdir(path)

   listdir(path)

   put_file(src, dst)

   run()

   shell()

class class boto.manage.cmdshell.SSHClient(server, host_key_file='~/.ssh/known_hosts', uname='root', timeout=None, ssh_pwd=None)

   close()

   connect(num_retries=5)

   exists(path)

   get_file(src, dst)

   isdir(path)

   listdir(path)

   open(filename, mode='r', bufsize=-1)

      Open a file on the remote system and return a file-like object.

   open_sftp()

   put_file(src, dst)

   run(command)

      Execute a command on the remote host.  Return a tuple containing
      an integer status and two strings, the first containing stdout
      and the second containing stderr from the command.

   run_pty(command)

      Execute a command on the remote host with a pseudo-terminal.
      Returns a string containing the output of the command.

   shell()

      Start an interactive shell session on the remote host.

boto.manage.cmdshell.sshclient_from_instance(instance, ssh_key_file, host_key_file='~/.ssh/known_hosts', user_name='root', ssh_pwd=None)

   Create and return an SSHClient object given an instance object.

   Parameters:
      * **instance** (*:class`boto.ec2.instance.Instance` object*) --
        The instance object.

      * **ssh_key_file** (*str*) -- A path to the private key file
        used to log into instance.

      * **host_key_file** (*str*) -- A path to the known_hosts file
        used by the SSH client. Defaults to ~/.ssh/known_hosts

      * **user_name** (*str*) -- The username to use when logging into
        the instance.  Defaults to root.

      * **ssh_pwd** (*str*) -- The passphrase, if any, associated with
        private key.

boto.manage.cmdshell.start(server)


boto.manage.propget
===================

boto.manage.propget.get(prop, choices=None)


boto.manage.server
==================

High-level abstraction of an EC2 server

class class boto.manage.server.Bundler(server, uname='root')

   bundle(bucket=None, prefix=None, key_file=None, cert_file=None, size=None, ssh_key=None, fp=None, clear_history=True)

   bundle_image(prefix, size, ssh_key)

   copy_x509(key_file, cert_file)

   upload_bundle(bucket, prefix, ssh_key)

class class boto.manage.server.CommandLineGetter

   get(cls, params)

   get_ami_id(params)

   get_ami_list()

   get_description(params)

   get_group(params)

   get_instance_type(params)

   get_key(params)

   get_name(params)

   get_quantity(params)

   get_region(params)

   get_zone(params)

class class boto.manage.server.Server(id=None, **kw)

   classmethod add_credentials(cfg, aws_access_key_id, aws_secret_access_key)

   ami_id = None

   console_output = None

   classmethod create(config_file=None, logical_volume=None, cfg=None, **params)

      Create a new instance based on the specified configuration file
      or the specified configuration and the passed in parameters.

      If the config_file argument is not None, the configuration is
      read from there. Otherwise, the cfg argument is used.

      The config file may include other config files with a #import
      reference. The included config files must reside in the same
      directory as the specified file.

      The logical_volume argument, if supplied, will be used to get
      the current physical volume ID and use that as an override of
      the value specified in the config file. This may be useful for
      debugging purposes when you want to debug with a production
      config file but a test Volume.

      The dictionary argument may be used to override any EC2
      configuration values in the config file.

   classmethod create_from_current_instances()

   classmethod create_from_instance_id(instance_id, name, description='')

   delete()

   description = None

   elastic_ip = None

   get_bundler(uname='root')

   get_cmdshell()

   get_ssh_client(uname='root', ssh_pwd=None)

   get_ssh_key_file()

   groups = None

   hostname = None

   install(pkg)

   instance_id = None

   instance_type = None

   key_name = None

   launch_time = None

   name = None

   packages = []

   plugins = []

   private_hostname = None

   production = None

   put()

   reboot()

   region_name = None

   reset_cmdshell()

   run(command)

   security_group = None

   status = None

   stop()

   terminate()

   wait()

   zone = None


boto.manage.task
================

class class boto.manage.task.Task(id=None, **kw)

   A scheduled, repeating task that can be executed by any
   participating servers. The scheduling is similar to cron jobs.
   Each task has an hour attribute. The allowable values for hour are
   [0-23|*].

   To keep the operation reasonably efficient and not cause excessive
   polling, the minimum granularity of a Task is hourly.  Some
   examples:

      hour='*' - the task would be executed each hour hour='3' - the
      task would be executed at 3AM GMT each day.

   check()

      Determine how long until the next scheduled time for a Task.
      Returns the number of seconds until the next scheduled time or
      zero if the task needs to be run immediately. If it's an hourly
      task and it's never been run, run it now. If it's a daily task
      and it's never been run and the hour is right, run it now.

   command = None

   hour = None

   last_executed = None

   last_output = None

   last_status = None

   message_id = None

   name = None

   run(msg, vtimeout=60)

   start(queue_name)

   classmethod start_all(queue_name)

class class boto.manage.task.TaskPoller(queue_name)

   poll(wait=60, vtimeout=60)

boto.manage.task.check_hour(val)


boto.manage.volume
==================

class class boto.manage.volume.CommandLineGetter

   get(cls, params)

   get_device(params)

   get_mount_point(params)

   get_name(params)

   get_region(params)

   get_size(params)

   get_zone(params)

class class boto.manage.volume.Volume(id=None, **kw)

   archive()

   attach(server=None)

   attachment_state = None

   checkfs(use_cmd=None)

   copy(snapshot)

   classmethod create(**params)

   create_from_latest_snapshot(name, size=None)

   create_from_snapshot(name, snapshot, size=None)

   classmethod create_from_volume_id(region_name, volume_id, name)

   delete(delete_ebs_volume=False)

   detach(force=False)

   device = None

   format()

   freeze()

   get_ec2_connection()

   get_snapshot_from_date(date)

   get_snapshot_range(snaps, start_date=None, end_date=None)

   get_snapshots()

      Returns a list of all completed snapshots for this volume ID.

   grow(size)

   install_xfs()

   make_ready(server)

   mount()

   mount_point = None

   name = None

   past_volume_ids = None

   region_name = None

   server = None

   size = None

   snapshot()

   trim_snapshots(delete=False)

      Trim the number of snapshots for this volume.  This method
      always keeps the oldest snapshot.  It then uses the parameters
      passed in to determine how many others should be kept.

      The algorithm is to keep all snapshots from the current day.
      Then it will keep the first snapshot of the day for the previous
      seven days. Then, it will keep the first snapshot of the week
      for the previous four weeks.  After than, it will keep the first
      snapshot of the month for as many months as there are.

   unfreeze()

   volume_id = None

   volume_state = None

   wait()

   zone_name = None
