Browse code

Merge "Move neutron cache dir into a function"

Jenkins authored on 2013/11/27 03:49:35
Showing 1 changed files
... ...
@@ -17,6 +17,7 @@
17 17
 # - configure_neutron_third_party
18 18
 # - init_neutron_third_party
19 19
 # - start_neutron_third_party
20
+# - create_neutron_cache_dir
20 21
 # - create_nova_conf_neutron
21 22
 # - start_neutron_service_and_check
22 23
 # - create_neutron_initial_network
... ...
@@ -296,6 +297,14 @@ function create_nova_conf_neutron() {
296 296
     fi
297 297
 }
298 298
 
299
+# create_neutron_cache_dir() - Part of the _neutron_setup_keystone() process
300
+function create_neutron_cache_dir() {
301
+    # Create cache dir
302
+    sudo mkdir -p $NEUTRON_AUTH_CACHE_DIR
303
+    sudo chown $STACK_USER $NEUTRON_AUTH_CACHE_DIR
304
+    rm -f $NEUTRON_AUTH_CACHE_DIR/*
305
+}
306
+
299 307
 # create_neutron_accounts() - Set up common required neutron accounts
300 308
 
301 309
 # Tenant               User       Roles
... ...
@@ -782,9 +791,7 @@ function _neutron_setup_keystone() {
782 782
     if [[ -z $skip_auth_cache ]]; then
783 783
         iniset $conf_file $section signing_dir $NEUTRON_AUTH_CACHE_DIR
784 784
         # Create cache dir
785
-        sudo mkdir -p $NEUTRON_AUTH_CACHE_DIR
786
-        sudo chown $STACK_USER $NEUTRON_AUTH_CACHE_DIR
787
-        rm -f $NEUTRON_AUTH_CACHE_DIR/*
785
+        create_neutron_cache_dir
788 786
     fi
789 787
 }
790 788