def copy_fs(from_fs, to_fs):
    fields = ["ip_src","ip_dst","tp_src","tp_dst","mac_src","mac_dst",
              "vlan_id","ip_proto","eth_type"]
    for field in fields:
        setattr(to_fs, "%s_s"%field, getattr(from_fs,"%s_s"%field))  
        setattr(to_fs, "%s_e"%field, getattr(from_fs,"%s_e"%field))
copy all flowspace fields from from_fs to to_fs
dataset/ETHPy150Open fp7-ofelia/ocf/optin_manager/src/python/openflow/optin_manager/flowspace/helper.py/copy_fs