Extend ironic formula

Add posibility to configure glance section.
Allow to install ironic api in different modes,
different policy.json files are applied:
 * deploy - only heartbeat and lookup endpoints are allowed
 * public - all except heartbeat and lookup is allowed
 * mixed - all is allowed (single node case)
Update message_queue and database addresses

Change-Id: I5d711649d88ad2b185947a1bb423fe5ad81f4c9b
diff --git a/metadata/service/api/cluster.yml b/metadata/service/api/cluster.yml
index c6a5002..5e07a47 100644
--- a/metadata/service/api/cluster.yml
+++ b/metadata/service/api/cluster.yml
@@ -3,6 +3,7 @@
 parameters:
   ironic:
     api:
+      api_type: ${_param:ironic_api_type}
       enabled: true
       version: ${_param:ironic_version}
       bind:
@@ -15,10 +16,10 @@
         user: openstack
         password: ${_param:rabbitmq_openstack_password}
         virtual_host: '/openstack'
-        host: ${_param:cluster_vip_address}
+        host: ${_param:openstack_message_queue_address}
       database:
         engine: mysql
-        host: ${_param:cluster_vip_address}
+        host: ${_param:openstack_database_address}
         port: 3306
         name: ironic
         user: ironic
diff --git a/metadata/service/api/single.yml b/metadata/service/api/single.yml
index 936f250..3765d85 100644
--- a/metadata/service/api/single.yml
+++ b/metadata/service/api/single.yml
@@ -3,6 +3,7 @@
 parameters:
   ironic:
     api:
+      api_type: 'mixed'
       enabled: true
       version: ${_param:ironic_version}
       bind:
diff --git a/metadata/service/conductor/cluster.yml b/metadata/service/conductor/cluster.yml
index 49360f7..5726304 100644
--- a/metadata/service/conductor/cluster.yml
+++ b/metadata/service/conductor/cluster.yml
@@ -5,16 +5,17 @@
     conductor:
       enabled: true
       version: ${_param:ironic_version}
+      my_ip: ${_param:cluster_baremetal_local_address}
       message_queue:
         engine: rabbitmq
         port: 5672
         user: openstack
         password: ${_param:rabbitmq_openstack_password}
         virtual_host: '/openstack'
-        host: ${_param:cluster_vip_address}
+        host: ${_param:openstack_message_queue_address}
       database:
         engine: mysql
-        host: ${_param:cluster_vip_address}
+        host: ${_param:openstack_database_address}
         port: 3306
         name: ironic
         user: ironic
@@ -32,18 +33,35 @@
         project_domain_id: default
         protocol: 'http'
       neutron:
+        auth_strategy: keystone
+        auth_type: password
         cleaning_network: baremetal
         provisioning_network: baremetal
         project_domain_id: ${ironic:conductor:identity:project_domain_id}
         user_domain_id: ${ironic:conductor:identity:user_domain_id}
+        project_name: ${ironic:conductor:identity:tenant}
         password: ${ironic:conductor:identity:password}
         username: ${ironic:conductor:identity:user}
+        url: http://${_param:neutron_service_host}:9696
+      glance:
+        auth_strategy: 'keystone'
+        auth_type: password
+        host: ${_param:cluster_vip_address}
+        port: 9292
+        region: ${_param:openstack_region}
+        username: glance
+        tenant: service
+        project_name: service
+        project_domain_name: Default
+        user_domain_name: Default
+        password: ${_param:keystone_glance_password}
       enabled_drivers:
         - agent_ipmitool
+        - pxe_ipmitool
         - fake
       automated_clean: false
-      http_url: 'http://${_param:cluster_vip_address}'
-      api_url: 'http://${_param:cluster_vip_address}:6385'
+      http_url: 'http://${_param:cluster_baremetal_local_address}'
+      api_url: 'http://${_param:cluster_vip_baremtal_address}:6385'
       pxe_config_template: '$pybasedir/drivers/modules/ipxe_config.template'
       pxe_bootfile_name: '/undionly.kpxe'
       ipxe_enabled: true