コード例 #1
0
ファイル: config.py プロジェクト: sharky93/flumotion
    def _buildConfig(self, propertyList, plugsList, eatersList, isClockMaster,
                     project, version, virtualFeeds):
        """
        Build a component configuration dictionary.
        """
        # clock-master should be either an avatar id or None.
        # It can temporarily be set to True, and the flow parsing
        # code will change it to the avatar id or None.
        config = {
            'name':
            self.name,
            'parent':
            self.parent,
            'type':
            self.type,
            'config-version':
            CURRENT_VERSION,
            'avatarId':
            common.componentId(self.parent, self.name),
            'project':
            project or configure.PACKAGE,
            'version':
            self._buildVersionTuple(version),
            'clock-master':
            isClockMaster or None,
            'feed':
            self.defs.getFeeders(),
            'properties':
            fluconfig.buildPropertyDict(propertyList,
                                        self.defs.getProperties()),
            'plugs':
            fluconfig.buildPlugsSet(plugsList, self.defs.getSockets()),
            'eater':
            buildEatersDict(eatersList, self.defs.getEaters()),
            'source': [tup[1] for tup in eatersList],
            'virtual-feeds':
            buildVirtualFeeds(virtualFeeds or [], self.defs.getFeeders())
        }

        if self.label:
            # only add a label attribute if it was specified
            config['label'] = self.label

        if not config['source']:
            # preserve old behavior
            del config['source']
        # FIXME: verify that config['project'] matches the defs

        return config
コード例 #2
0
ファイル: config.py プロジェクト: flyapen/UgFlu
    def _buildConfig(self, propertyList, plugsList, eatersList,
                     isClockMaster, project, version, virtualFeeds):
        """
        Build a component configuration dictionary.
        """
        # clock-master should be either an avatar id or None.
        # It can temporarily be set to True, and the flow parsing
        # code will change it to the avatar id or None.
        config = {'name': self.name,
                  'parent': self.parent,
                  'type': self.type,
                  'config-version': CURRENT_VERSION,
                  'avatarId': common.componentId(self.parent, self.name),
                  'project': project or configure.PACKAGE,
                  'version': self._buildVersionTuple(version),
                  'clock-master': isClockMaster or None,
                  'feed': self.defs.getFeeders(),
                  'properties': fluconfig.buildPropertyDict(propertyList,
                                                  self.defs.getProperties()),
                  'plugs': fluconfig.buildPlugsSet(plugsList,
                                         self.defs.getSockets()),
                  'eater': buildEatersDict(eatersList,
                                           self.defs.getEaters()),
                  'source': [tup[1] for tup in eatersList],
                  'virtual-feeds': buildVirtualFeeds(virtualFeeds or [],
                                                     self.defs.getFeeders())}

        if self.label:
            # only add a label attribute if it was specified
            config['label'] = self.label

        if not config['source']:
            # preserve old behavior
            del config['source']
        # FIXME: verify that config['project'] matches the defs

        return config
コード例 #3
0
ファイル: config.py プロジェクト: ApsOps/flumotion-orig
 def parseplugs(node):
     return fluconfig.buildPlugsSet(self.parsePlugs(node),
                          self.plugs.keys())
コード例 #4
0
ファイル: config.py プロジェクト: flyapen/UgFlu
 def parseplugs(node):
     return fluconfig.buildPlugsSet(self.parsePlugs(node),
                                    self.MANAGER_SOCKETS)
コード例 #5
0
ファイル: config.py プロジェクト: sharky93/flumotion
 def parseplugs(node):
     return fluconfig.buildPlugsSet(self.parsePlugs(node),
                                    self.plugs.keys())
コード例 #6
0
ファイル: config.py プロジェクト: sharky93/flumotion
 def parseplugs(node):
     return fluconfig.buildPlugsSet(self.parsePlugs(node),
                                    self.MANAGER_SOCKETS)