
import dragonflow.db.field_types as df_fields
import dragonflow.db.model_framework as mf


@mf.construct_nb_db_model
class HostRoute(mf.ModelBase):
    id = None
    destination = df_fields.IpNetworkField(required=True)
    nexthop = df_fields.IpAddressField(required=True)


from jsonmodels import models

import dragonflow.db.field_types as df_fields


class HostRoute(models.Base):
    destination = df_fields.IpNetworkField(required=True)
    nexthop = df_fields.IpAddressField(required=True)

Change HostRoute to a plain model
Change HostRoute to a plain model

Since HostRoute doesn't have id, store it as a plain db model.

Change-Id: I3dbb9e5ffa42bf48f47b7010ee6baf470b55e85e
Partially-Implements: bp refactor-nb-api

+ 
+ from jsonmodels import models
  
  import dragonflow.db.field_types as df_fields
- import dragonflow.db.model_framework as mf
  
  
- @mf.construct_nb_db_model
- class HostRoute(mf.ModelBase):
+ class HostRoute(models.Base):
-     id = None
      destination = df_fields.IpNetworkField(required=True)
      nexthop = df_fields.IpAddressField(required=True)
  
Change HostRoute to a plain model
## Code Before:

import dragonflow.db.field_types as df_fields
import dragonflow.db.model_framework as mf


@mf.construct_nb_db_model
class HostRoute(mf.ModelBase):
    id = None
    destination = df_fields.IpNetworkField(required=True)
    nexthop = df_fields.IpAddressField(required=True)

## Instruction:
Change HostRoute to a plain model
## Code After:

from jsonmodels import models

import dragonflow.db.field_types as df_fields


class HostRoute(models.Base):
    destination = df_fields.IpNetworkField(required=True)
    nexthop = df_fields.IpAddressField(required=True)
