Allow setting protocol for internal endpoints

This patch unhardcode protocol on internal endpoints in
keystone.client classes. It may be changed by setting
{service_name}_internal_protocol param on cluster level.

Change-Id: I37f75003f1a30aa8fb944a84f1a7fa603ca1f725
Related-Prod: PROD-17043
diff --git a/keystone/client/service/aodh.yml b/keystone/client/service/aodh.yml
index 51de0ca..c4d49b8 100644
--- a/keystone/client/service/aodh.yml
+++ b/keystone/client/service/aodh.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    aodh_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +26,8 @@
                 internal_address: ${_param:aodh_service_host}
                 internal_port: 8042
                 internal_path: '/'
+                internal_protocol: ${_param:aodh_service_protocol}
+                admin_protocol: ${_param:aodh_service_protocol}
                 admin_address: ${_param:aodh_service_host}
                 admin_port: 8042
                 admin_path: '/'
diff --git a/keystone/client/service/barbican.yml b/keystone/client/service/barbican.yml
index 497eb50..d222fb6 100644
--- a/keystone/client/service/barbican.yml
+++ b/keystone/client/service/barbican.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    barbican_service_protocol: http
   keystone:
     client:
       server:
@@ -31,6 +32,8 @@
                 internal_address: ${_param:barbican_service_host}
                 internal_port: 9311
                 internal_path: '/'
+                internal_protocol: ${_param:barbican_service_protocol}
                 admin_address: ${_param:barbican_service_host}
                 admin_port: 9311
                 admin_path: '/'
+                admin_protocol: ${_param:barbican_service_protocol}
diff --git a/keystone/client/service/billometer.yml b/keystone/client/service/billometer.yml
index 3728aa5..6100dc9 100644
--- a/keystone/client/service/billometer.yml
+++ b/keystone/client/service/billometer.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    billometer_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +26,8 @@
                 internal_address: ${_param:billometer_service_host}
                 internal_port: 9753
                 internal_path: '/v1'
+                internal_protocol: ${_param:billometer_service_protocol}
+                admin_protocol: ${_param:billometer_service_protocol}
                 admin_address: ${_param:billometer_service_host}
                 admin_port: 9753
                 admin_path: '/v1'
diff --git a/keystone/client/service/ceilometer.yml b/keystone/client/service/ceilometer.yml
index 4c59f80..90e0d3e 100644
--- a/keystone/client/service/ceilometer.yml
+++ b/keystone/client/service/ceilometer.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    ceilometer_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +26,8 @@
                 internal_address: ${_param:ceilometer_service_host}
                 internal_port: 8777
                 internal_path: '/'
+                internal_protocol: ${_param:ceilometer_service_protocol}
+                admin_protocol: ${_param:ceilometer_service_protocol}
                 admin_address: ${_param:ceilometer_service_host}
                 admin_port: 8777
                 admin_path: '/'
diff --git a/keystone/client/service/cinder.yml b/keystone/client/service/cinder.yml
index ffb5510..64705e3 100644
--- a/keystone/client/service/cinder.yml
+++ b/keystone/client/service/cinder.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    cinder_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +26,8 @@
                 internal_address: ${_param:cinder_service_host}
                 internal_port: 8776
                 internal_path: '/v1/$(project_id)s'
+                internal_protocol: ${_param:cinder_service_protocol}
+                admin_protocol: ${_param:cinder_service_protocol}
                 admin_address: ${_param:cinder_service_host}
                 admin_port: 8776
                 admin_path: '/v1/$(project_id)s'
diff --git a/keystone/client/service/cinder2.yml b/keystone/client/service/cinder2.yml
index e0e2636..cb289e1 100644
--- a/keystone/client/service/cinder2.yml
+++ b/keystone/client/service/cinder2.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    cinder_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +26,8 @@
                 internal_address: ${_param:cinder_service_host}
                 internal_port: 8776
                 internal_path: '/v2/$(project_id)s'
+                internal_protocol: ${_param:cinder_service_protocol}
+                admin_protocol: ${_param:cinder_service_protocol}
                 admin_address: ${_param:cinder_service_host}
                 admin_port: 8776
                 admin_path: '/v2/$(project_id)s'
diff --git a/keystone/client/service/cinder3.yml b/keystone/client/service/cinder3.yml
index 43a805c..d5e0ae1 100644
--- a/keystone/client/service/cinder3.yml
+++ b/keystone/client/service/cinder3.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    cinder_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +26,8 @@
                 internal_address: ${_param:cinder_service_host}
                 internal_port: 8776
                 internal_path: '/v3/$(project_id)s'
+                internal_protocol: ${_param:cinder_service_protocol}
+                admin_protocol: ${_param:cinder_service_protocol}
                 admin_address: ${_param:cinder_service_host}
                 admin_port: 8776
                 admin_path: '/v3/$(project_id)s'
diff --git a/keystone/client/service/congress.yml b/keystone/client/service/congress.yml
index 529d3ee..49e8337 100644
--- a/keystone/client/service/congress.yml
+++ b/keystone/client/service/congress.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    congress_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +26,8 @@
                 internal_address: ${_param:congress_service_host}
                 internal_port: 1789
                 internal_path: '/'
+                internal_protocol: ${_param:congress_service_protocol}
+                admin_protocol: ${_param:congress_service_protocol}
                 admin_address: ${_param:congress_service_host}
                 admin_port: 1789
                 admin_path: '/'
diff --git a/keystone/client/service/designate.yml b/keystone/client/service/designate.yml
index 4018712..75a588e 100644
--- a/keystone/client/service/designate.yml
+++ b/keystone/client/service/designate.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    designate_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +26,8 @@
                     internal_address: ${_param:designate_service_host}
                     internal_port: 9001
                     internal_path: '/'
+                    internal_protocol: ${_param:designate_service_protocol}
+                    admin_protocol: ${_param:designate_service_protocol}
                     admin_address: ${_param:designate_service_host}
                     admin_port: 9001
                     admin_path: '/'
diff --git a/keystone/client/service/glance.yml b/keystone/client/service/glance.yml
index 365917b..3c0db9c 100644
--- a/keystone/client/service/glance.yml
+++ b/keystone/client/service/glance.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    glance_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +26,8 @@
                 internal_address: ${_param:glance_service_host}
                 internal_port: 9292
                 internal_path: ''
+                internal_protocol: ${_param:glance_service_protocol}
+                admin_protocol: ${_param:glance_service_protocol}
                 admin_address: ${_param:glance_service_host}
                 admin_port: 9292
                 admin_path: ''
diff --git a/keystone/client/service/glare.yml b/keystone/client/service/glare.yml
index 78c7d1f..4534b0e 100644
--- a/keystone/client/service/glare.yml
+++ b/keystone/client/service/glare.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    glare_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +26,8 @@
                 internal_address: ${_param:glance_service_host}
                 internal_port: 9494
                 internal_path: ''
+                internal_protocol: ${_param:glare_service_protocol}
+                admin_protocol: ${_param:glare_service_protocol}
                 admin_address: ${_param:glance_service_host}
                 admin_port: 9494
                 admin_path: ''
diff --git a/keystone/client/service/heat-cfn.yml b/keystone/client/service/heat-cfn.yml
index 343ff46..1a2486a 100644
--- a/keystone/client/service/heat-cfn.yml
+++ b/keystone/client/service/heat-cfn.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    heat_service_protocol: http
   keystone:
     client:
       server:
@@ -18,6 +19,8 @@
                 internal_address: ${_param:heat_service_host}
                 internal_port: 8000
                 internal_path: '/v1'
+                internal_protocol: ${_param:heat_service_protocol}
+                admin_protocol: ${_param:heat_service_protocol}
                 admin_address: ${_param:heat_service_host}
                 admin_port: 8000
                 admin_path: '/v1'
diff --git a/keystone/client/service/heat.yml b/keystone/client/service/heat.yml
index d7eadd5..c8882dd 100644
--- a/keystone/client/service/heat.yml
+++ b/keystone/client/service/heat.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    heat_service_protocol: http
   keystone:
     client:
       server:
@@ -28,6 +29,8 @@
                 internal_address: ${_param:heat_service_host}
                 internal_port: 8004
                 internal_path: '/v1/%(project_id)s'
+                internal_protocol: ${_param:heat_service_protocol}
+                admin_protocol: ${_param:heat_service_protocol}
                 admin_address: ${_param:heat_service_host}
                 admin_port: 8004
                 admin_path: '/v1/%(project_id)s'
diff --git a/keystone/client/service/ironic.yml b/keystone/client/service/ironic.yml
index 1ab9872..e4c384c 100644
--- a/keystone/client/service/ironic.yml
+++ b/keystone/client/service/ironic.yml
@@ -1,6 +1,8 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    keystone_service_protocol: http
+    ironic_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +27,8 @@
                 internal_address: ${_param:ironic_service_host}
                 internal_port: 6385
                 internal_path: ''
+                internal_protocol: ${_param:ironic_service_protocol}
+                admin_protocol: ${_param:ironic_service_protocol}
                 admin_address: ${_param:ironic_service_host}
                 admin_port: 6385
                 admin_path: ''
@@ -36,3 +40,4 @@
             host: ${_param:keystone_service_host}
             port: 5000
             region_name: ${_param:openstack_region}
+            protocol: ${_param:keystone_service_protocol}
diff --git a/keystone/client/service/keystone.yml b/keystone/client/service/keystone.yml
index af3acfc..d9092e0 100644
--- a/keystone/client/service/keystone.yml
+++ b/keystone/client/service/keystone.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    keystone_service_protocol: http
   keystone:
     client:
       server:
@@ -18,6 +19,8 @@
                 internal_address: ${_param:keystone_service_host}
                 internal_port: 5000
                 internal_path: '/v2.0'
+                internal_protocol: ${_param:keystone_service_protocol}
                 admin_address: ${_param:keystone_service_host}
                 admin_port: 35357
                 admin_path: '/v2.0'
+                admin_protocol: ${_param:keystone_service_protocol}
diff --git a/keystone/client/service/keystone3.yml b/keystone/client/service/keystone3.yml
index bd0c63b..5138c4f 100644
--- a/keystone/client/service/keystone3.yml
+++ b/keystone/client/service/keystone3.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    keystone_service_protocol: http
   keystone:
     client:
       server:
@@ -18,6 +19,8 @@
                 internal_address: ${_param:keystone_service_host}
                 internal_port: 5000
                 internal_path: '/v3'
+                internal_protocol: ${_param:keystone_service_protocol}
                 admin_address: ${_param:keystone_service_host}
                 admin_port: 35357
                 admin_path: '/v2.0'
+                admin_protocol: ${_param:keystone_service_protocol}
diff --git a/keystone/client/service/murano.yml b/keystone/client/service/murano.yml
index 5e65038..e6c70f1 100644
--- a/keystone/client/service/murano.yml
+++ b/keystone/client/service/murano.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    murano_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +26,8 @@
                   internal_address: ${_param:murano_service_host}
                   internal_port: 8082
                   internal_path: ''
+                  internal_protocol: ${_param:murano_service_protocol}
+                  admin_protocol: ${_param:murano_service_protocol}
                   admin_address: ${_param:murano_service_host}
                   admin_port: 8082
                   admin_path: ''
diff --git a/keystone/client/service/neutron.yml b/keystone/client/service/neutron.yml
index 12fe9fe..8bec7f2 100644
--- a/keystone/client/service/neutron.yml
+++ b/keystone/client/service/neutron.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    neutron_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +26,8 @@
                 internal_address: ${_param:neutron_service_host}
                 internal_port: 9696
                 internal_path: '/'
+                internal_protocol: ${_param:neutron_service_protocol}
+                admin_protocol: ${_param:neutron_service_protocol}
                 admin_address: ${_param:neutron_service_host}
                 admin_port: 9696
                 admin_path: '/'
diff --git a/keystone/client/service/nova-placement.yml b/keystone/client/service/nova-placement.yml
index 61b5455..3ed0654 100644
--- a/keystone/client/service/nova-placement.yml
+++ b/keystone/client/service/nova-placement.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    nova_service_protocol: http
   keystone:
     client:
       server:
@@ -18,6 +19,8 @@
                 internal_address: ${_param:nova_service_host}
                 internal_port: '8778'
                 internal_path: ''
+                internal_protocol: ${_param:nova_service_protocol}
+                admin_protocol: ${_param:nova_service_protocol}
                 admin_address: ${_param:nova_service_host}
                 admin_port: '8778'
                 admin_path: ''
diff --git a/keystone/client/service/nova.yml b/keystone/client/service/nova.yml
index a0d698b..ca20106 100644
--- a/keystone/client/service/nova.yml
+++ b/keystone/client/service/nova.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    nova_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +26,8 @@
                 internal_address: ${_param:nova_service_host}
                 internal_port: 8774
                 internal_path: '/v2/$(project_id)s'
+                internal_protocol: ${_param:nova_service_protocol}
+                admin_protocol: ${_param:nova_service_protocol}
                 admin_address: ${_param:nova_service_host}
                 admin_port: 8774
                 admin_path: '/v2/$(project_id)s'
diff --git a/keystone/client/service/nova21.yml b/keystone/client/service/nova21.yml
index 328aefd..2782ec2 100644
--- a/keystone/client/service/nova21.yml
+++ b/keystone/client/service/nova21.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    nova_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +26,8 @@
                 internal_address: ${_param:nova_service_host}
                 internal_port: 8774
                 internal_path: '/v2/$(project_id)s'
+                internal_protocol: ${_param:nova_service_protocol}
+                admin_protocol: ${_param:nova_service_protocol}
                 admin_address: ${_param:nova_service_host}
                 admin_port: 8774
                 admin_path: '/v2/$(project_id)s'
@@ -40,6 +43,8 @@
                 internal_address: ${_param:nova_service_host}
                 internal_port: 8774
                 internal_path: '/v2.1/$(project_id)s'
+                internal_protocol: ${_param:nova_service_protocol}
+                admin_protocol: ${_param:nova_service_protocol}
                 admin_address: ${_param:nova_service_host}
                 admin_port: 8774
                 admin_path: '/v2.1/$(project_id)s'
diff --git a/keystone/client/service/octavia.yml b/keystone/client/service/octavia.yml
index 0382345..c08312e 100644
--- a/keystone/client/service/octavia.yml
+++ b/keystone/client/service/octavia.yml
@@ -1,6 +1,8 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    keystone_service_protocol: http
+    octavia_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +27,8 @@
                 internal_address: ${_param:octavia_service_host}
                 internal_port: 9876
                 internal_path: '/'
+                internal_protocol: ${_param:octavia_service_protocol}
+                admin_protocol: ${_param:octavia_service_protocol}
                 admin_address: ${_param:octavia_service_host}
                 admin_port: 9876
                 admin_path: '/'
@@ -37,3 +41,4 @@
             port: 5000
             region_name: ${_param:openstack_region}
             use_keystoneauth: true
+            protocol: ${_param:keystone_service_protocol}
diff --git a/keystone/client/service/radosgw-s3.yml b/keystone/client/service/radosgw-s3.yml
index 06d8299..c97c812 100644
--- a/keystone/client/service/radosgw-s3.yml
+++ b/keystone/client/service/radosgw-s3.yml
@@ -2,6 +2,7 @@
   _param:
     cluster_public_protocol: https
     radosgw_s3_cluster_port: 8081
+    radosgw_service_protocol: http
   keystone:
     client:
       server:
@@ -26,6 +27,8 @@
                   internal_address: ${_param:radosgw_service_host}
                   internal_port: ${_param:radosgw_s3_cluster_port}
                   internal_path: '/'
+                  internal_protocol: ${_param:radosgw_service_protocol}
+                  admin_protocol: ${_param:radosgw_service_protocol}
                   admin_address: ${_param:radosgw_service_host}
                   admin_port: ${_param:radosgw_s3_cluster_port}
                   admin_path: '/'
diff --git a/keystone/client/service/radosgw-swift.yml b/keystone/client/service/radosgw-swift.yml
index 3bf9b27..14a24af 100644
--- a/keystone/client/service/radosgw-swift.yml
+++ b/keystone/client/service/radosgw-swift.yml
@@ -2,6 +2,7 @@
   _param:
     cluster_public_protocol: https
     radosgw_swift_cluster_port: 8081
+    radosgw_service_protocol: http
   keystone:
     client:
       server:
@@ -26,6 +27,8 @@
                   internal_address: ${_param:radosgw_service_host}
                   internal_port: ${_param:radosgw_swift_cluster_port}
                   internal_path: '/swift/v1'
+                  internal_protocol: ${_param:radosgw_service_protocol}
+                  admin_protocol: ${_param:radosgw_service_protocol}
                   admin_address: ${_param:radosgw_service_host}
                   admin_port: ${_param:radosgw_swift_cluster_port}
                   admin_path: '/swift/v1'
diff --git a/keystone/client/service/sahara.yml b/keystone/client/service/sahara.yml
index 84a0b96..b635137 100644
--- a/keystone/client/service/sahara.yml
+++ b/keystone/client/service/sahara.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    sahara_internal_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +26,8 @@
                   internal_address: ${_param:sahara_service_host}
                   internal_port: 8386
                   internal_path: '/v1.1/%(project_id)s'
+                  internal_protocol: ${_param:sahara_internal_protocol}
+                  admin_protocol: ${_param:sahara_internal_protocol}
                   admin_address: ${_param:sahara_service_host}
                   admin_port: 8386
                   admin_path: '/v1.1/%(project_id)s'
diff --git a/keystone/client/service/swift-s3.yml b/keystone/client/service/swift-s3.yml
index 5880487c9..b2769a0 100644
--- a/keystone/client/service/swift-s3.yml
+++ b/keystone/client/service/swift-s3.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    swift_service_protocol: http
   keystone:
     client:
       server:
@@ -26,6 +27,8 @@
                   internal_address: ${_param:swift_service_host}
                   internal_port: 8080
                   internal_path: '/v1/AUTH_%(project_id)s'
+                  internal_protocol: ${_param:swift_service_protocol}
+                  admin_protocol: ${_param:swift_service_protocol}
                   admin_address: ${_param:swift_service_host}
                   admin_port: 8080
                   admin_path: '/'
diff --git a/keystone/client/service/swift.yml b/keystone/client/service/swift.yml
index 781fab9..6f558fb 100644
--- a/keystone/client/service/swift.yml
+++ b/keystone/client/service/swift.yml
@@ -1,6 +1,7 @@
 parameters:
   _param:
     cluster_public_protocol: https
+    swift_service_protocol: http
   keystone:
     client:
       server:
@@ -25,6 +26,8 @@
                   internal_address: ${_param:swift_service_host}
                   internal_port: 8080
                   internal_path: '/v1/AUTH_%(project_id)s'
+                  internal_protocol: ${_param:swift_service_protocol}
+                  admin_protocol: ${_param:swift_service_protocol}
                   admin_address: ${_param:swift_service_host}
                   admin_port: 8080
                   admin_path: '/'