code: def ports(self):
          
  
          ports = {}
          for chassis in self.chassis_list.values():
              ports.update({str(p): p for p in chassis.get_objects_by_type('port')})
          return ports
docs: :return: dictionary {name: object} of all ports.