@classmethod
def from_dict(cls, pdict):
    """Factory method producing a _Provider based on a dict with
        appropriate keys.

        :param pdict: Dictionary representing a provider, with keys 'name',
                      'uuid', 'generation', 'parent_provider_uuid'.  Of these,
                      only 'name' is mandatory.
        """
    return cls(pdict['name'], uuid=pdict.get('uuid'), generation=pdict.get(
        'generation'), parent_uuid=pdict.get('parent_provider_uuid'))
