예제 #1
0
파일: port.py 프로젝트: jconsoli/brcddb
 def r_port_name(self):
     """Returns the defined name for this port
     :return: Port name
     :rtype: str
     """
     if util.class_getvalue(
             self, 'fibrechannel/port-user-friendly-name') is not None:
         return util.class_getvalue(self,
                                    'fibrechannel/port-user-friendly-name')
     else:
         return '' if util.class_getvalue(self, 'fibrechannel/user-friendly-name') is None else \
             util.class_getvalue(self, 'fibrechannel/user-friendly-name')
예제 #2
0
파일: port.py 프로젝트: jconsoli/brcddb
    def r_login_keys(self):
        """Returns all the login WWN associated with this port.

        :return: List of WWNs logged into this port
        :rtype: list
        """
        return util.convert_to_list(
            util.class_getvalue(self, 'fibrechannel/neighbor/wwn'))
예제 #3
0
 def r_get(self, k):
     """Returns the value for a given key. Keys for nested objects must be separated with '/'.
     :param k: Key
     :type k: str, int
     :return: Value
     :rtype: Same type as used when the key/value pair was added
     """
     return util.class_getvalue(self, k)