Browse Source

Use --subproject instead of deprecated --service option

The --service option to neutron-db-manage is deprecated and will be
removed soon. Use --subproject instead.

Related-Bug: #1501380

Change-Id: Idf3cbd65a49c676a0f90c0e49684e738e16e659b
Henry Gessau 2 years ago
parent
commit
e80cd7f645
2 changed files with 9 additions and 9 deletions
  1. 3
    3
      recipes/db_migration.rb
  2. 6
    6
      spec/db_migration_spec.rb

+ 3
- 3
recipes/db_migration.rb View File

@@ -33,7 +33,7 @@ end
33 33
 bash 'migrate vpnaas database' do
34 34
   only_if { node['openstack']['network_vpnaas']['enabled'] }
35 35
   timeout timeout
36
-  migrate_command = "neutron-db-manage --service vpnaas --config-file /etc/neutron/neutron.conf --config-file #{plugin_config_file}"
36
+  migrate_command = "neutron-db-manage --subproject neutron-vpnaas --config-file /etc/neutron/neutron.conf --config-file #{plugin_config_file}"
37 37
   code <<-EOF
38 38
 #{migrate_command} upgrade head
39 39
 EOF
@@ -43,7 +43,7 @@ end
43 43
 bash 'migrate fwaas database' do
44 44
   only_if { node['openstack']['network_fwaas']['enabled'] }
45 45
   timeout timeout
46
-  migrate_command = "neutron-db-manage --service fwaas --config-file /etc/neutron/neutron.conf --config-file #{plugin_config_file}"
46
+  migrate_command = "neutron-db-manage --subproject neutron-fwaas --config-file /etc/neutron/neutron.conf --config-file #{plugin_config_file}"
47 47
   code <<-EOF
48 48
 #{migrate_command} upgrade head
49 49
 EOF
@@ -53,7 +53,7 @@ end
53 53
 bash 'migrate lbaas database' do
54 54
   only_if { node['openstack']['network_lbaas']['enabled'] }
55 55
   timeout timeout
56
-  migrate_command = "neutron-db-manage --service lbaas --config-file /etc/neutron/neutron.conf --config-file #{plugin_config_file}"
56
+  migrate_command = "neutron-db-manage --subproject neutron-lbaas --config-file /etc/neutron/neutron.conf --config-file #{plugin_config_file}"
57 57
   code <<-EOF
58 58
 #{migrate_command} upgrade head
59 59
 EOF

+ 6
- 6
spec/db_migration_spec.rb View File

@@ -32,7 +32,7 @@ describe 'openstack-network::db_migration' do
32 32
         node.set['openstack']['network']['core_plugin_config_file'] = '/etc/neutron/plugins/ml2/ml2_conf.ini'
33 33
       end
34 34
       it 'uses db upgrade head when vpnaas is enabled' do
35
-        migrate_cmd = %r{neutron-db-manage --service vpnaas --config-file /etc/neutron/neutron.conf|
35
+        migrate_cmd = %r{neutron-db-manage --subproject neutron-vpnaas --config-file /etc/neutron/neutron.conf|
36 36
           --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head}
37 37
         expect(chef_run).to run_bash('migrate vpnaas database').with(
38 38
           code: migrate_cmd,
@@ -40,7 +40,7 @@ describe 'openstack-network::db_migration' do
40 40
         )
41 41
       end
42 42
       it 'uses db upgrade head when lbaas is enabled' do
43
-        migrate_cmd = %r{neutron-db-manage --service lbaas --config-file /etc/neutron/neutron.conf|
43
+        migrate_cmd = %r{neutron-db-manage --subproject neutron-lbaas --config-file /etc/neutron/neutron.conf|
44 44
         --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head}
45 45
         expect(chef_run).to run_bash('migrate lbaas database').with(
46 46
           code: migrate_cmd,
@@ -48,7 +48,7 @@ describe 'openstack-network::db_migration' do
48 48
         )
49 49
       end
50 50
       it 'uses db upgrade head when fwaas is enabled' do
51
-        migrate_cmd = %r{neutron-db-manage --service fwaas --config-file /etc/neutron/neutron.conf|
51
+        migrate_cmd = %r{neutron-db-manage --subproject neutron-fwaas --config-file /etc/neutron/neutron.conf|
52 52
         --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head}
53 53
         expect(chef_run).to run_bash('migrate fwaas database').with(
54 54
           code: migrate_cmd,
@@ -62,7 +62,7 @@ describe 'openstack-network::db_migration' do
62 62
       end
63 63
 
64 64
       it 'does not use db upgrade head when vpnaas is not enabled' do
65
-        migrate_cmd = %r{neutron-db-manage --service vpnaas --config-file /etc/neutron/neutron.conf|
65
+        migrate_cmd = %r{neutron-db-manage --subproject neutron-vpnaas --config-file /etc/neutron/neutron.conf|
66 66
           --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head}
67 67
         expect(chef_run).not_to run_bash('migrate vpnaas database').with(
68 68
           code: migrate_cmd,
@@ -71,7 +71,7 @@ describe 'openstack-network::db_migration' do
71 71
       end
72 72
 
73 73
       it 'does not use db upgrade head when fwaas is not enabled' do
74
-        migrate_cmd = %r{neutron-db-manage --service fwaas --config-file /etc/neutron/neutron.conf|
74
+        migrate_cmd = %r{neutron-db-manage --subproject neutron-fwaas --config-file /etc/neutron/neutron.conf|
75 75
           --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head}
76 76
         expect(chef_run).not_to run_bash('migrate fwaas database').with(
77 77
           code: migrate_cmd,
@@ -80,7 +80,7 @@ describe 'openstack-network::db_migration' do
80 80
       end
81 81
 
82 82
       it 'does not use db upgrade head when lbaas is not enabled' do
83
-        migrate_cmd = %r{neutron-db-manage --service lbaas --config-file /etc/neutron/neutron.conf|
83
+        migrate_cmd = %r{neutron-db-manage --subproject neutron-lbaas --config-file /etc/neutron/neutron.conf|
84 84
           --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head}
85 85
         expect(chef_run).not_to run_bash('migrate lbaas database').with(
86 86
           code: migrate_cmd,

Loading…
Cancel
Save