config/sysinv/sysinv/sysinv/sysinv/helm/memcached.py
Chris Friesen 7fafb8477b Switch non-OpenStack helm charts to "BaseHelm" base class
The mariadb and memcached charts are not really part of OpenStack
itself, so change them to use the "BaseHelm" base class instead of
the "OpenstackBaseHelm" base class.

Change-Id: I4a74eb96bd2191eaf28573c1feda801b966e6d27
Story: 2003909
Task: 27086
Signed-off-by: Chris Friesen <chris.friesen@windriver.com>
2018-10-18 16:42:08 -06:00

40 lines
1010 B
Python

#
# Copyright (c) 2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
from sysinv.common import constants
from sysinv.common import exception
from sysinv.openstack.common import log as logging
from . import common
from . import base
LOG = logging.getLogger(__name__)
class MemcachedHelm(base.BaseHelm):
"""Class to encapsulate helm operations for the memcached chart"""
CHART = constants.HELM_CHART_MEMCACHED
SUPPORTED_NAMESPACES = [
common.HELM_NS_OPENSTACK
]
def get_namespaces(self):
return self.SUPPORTED_NAMESPACES
def get_overrides(self, namespace=None):
overrides = {
common.HELM_NS_OPENSTACK: {
}
}
if namespace in self.SUPPORTED_NAMESPACES:
return overrides[namespace]
elif namespace:
raise exception.InvalidHelmNamespace(chart=self.CHART,
namespace=namespace)
else:
return overrides