# Path: armada/const.py
# DOCUMENT_CHART = 'armada/Chart/v1'
# DOCUMENT_GROUP = 'armada/ChartGroup/v1'
# DOCUMENT_MANIFEST = 'armada/Manifest/v1'
# KEYWORD_ARMADA = 'armada'
# KEYWORD_PREFIX = 'release_prefix'
# KEYWORD_GROUPS = 'chart_groups'
# KEYWORD_CHARTS = 'chart_group'
# KEYWORD_RELEASE = 'release'
# DEFAULT_CHART_TIMEOUT = 3600
# STATUS_DEPLOYED = 'DEPLOYED'
# STATUS_FAILED = 'FAILED'
# DEFAULT_K8S_TIMEOUT = 300
# CONFIG_PATH = '/etc/armada'
# 
# Path: armada/exceptions/override_exceptions.py
# class OverrideException(base_exception.ArmadaBaseException):
# class InvalidOverrideTypeException(OverrideException):
# class InvalidOverrideFileException(OverrideException):
# class InvalidOverrideValueException(OverrideException):
# class UnknownDocumentOverrideException(OverrideException):
#     def __init__(self, override_type):
#     def __init__(self, filename):
#     def __init__(self, override_command):
#     def __init__(self, doc_type, doc_name):
# 
# Path: armada/utils/validate.py
# LOG = logging.getLogger(__name__)
# SCHEMAS = {}
# def _get_schema_dir():
# def _load_schemas():
# def _validate_armada_manifest(manifest):
# def validate_armada_manifests(documents):
# def validate_armada_document(document):
# def validate_armada_documents(documents):
# def validate_manifest_url(value):
# def validate_manifest_filepath(value):


import collections
import json
import yaml
from armada import const
from armada.exceptions import override_exceptions
from armada.utils import validate
                    'metadata', {}).get('name') == ovr.get('metadata', {}).get(
                        'name'):
                self.update(doc.get('data', {}), ovr.get('data', {}))
                return

    def update_armada_manifest(self, ovr):
        for doc in self.documents:
            if doc.get('schema') == const.DOCUMENT_MANIFEST and doc.get(
                    'metadata', {}).get('name') == ovr.get('metadata', {}).get(
                        'name'):
                self.update(doc.get('data', {}), ovr.get('data', {}))
                return

    def update_manifests(self):

        if self.values:
            for value in self.values:
                merging_values = self._load_yaml_file(value)
                self.update_document(merging_values)
        if self.overrides:
            for override in self.overrides:
                new_value = override.split('=')[1]
                doc_path = override.split('=')[0].split(":")
                data_path = doc_path.pop().split('.')

                self.override_manifest_value(doc_path, data_path, new_value)

        try:
            validate.validate_armada_documents(self.documents)
        except Exception:

# Path: armada/const.py
# DOCUMENT_CHART = 'armada/Chart/v1'
# DOCUMENT_GROUP = 'armada/ChartGroup/v1'
# DOCUMENT_MANIFEST = 'armada/Manifest/v1'
# KEYWORD_ARMADA = 'armada'
# KEYWORD_PREFIX = 'release_prefix'
# KEYWORD_GROUPS = 'chart_groups'
# KEYWORD_CHARTS = 'chart_group'
# KEYWORD_RELEASE = 'release'
# DEFAULT_CHART_TIMEOUT = 3600
# STATUS_DEPLOYED = 'DEPLOYED'
# STATUS_FAILED = 'FAILED'
# DEFAULT_K8S_TIMEOUT = 300
# CONFIG_PATH = '/etc/armada'
# 
# Path: armada/exceptions/override_exceptions.py
# class OverrideException(base_exception.ArmadaBaseException):
# class InvalidOverrideTypeException(OverrideException):
# class InvalidOverrideFileException(OverrideException):
# class InvalidOverrideValueException(OverrideException):
# class UnknownDocumentOverrideException(OverrideException):
#     def __init__(self, override_type):
#     def __init__(self, filename):
#     def __init__(self, override_command):
#     def __init__(self, doc_type, doc_name):
# 
# Path: armada/utils/validate.py
# LOG = logging.getLogger(__name__)
# SCHEMAS = {}
# def _get_schema_dir():
# def _load_schemas():
# def _validate_armada_manifest(manifest):
# def validate_armada_manifests(documents):
# def validate_armada_document(document):
# def validate_armada_documents(documents):
# def validate_manifest_url(value):
# def validate_manifest_filepath(value):


# Path: armada/handlers/override.py
import collections
import json
import yaml
from armada import const
from armada.exceptions import override_exceptions
from armada.utils import validate

                    'metadata', {}).get('name') == ovr.get('metadata', {}).get(
                        'name'):
                self.update(doc.get('data', {}), ovr.get('data', {}))
                return

    def update_armada_manifest(self, ovr):
        for doc in self.documents:
            if doc.get('schema') == const.DOCUMENT_MANIFEST and doc.get(
                    'metadata', {}).get('name') == ovr.get('metadata', {}).get(
                        'name'):
                self.update(doc.get('data', {}), ovr.get('data', {}))
                return

    def update_manifests(self):

        if self.values:
            for value in self.values:
                merging_values = self._load_yaml_file(value)
                self.update_document(merging_values)
        if self.overrides:
            for override in self.overrides:
                new_value = override.split('=')[1]
                doc_path = override.split('=')[0].split(":")
                data_path = doc_path.pop().split('.')

                self.override_manifest_value(doc_path, data_path, new_value)

        try:
            validate.validate_armada_documents(self.documents)
        except Exception:

            raise override_exceptions.InvalidOverrideValueException(