@contrail.set_auth_token
def handle_create(self):
    props = {}
    props['entries'] = copy.deepcopy(self.properties['entries'])
    self.fix_vn_to_fqname(props)
    self.fix_apply_service(props)
    self.fix_mirror_to(props)
    tenant_id = self.stack.context.tenant_id
    project_obj = self.vnc_lib().project_read(id=str(uuid.UUID(tenant_id)))
    np_obj = vnc_api.NetworkPolicy(name=self.properties[self.NAME], parent_obj=project_obj)
    np_obj.set_network_policy_entries(vnc_api.PolicyEntriesType.factory(**props['entries']))
    np_uuid = super(NetworkPolicy, self).resource_create(np_obj)
    self.resource_id_set(np_uuid)
@contrail.set_auth_token
def handle_create(self):
    props = {}
    props['entries'] = copy.deepcopy(self.properties['entries'])
    self.fix_vn_to_fqname(props)
    self.fix_apply_service(props)
    self.fix_mirror_to(props)
    tenant_id = self.stack.context.tenant_id
    project_obj = self.vnc_lib().project_read(id=str(uuid.UUID(tenant_id)))
    np_obj = vnc_api.NetworkPolicy(name=self.properties[self.NAME], parent_obj=project_obj)
    np_obj.set_network_policy_entries(vnc_api.PolicyEntriesType.factory(**props['entries']))
    np_uuid = super(NetworkPolicy, self).resource_create(np_obj)
    self.resource_id_set(np_uuid)