remove subdomains.status

This commit is contained in:
Girish Ramakrishnan
2016-12-14 12:28:31 -08:00
parent d475d9bcbf
commit 3ede9af34b
7 changed files with 0 additions and 133 deletions
-20
View File
@@ -4,7 +4,6 @@ exports = module.exports = {
upsert: upsert,
get: get,
del: del,
getChangeStatus: getChangeStatus,
waitForDns: require('./waitfordns.js')
};
@@ -112,22 +111,3 @@ function del(dnsConfig, zoneName, subdomain, type, values, callback) {
});
}
function getChangeStatus(dnsConfig, changeId, callback) {
assert.strictEqual(typeof dnsConfig, 'object');
assert.strictEqual(typeof changeId, 'string');
assert.strictEqual(typeof callback, 'function');
if (changeId === '') return callback(null, 'INSYNC');
superagent
.get(config.apiServerOrigin() + '/api/v1/domains/' + config.fqdn() + '/status/' + changeId)
.query({ token: dnsConfig.token })
.timeout(30 * 1000)
.end(function (error, result) {
if (error && !error.response) return callback(error);
if (result.statusCode !== 200) return callback(new SubdomainError(SubdomainError.EXTERNAL_ERROR, util.format('%s %j', result.statusCode, result.body)));
return callback(null, result.body.status);
});
}
-9
View File
@@ -4,7 +4,6 @@ exports = module.exports = {
upsert: upsert,
get: get,
del: del,
getChangeStatus: getChangeStatus,
waitForDns: require('./waitfordns.js')
};
@@ -172,11 +171,3 @@ function del(dnsConfig, zoneName, subdomain, type, values, callback) {
});
}
function getChangeStatus(dnsConfig, changeId, callback) {
assert.strictEqual(typeof dnsConfig, 'object');
assert.strictEqual(typeof changeId, 'string');
assert.strictEqual(typeof callback, 'function');
// Digitalocean does not have any way to check that
callback(null, 'INSYNC');
}
-10
View File
@@ -10,7 +10,6 @@ exports = module.exports = {
upsert: upsert,
get: get,
del: del,
getChangeStatus: getChangeStatus,
waitForDns: require('./waitfordns.js')
};
@@ -56,12 +55,3 @@ function del(dnsConfig, zoneName, subdomain, type, values, callback) {
callback(new Error('not implemented'));
}
function getChangeStatus(dnsConfig, changeId, callback) {
assert.strictEqual(typeof dnsConfig, 'object');
assert.strictEqual(typeof changeId, 'string');
assert.strictEqual(typeof callback, 'function');
// Result: current change state as string. Upstream code checks for 'INSYNC'
callback(new Error('not implemented'));
}
-8
View File
@@ -4,7 +4,6 @@ exports = module.exports = {
upsert: upsert,
get: get,
del: del,
getChangeStatus: getChangeStatus,
waitForDns: require('./waitfordns.js')
};
@@ -48,10 +47,3 @@ function del(dnsConfig, zoneName, subdomain, type, values, callback) {
return callback();
}
function getChangeStatus(dnsConfig, changeId, callback) {
assert.strictEqual(typeof dnsConfig, 'object');
assert.strictEqual(typeof changeId, 'string');
assert.strictEqual(typeof callback, 'function');
callback(null, 'INSYNC');
}
-17
View File
@@ -4,7 +4,6 @@ exports = module.exports = {
upsert: upsert,
get: get,
del: del,
getChangeStatus: getChangeStatus,
waitForDns: require('./waitfordns.js'),
// not part of "dns" interface
@@ -210,19 +209,3 @@ function del(dnsConfig, zoneName, subdomain, type, values, callback) {
});
}
function getChangeStatus(dnsConfig, changeId, callback) {
assert.strictEqual(typeof dnsConfig, 'object');
assert.strictEqual(typeof changeId, 'string');
assert.strictEqual(typeof callback, 'function');
if (changeId === '') return callback(null, 'INSYNC');
var route53 = new AWS.Route53(getDnsCredentials(dnsConfig));
route53.getChange({ Id: changeId }, function (error, result) {
if (error && error.code === 'AccessDenied') return callback(new SubdomainError(SubdomainError.ACCESS_DENIED, error.message));
if (error) return callback(error);
callback(null, result.ChangeInfo.Status);
});
}