コード例 #1
0
ファイル: base.py プロジェクト: AlexeyKasatkin/openstack-tut
 def human_id(self):
     """Subclasses may override this provide a pretty ID which can be used
     for bash completion.
     """
     if self.NAME_ATTR in self.__dict__ and self.HUMAN_ID:
         return utils.slugify(getattr(self, self.NAME_ATTR))
     return None
コード例 #2
0
 def human_id(self):
     """Subclasses may override this provide a pretty ID which can be used
     for bash completion.
     """
     if 'name' in self.__dict__ and self.HUMAN_ID:
         return utils.slugify(self.name)
     return None
コード例 #3
0
 def human_id(self):
     """Subclasses may override this provide a pretty ID which can be used
     for bash completion.
     """
     if self.NAME_ATTR in self.__dict__ and self.HUMAN_ID:
         return utils.slugify(getattr(self, self.NAME_ATTR))
     return None
コード例 #4
0
ファイル: base.py プロジェクト: kwss/python-novaclient
 def human_id(self):
     """Subclasses may override this provide a pretty ID which can be used
     for bash completion.
     """
     if 'name' in self.__dict__ and self.HUMAN_ID:
         return utils.slugify(self.name)
     return None