Esempio n. 1
0
    def __init__(self, to, total_size, transfer_time, num_files, command_type, 
                    date, fileset_name=None, compression=None, 
                    compression_level=None, encryption=None, fileset=None):
            u = UniqueID()
            self.attributes = {
                'to': to,
                'total_size': total_size,
                'transfer_time': transfer_time,
                'num_files': num_files,
                'command_type': command_type,
                'date': date,
                'id': u.get_id()
            }
            if fileset_name is not None:
                self.attributes['fileset_name'] = fileset_name
            if compression is not None:
                self.attributes['compression'] = compression
            if compression_level is not None:
                self.attributes['compression_level'] = compression_level
            if encryption is not None:
                self.attributes['encryption'] = encryption
            if fileset is not None:
                self.attributes['fileset'] = fileset

            super(TestCaseEntry, self).__init__(TestCaseEntry.xml_tag_name, 
                                                self.attributes)
Esempio n. 2
0
    def __init__(self, reason, dateDown, dateUp, shareDown, remarks=None):
        """Initializes the MetaElement and specifies legal values for 
        attributes.
        
        @param reason: Reason for going down.
        @type reason: String
        @param dateDown: Date the system went down
        @type dateDown: date, datetime, int, float, RFC3339 String
        @param dateUp: Date the system will come/came up
        @type dateUp: date, datetime, int, float, RFC3339 String
        @param shareDown: Share (percentage) of system down
        @type shareDown: String, int, float
        @param remarks: Any special remarks
        @type remarks: String

        """
        u = UniqueID()
        self.attributes = {
            'reason': reason,
            'dateDown': dateDown,
            'dateUp': dateUp,
            'shareDown': shareDown,
            'id': u.get_id(),
        }
        super(ResourceDownEntry, self).__init__(ResourceDownEntry.xml_tag_name,
                                                self.attributes)

        self.legal_element_types = ()

        if remarks:
            self.text = remarks
Esempio n. 3
0
    def __init__(self, dateUp, reason=None, remarks=None):
        """Initializes the MetaElement and specifies legal values for 
        attributes.

        @param dateUp: Date the system came up
        @type dateUp: date, datetime, int, float, RFC3339 String
        @param reason: Reason for going down
        @type reason: String
        @param remarks: Any special remarks
        @type remarks: String

        """
        u = UniqueID()
        self.attributes = {
            'dateUp': dateUp,
            'id': u.get_id(),
        }
        if reason:
            self.attributes['reason'] = reason
        super(ResourceUpEntry, self).__init__(ResourceUpEntry.xml_tag_name, 
                                                self.attributes)
        
        self.legal_element_types = ()

        if remarks:
            self.text = remarks
Esempio n. 4
0
    def __init__(self, element, volume):
        """Creates a config_entry 

        @param element: The element described. 
        @type element: String: nodes, cores, disk, swap, memory.
        @param volume: Number of metric for the element described.
        @type volume: int, String

        """
        u = UniqueID()
        self.attributes = {
            'element': element,
            'volume': volume,
            'id': u.get_id(),
        }
        super(ConfigEntry, self).__init__(ConfigEntry.xml_tag_name, self.attributes)
        self.legal_element = (
            'cores','nodes','disk','swap','memory',
            'system','type','cpu_type','theoretical_peak',
            'opsys','scheduling_system','total_temp_shared',
            'total_home_dir','addressable_mem','default_home_dir_size',
            'max_job_runtime','max_cpu_per_job','parallel_jobs',
            'serial_jobs','large_io_jobs','memory_per_node',
            'mpi_applications','openmp_applications',
            )
Esempio n. 5
0
 def __init__(self, title, author):
     unique_id = UniqueID()
     attributes = {
         'title': title,
         'author': author,
         'id': unique_id.get_id(),
     }
     super(PostEntry, self).__init__(PostEntry.xml_tag_name, attributes)
Esempio n. 6
0
    def __init__(self, progName, version, license = None, infoURL = None):
        """ Defines the sw_entry XML tag.

        param:
        progName                : Name of the software
        version                 : Software version
        license                 : Software license
        infoURL                 : URL with more information about the software.
        """
        u = UniqueID()
        self.attributes = {
            'progName': progName,
            'version': version,
            'id': u.get_id()
        }
        if license:
            self.attributes['license'] = license
        if infoURL:
            self.attributes['infoURL'] = infoURL

        super(SoftwareEntry, self).__init__(SoftwareEntry.xml_tag_name, self.attributes)
Esempio n. 7
0
    def __init__(self, element, metric, volume):
        """Creates a config_entry 

        @param element: The element described. 
        @type element: String: nodes, cores, disk, swap, memory.
        @param metric: The metric used to measure element.
        @type metric: String: count, MB, GB, TB.
        @param volume: Number of metric for the element described.
        @type volume: int, String

        """
        u = UniqueID()
        self.attributes = {"element": element, "metric": metric, "volume": volume, "id": u.get_id()}
        super(ConfigEntry, self).__init__(ConfigEntry.xml_tag_name, self.attributes)
        self.legal_metric = ("count", "MB", "GB", "TB")
        self.legal_element = ("cores", "nodes", "disk", "swap", "memory")