def create_zone(self, domain, type='master', ttl=None, extra=None):
        if extra is None:
            extra = ZONE_EXTRA_PARAMS_DEFAULT_VALUES
        else:
            extra_fields = ZONE_EXTRA_PARAMS_DEFAULT_VALUES.keys()
            missing = set(extra_fields).difference(set(extra.keys()))
            for field in missing:
                extra[field] = ZONE_EXTRA_PARAMS_DEFAULT_VALUES.get(field)
        schema_params = SCHEMA_BUILDER_MAP.get('create_zone')
        attributes = schema_params.get('attributes')
        schema = api_schema_builder(schema_params.get('urn_nid'),
                                    schema_params.get('method'),
                                    attributes)
        params = {'apiuser': self.key, 'apikey': self.secret,
                  'zonename': domain, 'ttl': ttl or DEFAULT_TTL}
        params.update(extra)
        urn = schema.getchildren()[0]
        for child in urn:
            key = child.tag.split(':')[2]
            if key in attributes:
                if isinstance(params.get(key), int):
                    child.text = "%d"
                else:
                    child.text = "%s"
        # We can't insert values directly in child.text because API raises
        # and exception for values that need to be integers. And tostring
        # method from ElementTree can't handle int values.
        skel = ensure_string(tostring(schema))  # Deal with PY3
        req_data = skel % (self.key, self.secret, domain, extra.get('ns'),
                           extra.get('mbox'), extra.get('refresh'),
                           extra.get('retry'), extra.get('expire'),
                           extra.get('minimum'), ttl or DEFAULT_TTL,
                           extra.get('xfer'), extra.get('update_acl'))
        action = '/services/dns/createZone.php?'
        params = {}
        headers = {"SOAPAction": "urn:createZonewsdl#createZone"}
        try:
            self.connection.request(action=action, params=params,
                                    data=req_data, method="POST",
                                    headers=headers)
        except DurableDNSException:
            e = sys.exc_info()[1]
            if 'Zone Already Exist' in e.message:
                raise ZoneAlreadyExistsError(zone_id=domain, driver=self,
                                             value=e.message)
            raise e

        zone = self.get_zone(domain)
        return zone
Takes data from the provided object and prepares it for the
dataset/ETHPy150Open apache/libcloud/libcloud/dns/drivers/durabledns.py/DurableDNSDriver.create_zone--crossover with--dataset/ETHPy150Open django-tastypie/django-tastypie/tastypie/fields.py/ApiField.dehydrate