@utils.arg('--manifest-url',
           metavar='<manifest-url>',
           help='Name/URL of the replication controller file to use for '
                'creating replication controllers.')
@utils.arg('--manifest',
           metavar='<manifest>',
           help='File path of the replication controller file to use for '
                'creating replication controllers.')
@utils.arg('--bay',
           required=True,
           metavar='<bay>',
           help='ID or name of the bay.')
def do_rc_create(cs, args):
    bay = cs.bays.get(args.bay)
    if bay.status not in ['CREATE_COMPLETE', 'UPDATE_COMPLETE']:
        raise exceptions.InvalidAttribute(
            'Bay status for %s is: %s. We cannot create a '
            'replication controller in bay until the status '
            'is CREATE_COMPLETE or UPDATE_COMPLETE.' %
            (args.bay, bay.status))

    opts = {}
    opts['manifest_url'] = args.manifest_url
    opts['bay_uuid'] = bay.uuid

    if args.manifest is not None and os.path.isfile(args.manifest):
        with open(args.manifest, 'r') as f:
            opts['manifest'] = f.read()

    rc = cs.rcs.create(**opts)
    _show_rc(rc)
Create a replication controller.
dataset/ETHPy150Open openstack/python-magnumclient/magnumclient/v1/replicationcontrollers_shell.py/do_rc_create