# Path: os_vif/objects/base.py
# class VersionedObject(ovo_base.VersionedObject):
# class VersionedObjectPrintableMixin(object):
#     OBJ_PROJECT_NAMESPACE = 'os_vif'
#     def __str__(self):
# 
# Path: os_vif/objects/fields.py
# class VIFDirectMode(fields.Enum):
# class VIFDirectModeField(fields.BaseEnumField):
# class VIFVHostUserMode(fields.Enum):
# class VIFVHostUserModeField(fields.BaseEnumField):
# class ListOfIPAddressField(fields.AutoTypedField):
# class VIFHostDeviceDevType(fields.Enum):
# class VIFHostDeviceDevTypeField(fields.BaseEnumField):
#     VEPA = 'vepa'
#     PASSTHROUGH = 'passthrough'
#     BRIDGE = 'bridge'
#     ALL = (VEPA, PASSTHROUGH, BRIDGE)
#     AUTO_TYPE = VIFDirectMode()
#     CLIENT = "client"
#     SERVER = "server"
#     ALL = (CLIENT, SERVER)
#     AUTO_TYPE = VIFVHostUserMode()
#     AUTO_TYPE = fields.List(fields.IPAddress())
#     ETHERNET = 'ethernet'
#     GENERIC = 'generic'
#     ALL = (ETHERNET, GENERIC)
#     AUTO_TYPE = VIFHostDeviceDevType()
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):


from oslo_versionedobjects import base
from oslo_versionedobjects import fields
from os_vif.objects import base as osv_base
from os_vif.objects import fields as osv_fields
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.




@base.VersionedObjectRegistry.register
class Subnet(osv_base.VersionedObject):
    """Represents a subnet."""
    # Version 1.0: Initial version
    VERSION = '1.0'

    fields = {
        'cidr': fields.IPNetworkField(),
        'dns': osv_fields.ListOfIPAddressField(),
        'gateway': fields.IPAddressField(),
        'ips': fields.ObjectField("FixedIPList"),
        'routes': fields.ObjectField("RouteList"),
        'dhcp_server': fields.IPAddressField(),
    }


@base.VersionedObjectRegistry.register

# Path: os_vif/objects/base.py
# class VersionedObject(ovo_base.VersionedObject):
# class VersionedObjectPrintableMixin(object):
#     OBJ_PROJECT_NAMESPACE = 'os_vif'
#     def __str__(self):
# 
# Path: os_vif/objects/fields.py
# class VIFDirectMode(fields.Enum):
# class VIFDirectModeField(fields.BaseEnumField):
# class VIFVHostUserMode(fields.Enum):
# class VIFVHostUserModeField(fields.BaseEnumField):
# class ListOfIPAddressField(fields.AutoTypedField):
# class VIFHostDeviceDevType(fields.Enum):
# class VIFHostDeviceDevTypeField(fields.BaseEnumField):
#     VEPA = 'vepa'
#     PASSTHROUGH = 'passthrough'
#     BRIDGE = 'bridge'
#     ALL = (VEPA, PASSTHROUGH, BRIDGE)
#     AUTO_TYPE = VIFDirectMode()
#     CLIENT = "client"
#     SERVER = "server"
#     ALL = (CLIENT, SERVER)
#     AUTO_TYPE = VIFVHostUserMode()
#     AUTO_TYPE = fields.List(fields.IPAddress())
#     ETHERNET = 'ethernet'
#     GENERIC = 'generic'
#     ALL = (ETHERNET, GENERIC)
#     AUTO_TYPE = VIFHostDeviceDevType()
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):


# Path: os_vif/objects/subnet.py
from oslo_versionedobjects import base
from oslo_versionedobjects import fields
from os_vif.objects import base as osv_base
from os_vif.objects import fields as osv_fields

#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.




@base.VersionedObjectRegistry.register
class Subnet(osv_base.VersionedObject):
    """Represents a subnet."""
    # Version 1.0: Initial version
    VERSION = '1.0'

    fields = {
        'cidr': fields.IPNetworkField(),
        'dns': osv_fields.ListOfIPAddressField(),
        'gateway': fields.IPAddressField(),
        'ips': fields.ObjectField("FixedIPList"),
        'routes': fields.ObjectField("RouteList"),
        'dhcp_server': fields.IPAddressField(),
    }


@base.VersionedObjectRegistry.register

class SubnetList(osv_base.VersionedObject, base.ObjectListBase):