Example #1
0
    def get_registries(self):
        registries = {}
        for identifier, config in self.__read().items():
            registries[identifier] = make_registry(
                config['name'], config['url'], config.get('user', None),
                config.get('password', None))

        return registries
Example #2
0
    def get_registries(self):
        registries = {}

        for row in self.__execute('SELECT * FROM registries;'):
            identifier, name, url, user, password = row
            registries[str(identifier)] = make_registry(
                name, url, user, password)

        return registries
Example #3
0
 def get_registries(self):
     return {
         "1":
         make_registry(
             name=os.environ["DOCKER_REGISTRY_FRONTEND_NAME"],
             url=os.environ["DOCKER_REGISTRY_FRONTEND_URL"],
             user=os.environ["DOCKER_REGISTRY_FRONTEND_USER"],
             password=os.environ["DOCKER_REGISTRY_FRONTEND_PASSWORD"])
     }
Example #4
0
def test_registry_connection():
    url = flask.request.args.get('url')

    try:
        if url and make_registry(None, url).is_online():
            return '', 200
        else:
            return '', 400
    except ValueError:
        return '', 400
def test_registry_connection():
    url = flask.request.form.get('url')
    user = flask.request.form.get('user', None)
    password = flask.request.form.get('password', None)

    try:
        if url and make_registry(None, url, user, password).is_online():
            return '', 200
        else:
            return '', 400
    except ValueError:
        return '', 400