Add domain to account
320735
def create(domain, opts = {})
      opts = {name: domain}.merge(opts)
      Mailgun.submit :post, domain_url, opts
    end
478009
def _authenticate(self):
        """"""
        response = self._get("/v1/domains/{0}".format(self.domain))

        self.domain_id = response["domain"]["id"]
1140990
def _populate_domain(self):
        '''
        '''

        self.domain = {}
        for device in self.devices:
            device_name = get_device_info(device).name
            ca_devices = \
                device.tm.cm.trust_domains.trust_domain.load(
                    name='Root'
                ).caDevices
            self.domain[device_name] = [
                d.replace('/%s/' % self.partition, '') for d in ca_devices
            ]
424732
protected function wizardAddStore()
    {
        $this->validatePrompt('name', $this->text('Name'), 'store');
        $this->validatePrompt('domain', $this->text('Domain or IP'), 'store');
        $this->validatePrompt('basepath', $this->text('Path'), 'store', '');
        $this->validatePrompt('status', $this->text('Status'), 'store', 0);
        $this->setSubmittedJson('data');

        $this->validateComponent('store');
        $this->addStore();
    }
933982
def register(email):
    '''
    
    '''
    data = __utils__['http.query'](
        '{0}/useraccounts'.format(_base_url()),
        method='POST',
        data=salt.utils.json.dumps({
            'username': email,
            'userAccountType': 'API',
        }),
        status=True,
        decode=True,
        decode_type='json',
        header_dict={
            'Content-Type': 'application/json',
        },
    )
    status = data['status']
    if six.text_type(status).startswith('4') or six.text_type(status).startswith('5'):
        raise CommandExecutionError(
            'There was an API error: {0}'.format(data['error'])
        )
    return data.get('dict', {})
132171
def _add_mgmt_to_domains(self, conf, mgmts):
        

        for dom_name, dom_spec in conf['domains'].iteritems():
            domain_mgmt = [
                nic['net'] for nic in dom_spec['nics'] if nic['net'] in mgmts
            ].pop()

            dom_spec['mgmt_net'] = domain_mgmt
658629
def update_domain(self, domain, emailAddress=None, ttl=None, comment=None):
        
        return domain.update(emailAddress=emailAddress,
                ttl=ttl, comment=comment)
620453
def update(self, emailAddress=None, ttl=None, comment=None):
        
        return self.manager.update_domain(self, emailAddress=emailAddress,
                ttl=ttl, comment=comment)
182642
def set_domain!(new_domain)
      raise ArgumentError, "The new hostname cannot be nil" unless new_domain
      raise ArgumentError, "The new hostname cannot be empty" if new_domain.empty?

      edit_template = {
        "domain" => new_domain
      }

      self.service.editObject(edit_template)
      self.refresh_details()
    end
1013354
def register_domain(self, domain=0, tokenizer=None, trie=None):
        
        self.domains[domain] = IntentDeterminationEngine(
            tokenizer=tokenizer, trie=trie)
90603
def _config_win32_domain(self, domain):
        """"""
        # we call str() on domain to convert it from unicode to ascii
        self.domain = dns.name.from_text(str(domain))
1122460
def import_domain(self, domain_data):
        
        uri = "/domains/import"
        body = {"domains": [{
                "contentType": "BIND_9",
                "contents": domain_data,
                }]}
        resp, resp_body = self._async_call(uri, method="POST", body=body,
                error_class=exc.DomainCreationFailed)
        return resp_body
249834
function setDomain()
    {
        $this->domains = func_get_args();
        $this->removeDNProp('id-at-commonName');
        $this->setDNProp('id-at-commonName', $this->domains[0]);
    }
453386
def _set_hostname_domain(self):
        """"""
        self._hostname, _, self._domain = str(self._fqdn).partition('.')
        log.debug('Hostname: %s, Domain: %s' % (self._hostname, self._domain))
639835
def domain_get(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.get_domain(**kwargs)
1177686
def add(self, email_address, name):
        """"""
        body = {
            "EmailAddress": email_address,
            "Name": name}
        response = self._post("/admins.json", json.dumps(body))
        return json_to_py(response)
212078
function createARecord (domain, subdomain, ip, cb) {
        var body = {
            name: subdomain,
            type: 'A',
            content: ip
        };
        _hoverRequest('POST', '/domains/' + domain + '/dns', body, cb);
    }