@utils.arg('-s', '--spec-file', metavar='<SPEC_FILE>', required=True,
           help=_('The spec file used to create the policy.'))
@utils.arg('name', metavar='<NAME>',
           help=_('Name of the policy to create.'))
def do_policy_create(service, args):
    show_deprecated('senlin policy-create', 'openstack cluster policy create')
    spec = utils.get_spec_content(args.spec_file)
    attrs = {
        'name': args.name,
        'spec': spec,
    }

    policy = service.create_policy(**attrs)
    _show_policy(service, policy.id)
Create a policy.
dataset/ETHPy150Open openstack/python-senlinclient/senlinclient/v1/shell.py/do_policy_create