From 74245e13ecf075ce82f1f5903edce7b8026d5566 Mon Sep 17 00:00:00 2001 From: wangxiyuan Date: Mon, 6 Nov 2017 15:08:54 +0800 Subject: [PATCH] Policy in code: Update the related doc This patch update the policy file generator guide. And remove the realted action in devstack as well. Change-Id: I7bd6aabe1d05245a1203380863c0444f6ea021f6 bp: policy-and-docs-in-code --- devstack/plugin.sh | 4 ---- etc/README-policy.json.sample | 8 ++++++++ etc/policy.json.sample | 3 --- 3 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 etc/README-policy.json.sample delete mode 100644 etc/policy.json.sample diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 21c9c590c..6fbc55770 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -75,10 +75,6 @@ function configure_zaqar { [ ! -d $ZAQAR_CONF_DIR ] && sudo mkdir -m 755 -p $ZAQAR_CONF_DIR sudo chown $USER $ZAQAR_CONF_DIR - if [[ -f $ZAQAR_DIR/etc/policy.json.sample ]]; then - cp -p $ZAQAR_DIR/etc/policy.json.sample $ZAQAR_POLICY_CONF - fi - [ ! -d $ZAQAR_API_LOG_DIR ] && sudo mkdir -m 755 -p $ZAQAR_API_LOG_DIR sudo chown $USER $ZAQAR_API_LOG_DIR diff --git a/etc/README-policy.json.sample b/etc/README-policy.json.sample new file mode 100644 index 000000000..96bb1edc1 --- /dev/null +++ b/etc/README-policy.json.sample @@ -0,0 +1,8 @@ +To generate the sample policy.yaml file, run the following command from the top +level of the zaqar directory: + tox -egenpolicy + +Or run the command directly: + oslopolicy-sample-generator --config-file etc/oslo-config-generator/zaqar-policy-generator.conf +The output file will be in etc folder, named "zaqar.policy.yaml.sample" by +default. \ No newline at end of file diff --git a/etc/policy.json.sample b/etc/policy.json.sample deleted file mode 100644 index f5ff0c931..000000000 --- a/etc/policy.json.sample +++ /dev/null @@ -1,3 +0,0 @@ -{ - "default": "rule:admin_or_owner" -}