'Create a new zone.
:param domain: Zone domain name (e.g. example.com)
:type domain: ``str``
:param type: Zone type (All zones are master by design).
:type  type: ``str``
:param ttl: TTL for new records. (This is not really used)
:type  ttl: ``int``
:param extra: Extra attributes (set auto_populate: 0 if you
don\'t want to auto populate with existing DNS records). (optional)
:type extra: ``dict``
:rtype: :class:`Zone`
For more info, please see:
https://docs.onapp.com/display/52API/Add+DNS+Zone'

def create_zone(self, domain, type='master', ttl=None, extra=None):

    dns_zone = {'name': domain}
    if (extra is not None):
        dns_zone.update(extra)
    dns_zone_data = json.dumps({'dns_zone': dns_zone})
    response = self.connection.request('/dns_zones.json', method='POST', headers={'Content-type': 'application/json'}, data=dns_zone_data)
    zone = self._to_zone(response.object)
    return zone
