def serialize_ofp_phy_port(port):
  attrs = ['port_no', 'hw_addr', 'name', 'config', 'state', 'curr',
           'advertised', 'supported', 'peer']
  json_dict = {'__type__': object_fullname(port)}
  print class_fullname(ofp_phy_port)
  for attr in attrs:
    value = getattr(port, attr, None)
    if hasattr(value, 'toStr'):
      value = value.toStr()
    json_dict[attr] = value
  return json_dict
defaults: x=4, y=2
dataset/ETHPy150Open ucb-sts/sts/sts/entities/base.py/serialize_ofp_phy_port--crossover with--dataset/ETHPy150Open priestc/giotto/giotto/tests/http_controller_test.py/defaults