Skip to content

Commit 530c78f

Browse files
authored
Merge pull request #344 from knight42/fix-docker-inspect
Fix inconsistent behaviour of Container.inspect
2 parents 1c65e2d + 4c27023 commit 530c78f

File tree

10 files changed

+0
-56
lines changed

10 files changed

+0
-56
lines changed

lib/container.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ Container.prototype.inspect = function(opts, callback) {
4545
var self = this;
4646
var args = util.processArgs(opts, callback);
4747

48-
if (typeof args.callback !== 'function') {
49-
return JSON.stringify({
50-
id: this.id
51-
});
52-
}
53-
5448
var optsf = {
5549
path: '/containers/' + this.id + '/json?',
5650
method: 'GET',

lib/exec.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,6 @@ Exec.prototype.resize = function(opts, callback) {
101101
*/
102102
Exec.prototype.inspect = function(callback) {
103103
var self = this;
104-
if (typeof callback !== 'function') {
105-
return JSON.stringify({
106-
id: this.id
107-
});
108-
}
109104

110105
var optsf = {
111106
path: '/exec/' + this.id + '/json',

lib/image.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ var Image = function(modem, name) {
1717
*/
1818
Image.prototype.inspect = function(callback) {
1919
var self = this;
20-
if (typeof callback !== 'function') {
21-
return JSON.stringify({
22-
name: this.name
23-
});
24-
}
2520

2621
var opts = {
2722
path: '/images/' + this.name + '/json',

lib/network.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ var Network = function(modem, id) {
1717
*/
1818
Network.prototype.inspect = function(callback) {
1919
var self = this;
20-
if (typeof callback !== 'function') {
21-
return JSON.stringify({
22-
Id: this.id
23-
});
24-
}
2520

2621
var opts = {
2722
path: '/networks/' + this.id,

lib/node.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ var Node = function(modem, id) {
1818
*/
1919
Node.prototype.inspect = function(callback) {
2020
var self = this;
21-
if (typeof callback !== 'function') {
22-
return JSON.stringify({
23-
id: this.id
24-
});
25-
}
2621

2722
var optsf = {
2823
path: '/nodes/' + this.id,
@@ -102,11 +97,6 @@ Node.prototype.update = function(opts, callback) {
10297
*/
10398
Node.prototype.remove = function(callback) {
10499
var self = this;
105-
if (typeof callback !== 'function') {
106-
return JSON.stringify({
107-
id: this.id
108-
});
109-
}
110100

111101
var optsf = {
112102
path: '/nodes/' + this.id,

lib/plugin.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ var Plugin = function(modem, name, remote) {
1818
*/
1919
Plugin.prototype.inspect = function(callback) {
2020
var self = this;
21-
if (typeof callback !== 'function') {
22-
return JSON.stringify({
23-
name: this.name
24-
});
25-
}
2621

2722
var optsf = {
2823
path: '/plugins/' + this.name,

lib/secret.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ var Secret = function(modem, id) {
1717
*/
1818
Secret.prototype.inspect = function(callback) {
1919
var self = this;
20-
if (typeof callback !== 'function') {
21-
return JSON.stringify({
22-
id: this.id
23-
});
24-
}
2520

2621
var optsf = {
2722
path: '/secrets/' + this.id,

lib/service.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ var Service = function(modem, id) {
1818
*/
1919
Service.prototype.inspect = function(callback) {
2020
var self = this;
21-
if (typeof callback !== 'function') {
22-
return JSON.stringify({
23-
id: this.id
24-
});
25-
}
2621

2722
var optsf = {
2823
path: '/services/' + this.id,

lib/task.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ var Task = function(modem, id) {
1818
*/
1919
Task.prototype.inspect = function(callback) {
2020
var self = this;
21-
if (typeof callback !== 'function') {
22-
return JSON.stringify({
23-
id: this.id
24-
});
25-
}
2621

2722
var optsf = {
2823
path: '/tasks/' + this.id,

lib/volume.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ var Volume = function(modem, name) {
1717
*/
1818
Volume.prototype.inspect = function(callback) {
1919
var self = this;
20-
if (typeof callback !== 'function') {
21-
return JSON.stringify({
22-
name: this.name
23-
});
24-
}
2520

2621
var optsf = {
2722
path: '/volumes/' + this.name,

0 commit comments

Comments
 (0)