Browse Source

Debian is using python3-designateclient

Change-Id: I55b1d17a2bee2ba4f4b2195c9f58a64c9cad9a77
tags/13.0.0
zhubingbing 1 year ago
parent
commit
96a48ab04b
2 changed files with 12 additions and 2 deletions
  1. 7
    1
      manifests/params.pp
  2. 5
    1
      spec/classes/designate_client_spec.rb

+ 7
- 1
manifests/params.pp View File

@@ -5,9 +5,15 @@
5 5
 class designate::params {
6 6
   include ::openstacklib::defaults
7 7
 
8
+  if ($::os_package_type == 'debian') {
9
+    $pyvers = '3'
10
+  } else {
11
+    $pyvers = ''
12
+  }
13
+
8 14
   $state_path                =  '/var/lib/designate'
9 15
   $log_dir                   =  '/var/log/designate'
10
-  $client_package_name       =  'python-designateclient'
16
+  $client_package_name       =  "python${pyvers}-designateclient"
11 17
   $agent_service_name        = 'designate-agent'
12 18
   $api_service_name          = 'designate-api'
13 19
   $central_service_name      = 'designate-central'

+ 5
- 1
spec/classes/designate_client_spec.rb View File

@@ -49,7 +49,11 @@ describe 'designate::client' do
49 49
       let(:platform_params) do
50 50
         case facts[:osfamily]
51 51
         when 'Debian'
52
-          { :client_package_name => 'python-designateclient' }
52
+          if facts[:os_package_type] == 'debian'
53
+            { :client_package_name => 'python3-designateclient' }
54
+          else
55
+            { :client_package_name => 'python-designateclient' }
56
+          end
53 57
         when 'RedHat'
54 58
           { :client_package_name => 'python-designateclient' }
55 59
         end

Loading…
Cancel
Save