Remove customized .deb package python-nova out of plugin and remove manifest that installs it

* Remove python-nova.deb package and remove manifest that installs it
* Remove manifest that change plugin repository settings
* Change neutron policy for liberty release from vmware plugin
* Change neutron manifests for work on liberty release

Change-Id: If0c64ae24fd63eb733550669e74cfe0cc83756db
This commit is contained in:
Artem Savinov 2015-10-28 11:23:12 +03:00
parent 5879602dcf
commit ac7f96d72c
11 changed files with 37 additions and 60 deletions

View File

@ -1,7 +0,0 @@
notice('fuel-plugin-nsxv: repo-priority.pp')
# Values are changed by pre_build_hook
class { '::nsxv::repo_priority':
plugin_name => 'NAME',
plugin_version => 'VERSION',
}

View File

@ -1,7 +1,6 @@
notice('MODULAR: openstack-network-controller.pp(fuel-plugin-nsxv patch)')
$core_plugin = 'vmware_nsx.neutron.plugins.vmware.plugin.NsxVPlugin'
$policy_file = '/etc/neutron/policy.d/nsxv.json'
$core_plugin = 'vmware_nsx.plugin.NsxVPlugin'
$neutron_config = hiera_hash('quantum_settings')
$rabbit_hash = hiera_hash('rabbit_hash', {})
@ -133,10 +132,3 @@ class { 'openstack::network':
nova_admin_password => $nova_hash['user_password'],
nova_url => "http://${nova_endpoint}:8774/v2",
}
file { $policy_file:
ensure => file,
source => 'file:///etc/puppet/files/policy.json',
mode => '0644',
require => Class['openstack::network'],
replace => true,
}

View File

@ -0,0 +1,10 @@
{
"create_network_gateway": "rule:admin_or_owner",
"update_network_gateway": "rule:admin_or_owner",
"delete_network_gateway": "rule:admin_or_owner",
"connect_network": "rule:admin_or_owner",
"disconnect_network": "rule:admin_or_owner",
"create_gateway_device": "rule:admin_or_owner",
"update_gateway_device": "rule:admin_or_owner",
"delete_gateway_device": "rule_admin_or_owner"
}

View File

@ -0,0 +1,7 @@
{
"create_router:external_gateway_info:enable_snat": "rule:admin_or_owner",
"create_router:distributed": "rule:admin_or_owner",
"get_router:distributed": "rule:admin_or_owner",
"update_router:external_gateway_info:enable_snat": "rule:admin_or_owner",
"update_router:distributed": "rule:admin_or_owner"
}

View File

@ -1,7 +1,7 @@
class nsxv (
$nsxv_config_dir = '/etc/neutron/plugins/vmware',
$neutron_plugin_file = '/etc/neutron/plugin.ini',
$neutron_plugin_name = 'python-vmware-nsx',
$neutron_plugin_file = '/etc/neutron/plugin.ini',
) {
$quantum_settings = hiera('quantum_settings')
@ -38,6 +38,11 @@ class nsxv (
content => template("${module_name}/nsx.ini.erb"),
require => File[$nsxv_config_dirs],
}
file { '/etc/default/neutron-server':
ensure => file,
content => "CONF_ARG='--config-file ${neutron_plugin_file}'",
}
# need for work db_sync
file { $neutron_plugin_file:
ensure => link,
target => "${nsxv_config_dir}/nsx.ini",

View File

@ -1,17 +1,24 @@
class nsxv::patch_neutron_manifest (
$manifest_file = '/etc/puppet/modules/osnailyfacter/modular/openstack-network/openstack-network-controller.pp',
$policy_file = '/etc/puppet/files/policy.json',
$policy_dir = '/etc/neutron/policy.d'
) {
$neutron_dir = '/etc/neutron'
file { $manifest_file:
ensure => file,
source => "puppet:///modules/${module_name}/openstack-network-controller.pp",
mode => '0644',
replace => true,
}
file { $policy_file:
ensure => file,
source => "puppet:///modules/${module_name}/policy.json",
mode => '0644',
replace => true,
file { $neutron_dir:
ensure => directory,
mode => '0755',
}
file { $policy_dir:
ensure => directory,
mode => '0755',
source => "puppet:///modules/${module_name}/policy.d",
recurse => true,
require => File[$neutron_dir],
}
}

View File

@ -1,28 +0,0 @@
class nsxv::repo_priority (
$plugin_name,
$plugin_version,
) {
if $operatingsystem == 'Ubuntu' {
include apt
$pref_file = "/etc/apt/preferences.d/${plugin_name}-${plugin_version}.pref"
$source_file = "/etc/apt/sources.list.d/${plugin_name}-${plugin_version}.list"
$target_file = "/etc/apt/sources.list.d/1-${plugin_name}.list"
file_line { 'change_priority_to_nsxv_repo ':
path => $pref_file,
line => 'Pin-Priority: 500',
match => '^\s*Pin-Priority.*$',
notify => Exec['apt_update']
}
exec { 'rename_nsxv_repo_file':
path => '/usr/bin:/usr/sbin:/bin',
command => "mv -f ${source_file} ${target_file}",
onlyif => "test ! -e ${target_file}",
provider => shell,
tries => 3,
try_sleep => 10,
notify => Exec['apt_update']
}
}
}

View File

@ -11,5 +11,3 @@ version=$(sed -rn 's/^version:\s*([0-9.])/\1/p' $ROOT/metadata.yaml)
name=$(sed -rn 's/^name:\s*(.*)/\1/p' $ROOT/metadata.yaml)
sed -i "s/NAME/$name/" $ROOT/deployment_scripts/puppet/manifests/hiera-override.pp
sed -i "s/NAME/$name/" $ROOT/deployment_scripts/puppet/manifests/repo-priority.pp
sed -i "s/VERSION/$version/" $ROOT/deployment_scripts/puppet/manifests/repo-priority.pp

View File

@ -1,10 +1,3 @@
- role: ['primary-controller','controller','compute-vmware']
stage: pre_deployment/4010
type: puppet
parameters:
puppet_manifest: puppet/manifests/repo-priority.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 120
- role: ['primary-controller','controller']
stage: pre_deployment/4010
type: puppet