'Constructor
Args:
installation_parameters [InstallationParameters] if None then use default
bindings [YamlBindings] Allows bindings to be explicitly injected for
testing. Otherwise they are loaded on demand.'

def __init__(self, installation_parameters=None, bindings=None):

    if (not installation_parameters):
        installation_parameters = InstallationParameters()
        if os.geteuid():
            installed_bindings = yaml_util.load_bindings(installation_parameters.INSTALLED_CONFIG_DIR, installation_parameters.USER_CONFIG_DIR, only_if_local=True)
            user_config = os.path.join(os.environ['HOME'], '.spinnaker')
            personal_path = os.path.join(user_config, 'spinnaker-local.yml')
            deck_dir = installation_parameters.DECK_INSTALL_DIR
            if os.path.exists(personal_path):
                if (installed_bindings is not None):
                    sys.stderr.write('WARNING:    You    have    both    personal    and    system    Spinnaker    configurations    on    this    machine.\nChoosing    the    personal    configuration    in    "{path}".\n'.format(path=user_config))
                deck_dir = os.path.join(os.environ.get('PWD', '.'), 'deck')
                if (not os.path.exists(deck_dir)):
                    raise RuntimeError('To    use    a    personal    configuration,    this    program    must    be    run    from    your    top-level    build    directory    that    you    cloned    the    repositories    to.\nWe    assume    you    are    a    developer    since    you    have    a    $HOME/.spinnaker    directory.    If    you    meant    to    operate    on    the    installed    Spinnaker,    run    this    with    sudo.')
            installation_parameters.INSTALLED_CONFIG_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../config'))
            installation_parameters.USER_CONFIG_DIR = user_config
            installation_parameters.DECK_INSTALL_DIR = deck_dir
    self.__installation = installation_parameters
    self.__bindings = bindings
    self.load_environment_variables()
