@contrail.set_auth_token
def handle_update(self, json_snippet, tmpl_diff, prop_diff):
    props = {}
    props['entries'] = copy.deepcopy(prop_diff['entries'])
    self.fix_vn_to_fqname(props)
    self.fix_apply_service(props)
    self.fix_mirror_to(props)
    try:
        np_obj = self.vnc_lib().network_policy_read(id=self.resource_id)
    except vnc_api.NoIdError:
        LOG.warn((_('Network Policy %s not found.') % self.name))
        raise
    except:
        LOG.warn(_('Unknown error.'))
        raise
    np_obj.set_network_policy_entries(vnc_api.PolicyEntriesType.factory(**props['entries']))
    self.vnc_lib().network_policy_update(np_obj)
@contrail.set_auth_token
def handle_update(self, json_snippet, tmpl_diff, prop_diff):
    props = {}
    props['entries'] = copy.deepcopy(prop_diff['entries'])
    self.fix_vn_to_fqname(props)
    self.fix_apply_service(props)
    self.fix_mirror_to(props)
    try:
        np_obj = self.vnc_lib().network_policy_read(id=self.resource_id)
    except vnc_api.NoIdError:
        LOG.warn((_('Network Policy %s not found.') % self.name))
        raise
    except:
        LOG.warn(_('Unknown error.'))
        raise
    np_obj.set_network_policy_entries(vnc_api.PolicyEntriesType.factory(**props['entries']))
    self.vnc_lib().network_policy_update(np_obj)