#coding:utf-8
import textwrap
class Modules(object):
    """
    Configure nodes packages.
    """
    def __init__(self, command):
        self.cmd = command

    @property
    def __help__(self):
        info = """
        #==============================================================
        # %s
        #
        # module_path: %s
        # module_name: %s
        #==============================================================
        """ % (self.__doc__.strip(), self.__module__.strip(), self.__repr__())
        return info
        
    def run(self, args):

        content = []
        content.append(self.__help__)
        #@^gnome-desktop-environment
        parts = """
        @^developer-workstation-environment
        @additional-devel
        @base
        @compat-libraries
        @core
        @debugging
        @desktop-debugging
        @development
        @dial-up
        @directory-client
        @fonts
        @gnome-apps
        @gnome-desktop
        @guest-agents
        @guest-desktop-agents
        @hardware-monitoring
        @identity-management-server
        @infiniband
        @input-methods
        @internet-applications
        @internet-browser
        @java-platform
        @large-systems
        @multimedia
        @network-file-system-client
        @performance
        @perl-runtime
        @perl-web
        @php
        @platform-devel
        @print-client
        @python-web
        @ruby-runtime
        @system-admin-tools
        @virtualization-client
        @virtualization-hypervisor
        @virtualization-tools
        @web-server
        @x11
        """

        mini = """
        @^minimal
        wget
        net-tools
        libffi-devel
        libffi-devel*.i686
        nfs*
        autofs
        vim
        sunhpc-client
        sunhpc-python
        """
        content.append(mini)
        #content.append(parts)
        self.cmd.ks.addPackages(content, arg="--multilib --ignoremissing")

    def __repr__(self):
        return "kickstart-packages"












