Exemplo n.º 1
0
    def run(self):

        (to_agg, func) = self._source()
        tmp = func(to_agg.absolute().as_posix())

        data = utils.convert(pd.DataFrame(tmp[1:], columns=tuple(tmp[0])))
        data.to_csv(self.output().path, index=False)
Exemplo n.º 2
0
    def __init__(self, **kwargs):
        self.args = utils.convert(kwargs)
        self.repo = self.args.get('repo', None)
        self.target_hosts = self.args.get('target_hosts', [])

        self.require_params = ["repo", "target_hosts"]
        self._check_params(self.require_params)

        self.task_name = "repo_config"
        self.need_variable_names = ["repo"]
        self.extra_var = self._get_extra_var(self.need_variable_names)
Exemplo n.º 3
0
    def __init__(self, **kwargs):
        self.args = utils.convert(kwargs)
        self.domain_name = self.args.get('domain_name', None)
        self.nis_server_host = self.args.get('nis_server_host', {})

        self.need_variable_names = ["domain_name", "nis_server_host"]
        self.require_params = ["domain_name", "nis_server_host"]
        self._check_params(self.require_params)

        self._state = self.args.get("state", "install")
        self.task_name = "nis_server_%s" % self._state
        self.target_hosts = [self.nis_server_host]
        self.extra_var = self._get_extra_var(self.need_variable_names)
Exemplo n.º 4
0
    def __init__(self, **kwargs):
        self.args = utils.convert(kwargs)
        self.nfs_server_host = self.args.get('nfs_server_host', {})
        self.share_dir = self.args.get('share_dir', None)
        self.nfs_client_hosts = self.args.get('nfs_client_hosts', {})

        self.need_variable_names = ["nfs_server_host", "share_dir"]
        self.require_params = [
            "nfs_server_host", "share_dir", "nfs_client_hosts"
        ]
        self._check_params(self.require_params)

        self._state = self.args.get("state", "install")
        self.task_name = "nfs_client_%s" % self._state
        self.target_hosts = self.nfs_client_hosts
        self.extra_var = self._get_extra_var(self.need_variable_names)
        self.extra_var["nfs_server_host"] = self.nfs_server_host["ip"]
Exemplo n.º 5
0
    def __init__(self, **kwargs):
        self.args = utils.convert(kwargs)
        self.nfs_server_host = self.args.get('nfs_server_host', {})
        self.share_dir = self.args.get('share_dir', None)
        self.share_ip_address = self.args.get('share_ip_address', None)
        self.share_mode = self.args.get(
            'share_mode',
            "rw,no_root_squash,no_all_squash,sync,anonuid=501,anongid=501")

        self.need_variable_names = [
            "nfs_server_host", "share_dir", "share_ip_address", "share_mode"
        ]
        self.require_params = [
            "nfs_server_host", "share_dir", "share_ip_address"
        ]
        self._check_params(self.require_params)

        self._state = self.args.get("state", "install")
        self.task_name = "nfs_server_%s" % self._state
        self.target_hosts = [self.nfs_server_host]
        self.extra_var = self._get_extra_var(self.need_variable_names)
Exemplo n.º 6
0
    def __init__(self, **kwargs):
        self.args = utils.convert(kwargs)
        self.sge_install_dir = self.args.get('sge_install_dir', '/opt')
        self.sge_root_name = self.args.get('sge_root_name', 'sge')
        self.sge_cluster_name = self.args.get('sge_cluster_name', 'rzl')
        self.sge_admin_user = self.args.get('sge_admin_user', 'root')
        self.sge_master_host = self.args.get('sge_master_host', {})

        self.need_variable_names = [
            "sge_install_dir", "sge_root_name", "sge_cluster_name",
            "sge_admin_user"
        ]
        self.require_params = ["sge_master_host"]
        self._check_params(self.require_params)
        self._custom_check()

        self._state = self.args.get("state", "install")
        self.task_name = "sge_master_%s" % self._state
        self.target_hosts = [self.sge_master_host]
        self.extra_var = self._get_extra_var(self.need_variable_names)
        self._custom_extra_var()