Drop undercloud_heat_plugins

We don't support installed heat in undercloud anymore.

Depends-On: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/839498
Depends-On: https://review.rdoproject.org/r/c/openstack/tripleo-common-distgit/+/42300
Change-Id: I9b757a47f73ccf1bc9234a606c4f546d0f31542e
This commit is contained in:
rabi 2022-04-27 15:03:36 +05:30 committed by Rabi Mishra
parent 8898142b33
commit 11d0164ed7
5 changed files with 0 additions and 128 deletions

View File

@ -40,7 +40,6 @@ scripts =
scripts/upload-artifacts
data_files =
lib/heat/undercloud_heat_plugins = undercloud_heat_plugins/*
share/tripleo-common/container-images = container-images/*
share/tripleo-common/image-yaml = image-yaml/*
share/tripleo-common/healthcheck = healthcheck/*

View File

@ -1,30 +0,0 @@
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from heat.engine.resources.openstack.heat import software_deployment
from heat.engine.resources.openstack.heat import structured_config
class SoftwareDeployment(software_deployment.SoftwareDeployment):
"""A custom subclass to allow reverting replacement."""
class StructuredDeployment(structured_config.StructuredDeployment):
"""A custom subclass to allow reverting replacement."""
def resource_mapping():
return {
'OS::TripleO::Heat::SoftwareDeployment': SoftwareDeployment,
'OS::TripleO::Heat::StructuredDeployment': StructuredDeployment
}

View File

@ -1,61 +0,0 @@
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import copy
from heat.engine.resources.openstack.neutron import net
from heat.engine.resources.openstack.neutron import port
from heat.engine.resources.openstack.neutron import subnet
def _copy_schema_immutable(schema):
new_schema = copy.deepcopy(schema)
if not schema.update_allowed:
new_schema.immutable = True
return new_schema
class ImmutableNet(net.Net):
'''Ensure an existing net doesn't change.'''
properties_schema = {
k: _copy_schema_immutable(v)
for k, v in net.Net.properties_schema.items()
}
class ImmutablePort(port.Port):
'''Ensure an existing port doesn't change.'''
properties_schema = {
k: _copy_schema_immutable(v)
for k, v in port.Port.properties_schema.items()
}
class ImmutableSubnet(subnet.Subnet):
'''Ensure an existing subnet doesn't change.'''
properties_schema = {
k: _copy_schema_immutable(v)
for k, v in subnet.Subnet.properties_schema.items()
}
def resource_mapping():
return {
'OS::Neutron::Net': ImmutableNet,
'OS::Neutron::Port': ImmutablePort,
'OS::Neutron::Subnet': ImmutableSubnet,
}

View File

@ -1,36 +0,0 @@
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from heat.engine.resources.openstack.nova import server
class ServerUpdateAllowed(server.Server):
'''Prevent any properties changes from replacing an existing server.
'''
update_allowed_properties = server.Server.properties_schema.keys()
def needs_replace_with_prop_diff(self, changed_properties_set,
after_props, before_props):
return False
def handle_update(self, json_snippet, tmpl_diff, prop_diff):
prop_diff.pop(self.IMAGE, None)
return super(ServerUpdateAllowed, self).handle_update(json_snippet,
tmpl_diff,
prop_diff)
def resource_mapping():
return {'OS::Nova::Server': ServerUpdateAllowed}