File: //usr/libexec/oracle-cloud-agent/plugins/osms/oci_agent_utils/config.pyc
a
���f� � @ sZ d Z ddlZddlZddlZddlmZ ddlZedddg�Zddd�ZG d d
� d
�Z dS )zD
Get a config object by calling config.from_file("/path/to/config")
� N)�Enum�OS�Windows�Linuxc C s
t | |�S �N)�Config)�filename�operating_system� r
�F/sparta/input/python_modules/oci_agent_utils/oci_agent_utils/config.py� from_file s r c @ sf e Zd ZdZi ZdZddd�Zdd� Zddd�Zd d
� Z dd� Z
d
d� Zdd� Zdd� Z
ddd�ZdS )r a�
This class loads the configuration from a yaml file and stores the
dictionary representation in memory. The main purpose is to separate
config from the implementation to allow alter settings after installation.
If no config file is specified, the config is assumed to be the file 'config.yml' in a platform-specific directory.
On Windows, the config file will be assumed located along with the agent
executable; on Linux, the config will be assumed located in: /etc/oracle-cloud-agent
The default config is packed accordingly in OS specific build. To update
config file location, please also update the build script accordingly.
NOTE: Use get_config function in the module, to avoid multiple copies of the same object.
Nc C s<