'Create a cluster container deployment object from the
options given through command line.
:param reactor: reactor
:param options: ``ContainerOptions`` container the parsed
options given to the script.'

@classmethod
def from_options(cls, reactor, options):

    try:
        image = DockerImage(repository=options['image'])
        max_size = int(GiB(options['max-size']).to_Byte().value)
        mountpoint = unicode(options['mountpoint'])
        control_node_address = options['control-node']
        timeout = options['wait']
    except Exception as e:
        sys.stderr.write(('%s:    %s\n' % ('Missing    or    wrong    arguments', e)))
        sys.stderr.write(e.args[0])
        sys.stderr.write('\n\n')
        sys.stderr.write(options.getSynopsis())
        sys.stderr.write('\n')
        sys.stderr.write(options.getUsage())
        raise SystemExit(1)
    certificates_path = FilePath(options['cert-directory'])
    cluster_cert = certificates_path.child('cluster.crt')
    user_cert = certificates_path.child('user.crt')
    user_key = certificates_path.child('user.key')
    client = FlockerClient(reactor, control_node_address, REST_API_PORT, cluster_cert, user_cert, user_key)
    return cls(reactor, image, max_size, mountpoint, control_node_address, timeout, cluster_cert, user_cert, user_key, client)
