Beispiel #1
0
    def __init__(self,
                 name='global',
                 data=None,
                 metadata=None,
                 json_string=None):
        """ 
        Class constructor. 

        :param name: Configuration name (default: 'global').
        :type name: str

        :param data: Configuration data. If provided, it will override corresponding data from JSON string representation.
        :type data: dict

        :param metadata: Configuration metadata. If provided, it will override corresponding metadata from JSON string representation.
        :type metadata: dict

        :param json_string: Configuration JSON string representation.
        :type json_string: str

        :raises: **InvalidArgument** - in case metadata is not a dictionary, JSON string is not valid, or it does not contain dictionary representing a ClusterConfiguration object.
        """

        QconfObject.__init__(self,
                             name=name,
                             data=data,
                             metadata=metadata,
                             json_string=json_string)
        if not self.name:
            self.name = self.get_name_from_data()
            if not self.name:
                self.name = 'global'
    def __init__(self, data=None, metadata=None, json_string=None):
        """ 
        Class constructor. 

        :param data: Configuration data. If provided, it will override corresponding data from JSON string representation.
        :type data: dict

        :param metadata: Configuration metadata. If provided, it will override corresponding metadata from JSON string representation.
        :type metadata: dict

        :param json_string: Configuration JSON string representation.
        :type json_string: str

        :raises: **InvalidArgument** - in case metadata is not a dictionary, JSON string is not valid, or it does not contain dictionary representing a SchedulerConfiguration object.
        """

        QconfObject.__init__(self, data=data, metadata=metadata, json_string=json_string)
    def __init__(self, name=None, data=None, metadata=None, json_string=None):
        """ 
        Class constructor. 

        :param name: PE name. If provided, it will override PE name from data or JSON string parameters ('pe_name' key).
        :type name: str

        :param data: PE data. If provided, it will override corresponding data from PE JSON string representation.
        :type data: dict

        :param metadata: PE metadata. If provided, it will override corresponding metadata from PE JSON string representation.
        :type metadata: dict

        :param json_string: PE JSON string representation.
        :type json_string: str

        :raises: **InvalidArgument** - in case metadata is not a dictionary, JSON string is not valid, or it does not contain dictionary representing a PE object.
        """
        QconfObject.__init__(self, name=name, data=data, metadata=metadata, json_string=json_string)
Beispiel #4
0
    def __init__(self, name=None, data=None, metadata=None, json_string=None):
        """
        Class constructor. 

        :param name: List name. 
        :type name: str

        :param data: Name list data. If provided, it will override corresponding data from object's JSON string representation.
        :type data: list

        :param metadata: Name list metadata. If provided, it will override corresponding metadata from object's JSON string representation.
        :type metadata: dict

        :param json_string: Name list JSON string representation.
        :type json_string: str

        :raises: **InvalidArgument** - in case metadata is not a dictionary, JSON string is not valid, or it does not contain dictionary representing a QconfNameList object.
        """
        UserList.UserList.__init__(self)
        QconfObject.__init__(self,
                             name=name,
                             data=data,
                             metadata=metadata,
                             json_string=json_string)