def __init__(self, cidr=None, dns=None, gateway=None, ips=None, routes=None, **kwargs):
    super(Subnet, self).__init__()
    self['cidr'] = cidr
    self['dns'] = (dns or [])
    self['gateway'] = gateway
    self['ips'] = (ips or [])
    self['routes'] = (routes or [])
    self['version'] = kwargs.pop('version', None)
    self._set_meta(kwargs)
    if (self['cidr'] and (not self['version'])):
        self['version'] = netaddr.IPNetwork(self['cidr']).version
def __init__(self, cidr=None, dns=None, gateway=None, ips=None, routes=None, **kwargs):
    super(Subnet, self).__init__()
    self['cidr'] = cidr
    self['dns'] = (dns or [])
    self['gateway'] = gateway
    self['ips'] = (ips or [])
    self['routes'] = (routes or [])
    self['version'] = kwargs.pop('version', None)
    self._set_meta(kwargs)
    if (self['cidr'] and (not self['version'])):
        self['version'] = netaddr.IPNetwork(self['cidr']).version