Logo Search packages:      
Sourcecode: bcfg2 version File versions  Download package

def lib::Server::Metadata::Metadata::get_metadata (   self,

Return the metadata for a given client

Definition at line 174 of file Metadata.py.

00174                                   :
        '''Return the metadata for a given client'''
        if self.aliases.has_key(client):
            client = self.aliases[client]
        if self.clients.has_key(client):
            (bundles, groups, categories) = self.groups[self.clients[client]]
            if self.default == None:
                self.logger.error("Cannot set group for client %s; no default group set" % (client))
                raise MetadataConsistencyError
            [bundles, groups] = self.groups[self.default]
        toolinfo = [self.toolsets[group] for group in groups if self.toolsets.has_key(group)]
        if len(toolinfo) > 1:
            self.logger.error("Found multiple toolsets for client %s; choosing one" % (client))
        elif len(toolinfo) == 0:
            self.logger.error("Cannot determine toolset for client %s" % (client))
            raise MetadataConsistencyError
        toolset = toolinfo[0]
        return ClientMetadata(client, groups, bundles, toolset, categories)

Generated by  Doxygen 1.6.0   Back to index