Exemplo n.º 1
0
    def parse_sync_group(self, user_input):
        """
        Overridden from ImporterConfigMixin to add the skip option

        :param user_input: keyword arguments from the CLI framework containing user input
        :type  user_input: dict

        :return: suitable representation of the config that can be stored on the repo
        :rtype:  dict
        """
        config = super(RpmRepoUpdateCommand, self).parse_sync_group(user_input)
        safe_parse(user_input, config, repo_options.OPT_SKIP.keyword, CONFIG_KEY_SKIP)
        return config
Exemplo n.º 2
0
    def parse_sync_group(self, user_input):
        """
        Overridden from ImporterConfigMixin to add the skip option

        :param user_input: keyword arguments from the CLI framework containing user input
        :type  user_input: dict

        :return: suitable representation of the config that can be stored on the repo
        :rtype:  dict
        """
        config = super(RpmRepoUpdateCommand, self).parse_sync_group(user_input)
        safe_parse(user_input, config, repo_options.OPT_SKIP.keyword, CONFIG_KEY_SKIP)
        return config
Exemplo n.º 3
0
    def parse_sync_group(self, user_input):
        """
        Overridden from ImporterConfigMixin to add the skip option

        :param user_input: keyword arguments from the CLI framework containing
        user input
        :type  user_input: dict

        :return: suitable representation of the config that can be stored on
        the repo
        :rtype:  dict
        """
        config = super(PkgRepoUpdateCommand, self).parse_sync_group(user_input)
        safe_parse(user_input, config,
                   self.options_bundle.opt_releases.keyword,
                   CONFIG_KEY_RELEASES)
        safe_parse(user_input, config,
                   self.options_bundle.opt_components.keyword,
                   CONFIG_KEY_COMPONENTS)
        safe_parse(user_input, config,
                   self.options_bundle.opt_architectures.keyword,
                   CONFIG_KEY_ARCHITECTURES)
        safe_parse(user_input, config, repo_options.OPT_SKIP.keyword,
                   CONFIG_KEY_SKIP)
        return config
Exemplo n.º 4
0
    def _parse_distributor_config(self, user_input):
        """
        Generate an ISODistributor configuration based on the given parameters (user input).

        :param user_input: The keys and values passed to the CLI by the user
        :type  user_input: dict
        """
        key_tuples = (
            (constants.CONFIG_SERVE_HTTP, self.opt_http.keyword),
            (constants.CONFIG_SERVE_HTTPS, self.opt_https.keyword),
            (constants.CONFIG_SSL_AUTH_CA_CERT, self.opt_auth_ca.keyword),
        )

        config = {}
        for config_key, input_key in key_tuples:
            safe_parse(user_input, config, input_key, config_key)

        arg_utils.convert_file_contents((constants.CONFIG_SSL_AUTH_CA_CERT,), config)

        return config
Exemplo n.º 5
0
    def _parse_distributor_config(self, user_input):
        """
        Generate an ISODistributor configuration based on the given parameters (user input).

        :param user_input: The keys and values passed to the CLI by the user
        :type  user_input: dict
        """
        key_tuples = (
            (constants.CONFIG_SERVE_HTTP, self.opt_http.keyword),
            (constants.CONFIG_SERVE_HTTPS, self.opt_https.keyword),
            (constants.CONFIG_SSL_AUTH_CA_CERT, self.opt_auth_ca.keyword),
        )

        config = {}
        for config_key, input_key in key_tuples:
            safe_parse(user_input, config, input_key, config_key)

        arg_utils.convert_file_contents((constants.CONFIG_SSL_AUTH_CA_CERT, ),
                                        config)

        return config
Exemplo n.º 6
0
 def parse_sync_group(self, user_input):
     config = ImporterConfigMixin.parse_sync_group(self, user_input)
     safe_parse(user_input, config,
                self.options_bundle.opt_releases.keyword,
                CONFIG_KEY_RELEASES)
     safe_parse(user_input, config,
                self.options_bundle.opt_components.keyword,
                CONFIG_KEY_COMPONENTS)
     safe_parse(user_input, config,
                self.options_bundle.opt_architectures.keyword,
                CONFIG_KEY_ARCHITECTURES)
     safe_parse(user_input, config, repo_options.OPT_SKIP.keyword,
                CONFIG_KEY_SKIP)
     return config
Exemplo n.º 7
0
 def parse_sync_group(self, user_input):
     config = ImporterConfigMixin.parse_sync_group(self, user_input)
     safe_parse(user_input, config, repo_options.OPT_SKIP.keyword, constants.CONFIG_SKIP)
     safe_parse(user_input, config, repo_options.OPT_REQUIRE_SIG.keyword,
                constants.CONFIG_REQUIRE_SIGNATURE)
     safe_parse(user_input, config, repo_options.OPT_ALLOWED_KEYS.keyword,
                constants.CONFIG_ALLOWED_KEYS)
     return config
Exemplo n.º 8
0
 def parse_sync_group(self, user_input):
     config = ImporterConfigMixin.parse_sync_group(self, user_input)
     safe_parse(user_input, config, repo_options.OPT_SKIP.keyword, CONFIG_KEY_SKIP)
     return config
Exemplo n.º 9
0
 def parse_sync_group(self, user_input):
     config = ImporterConfigMixin.parse_sync_group(self, user_input)
     safe_parse(user_input, config, repo_options.OPT_SKIP.keyword,
                CONFIG_KEY_SKIP)
     return config
Exemplo n.º 10
0
 def parse_sync_group(self, user_input):
     config = ImporterConfigMixin.parse_sync_group(self, user_input)
     safe_parse(user_input, config,
                self.options_bundle.opt_releases.keyword,
                CONFIG_KEY_RELEASES)
     safe_parse(user_input, config,
                self.options_bundle.opt_components.keyword,
                CONFIG_KEY_COMPONENTS)
     safe_parse(user_input, config,
                self.options_bundle.opt_architectures.keyword,
                CONFIG_KEY_ARCHITECTURES)
     safe_parse(user_input, config, repo_options.OPT_SKIP.keyword,
                CONFIG_KEY_SKIP)
     safe_parse(user_input, config,
                self.options_bundle.opt_require_signature.keyword,
                constants.CONFIG_REQUIRE_SIGNATURE)
     safe_parse(user_input, config,
                self.options_bundle.opt_allowed_keys.keyword,
                constants.CONFIG_ALLOWED_KEYS)
     return config