Upload os_client_config to mine during upgrade

Change-Id: I70696748b2b614f5bf1f11b84bea74d365582dea
diff --git a/keystone/upgrade/post/init.sls b/keystone/upgrade/post/init.sls
index 1e6fdbf..04352cb 100644
--- a/keystone/upgrade/post/init.sls
+++ b/keystone/upgrade/post/init.sls
@@ -1,4 +1,4 @@
-{%- from "keystone/map.jinja" import server with context %}
+{%- from "keystone/map.jinja" import server,client with context %}
 
 keystone_post:
   test.show_notification:
@@ -13,3 +13,10 @@
     - onlyif: /bin/false
   {%- endif %}
 {%- endif %}
+
+{%- if client.get('os_client_config', {}).get('enabled') %}
+keystone_delete_os_client_config:
+  module.run:
+    - name: mine.delete
+    - m_fun: keystone_os_client_config
+{%- endif %}
diff --git a/keystone/upgrade/pre/init.sls b/keystone/upgrade/pre/init.sls
index 2ad6ad2..57947d1 100644
--- a/keystone/upgrade/pre/init.sls
+++ b/keystone/upgrade/pre/init.sls
@@ -1,4 +1,4 @@
-{%- from "keystone/map.jinja" import server with context %}
+{%- from "keystone/map.jinja" import server,client with context %}
 
 keystone_pre:
   test.show_notification:
@@ -16,3 +16,14 @@
     - onlyif: /bin/false
   {%- endif %}
 {%- endif %}
+
+{%- if client.get('os_client_config', {}).get('enabled') %}
+keystone_send_os_client_config:
+  module.run:
+    - name: mine.send
+    - func: keystone_os_client_config
+    - kwargs:
+        mine_function: pillar.get
+    - args:
+      - 'keystone:client:os_client_config:cfgs:root:content'
+{%- endif %}