diff --git a/package.json b/package.json index bbbd19a5..4a5bdbca 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,8 @@ "extend": "^3.0.1", "gce-images": "^0.3.3", "is": "^3.2.1", - "string-format-obj": "^1.1.1" + "string-format-obj": "^1.1.1", + "teeny-request": "^3.10.0" }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^2.3.0", diff --git a/src/address.js b/src/address.js index 6941fc51..fbb7e2e5 100644 --- a/src/address.js +++ b/src/address.js @@ -19,6 +19,7 @@ const common = require('@google-cloud/common'); const {promisifyAll} = require('@google-cloud/promisify'); const util = require('util'); +const {teenyRequest} = require('teeny-request'); /** * An Address object allows you to interact with a Google Compute Engine @@ -166,6 +167,7 @@ function Address(region, name) { id: name, createMethod: region.createAddress.bind(region), methods: methods, + requestModule: teenyRequest, }); /** diff --git a/src/autoscaler.js b/src/autoscaler.js index 12a04e36..3af6aeb7 100644 --- a/src/autoscaler.js +++ b/src/autoscaler.js @@ -19,6 +19,7 @@ const common = require('@google-cloud/common'); const {promisifyAll} = require('@google-cloud/promisify'); const util = require('util'); +const {teenyRequest} = require('teeny-request'); /*! Developer Documentation * @@ -181,6 +182,7 @@ function Autoscaler(zone, name) { id: name, createMethod: zone.createAutoscaler.bind(zone), methods: methods, + requestModule: teenyRequest, }); /** diff --git a/src/disk.js b/src/disk.js index f0e914ac..480ccbba 100644 --- a/src/disk.js +++ b/src/disk.js @@ -22,7 +22,7 @@ const format = require('string-format-obj'); const is = require('is'); const util = require('util'); const {promisifyAll} = require('@google-cloud/promisify'); - +const {teenyRequest} = require('teeny-request'); const Snapshot = require('./snapshot.js'); /** @@ -178,6 +178,7 @@ function Disk(zone, name) { id: name, createMethod: zone.createDisk.bind(zone), methods: methods, + requestModule: teenyRequest, }); /** diff --git a/src/firewall.js b/src/firewall.js index e6b5f1d2..40028e9d 100644 --- a/src/firewall.js +++ b/src/firewall.js @@ -19,6 +19,7 @@ const common = require('@google-cloud/common'); const util = require('util'); const {promisifyAll} = require('@google-cloud/promisify'); +const {teenyRequest} = require('teeny-request'); /** * A Firewall object allows you to interact with a Google Compute Engine @@ -169,6 +170,7 @@ function Firewall(compute, name) { id: name, createMethod: compute.createFirewall.bind(compute), methods: methods, + requestModule: teenyRequest, }); /** diff --git a/src/health-check.js b/src/health-check.js index 0f0a3765..0359b6a8 100644 --- a/src/health-check.js +++ b/src/health-check.js @@ -21,6 +21,7 @@ const extend = require('extend'); const is = require('is'); const util = require('util'); const {promisifyAll} = require('@google-cloud/promisify'); +const {teenyRequest} = require('teeny-request'); /** * Health checks ensure that Compute Engine forwards new connections only to @@ -196,6 +197,7 @@ function HealthCheck(compute, name, options) { compute.createHealthCheck(name, options, callback); }, methods: methods, + requestModule: teenyRequest, }); } diff --git a/src/image.js b/src/image.js index 8ebb6f98..ccf1d611 100644 --- a/src/image.js +++ b/src/image.js @@ -19,6 +19,7 @@ const common = require('@google-cloud/common'); const util = require('util'); const {promisifyAll} = require('@google-cloud/promisify'); +const {teenyRequest} = require('teeny-request'); /** * An Image object allows you to interact with a Google Compute Engine image. @@ -160,6 +161,7 @@ function Image(compute, name) { id: name, createMethod: compute.createImage.bind(compute), methods: methods, + requestModule: teenyRequest, }); } diff --git a/src/index.js b/src/index.js index dec098e0..6e4cc84e 100644 --- a/src/index.js +++ b/src/index.js @@ -24,6 +24,7 @@ const is = require('is'); const util = require('util'); const {promisifyAll} = require('@google-cloud/promisify'); const {paginator} = require('@google-cloud/paginator'); +const {teenyRequest} = require('teeny-request'); const Firewall = require('./firewall.js'); const HealthCheck = require('./health-check.js'); @@ -87,6 +88,7 @@ function Compute(options) { baseUrl: 'https://www.googleapis.com/compute/v1', scopes: ['https://www.googleapis.com/auth/compute'], packageJson: require('../package.json'), + requestModule: teenyRequest, }; common.Service.call(this, config, options); diff --git a/src/instance-group.js b/src/instance-group.js index 852d9012..613ce238 100644 --- a/src/instance-group.js +++ b/src/instance-group.js @@ -23,6 +23,7 @@ const is = require('is'); const util = require('util'); const {promisifyAll} = require('@google-cloud/promisify'); const {paginator} = require('@google-cloud/paginator'); +const {teenyRequest} = require('teeny-request'); /** * You can create and manage groups of virtual machine instances so that you @@ -177,6 +178,7 @@ function InstanceGroup(zone, name) { id: name, createMethod: zone.createInstanceGroup.bind(zone), methods: methods, + requestModule: teenyRequest, }); /** diff --git a/src/machine-type.js b/src/machine-type.js index 1bebc6aa..b401f40c 100644 --- a/src/machine-type.js +++ b/src/machine-type.js @@ -18,6 +18,7 @@ const common = require('@google-cloud/common'); const util = require('util'); +const {teenyRequest} = require('teeny-request'); /** * A MachineType object allows you to interact with a Google Compute Engine @@ -131,6 +132,7 @@ function MachineType(zone, name) { */ id: name, methods: methods, + requestModule: teenyRequest, }); /** diff --git a/src/network.js b/src/network.js index 254cf524..1c1248ca 100644 --- a/src/network.js +++ b/src/network.js @@ -22,6 +22,7 @@ const format = require('string-format-obj'); const is = require('is'); const util = require('util'); const {promisifyAll} = require('@google-cloud/promisify'); +const {teenyRequest} = require('teeny-request'); /** * A Network object allows you to interact with a Google Compute Engine network. @@ -172,6 +173,7 @@ function Network(compute, name) { id: name, createMethod: compute.createNetwork.bind(compute), methods: methods, + requestModule: teenyRequest, }); /** diff --git a/src/operation.js b/src/operation.js index 524d96f5..9b362d6a 100644 --- a/src/operation.js +++ b/src/operation.js @@ -19,6 +19,7 @@ const common = require('@google-cloud/common'); const util = require('util'); const {promisifyAll} = require('@google-cloud/promisify'); +const {teenyRequest} = require('teeny-request'); /** * An Operation object allows you to interact with a Google Compute Engine @@ -178,6 +179,7 @@ function Operation(scope, name) { */ id: name, methods: methods, + requestModule: teenyRequest, }); /** diff --git a/src/project.js b/src/project.js index 81f0e7ab..694b704e 100644 --- a/src/project.js +++ b/src/project.js @@ -19,6 +19,7 @@ const common = require('@google-cloud/common'); const util = require('util'); const {promisifyAll} = require('@google-cloud/promisify'); +const {teenyRequest} = require('teeny-request'); /** * A Project object allows you to interact with your Google Compute Engine @@ -103,6 +104,7 @@ function Project(compute) { baseUrl: '', id: '', methods: methods, + requestModule: teenyRequest, }); } diff --git a/src/region.js b/src/region.js index 01115def..ae91fe87 100644 --- a/src/region.js +++ b/src/region.js @@ -22,6 +22,7 @@ const is = require('is'); const util = require('util'); const {promisifyAll} = require('@google-cloud/promisify'); const {paginator} = require('@google-cloud/paginator'); +const {teenyRequest} = require('teeny-request'); const Address = require('./address.js'); const Network = require('./network.js'); @@ -135,6 +136,7 @@ function Region(compute, name) { */ id: name, methods: methods, + requestModule: teenyRequest, }); /** diff --git a/src/rule.js b/src/rule.js index d49bb11d..e9a91554 100644 --- a/src/rule.js +++ b/src/rule.js @@ -19,6 +19,7 @@ const common = require('@google-cloud/common'); const util = require('util'); const {promisifyAll} = require('@google-cloud/promisify'); +const {teenyRequest} = require('teeny-request'); /** * Forwarding rules work in conjunction with target pools and target instances @@ -191,6 +192,7 @@ function Rule(scope, name) { id: name, createMethod: scope.createRule.bind(scope), methods: methods, + requestModule: teenyRequest, }); /** diff --git a/src/service.js b/src/service.js index 68d6ec88..0973827c 100644 --- a/src/service.js +++ b/src/service.js @@ -22,6 +22,7 @@ const format = require('string-format-obj'); const is = require('is'); const util = require('util'); const {promisifyAll} = require('@google-cloud/promisify'); +const {teenyRequest} = require('teeny-request'); /** * An HTTP(S) load balancing backend service is a centralized service for @@ -185,6 +186,7 @@ function Service(compute, name) { id: name, createMethod: compute.createService.bind(compute), methods: methods, + requestModule: teenyRequest, }); /** diff --git a/src/snapshot.js b/src/snapshot.js index d92c3fed..bbd1698c 100644 --- a/src/snapshot.js +++ b/src/snapshot.js @@ -19,6 +19,7 @@ const common = require('@google-cloud/common'); const util = require('util'); const {promisifyAll} = require('@google-cloud/promisify'); +const {teenyRequest} = require('teeny-request'); /** * A Snapshot object allows you to interact with a Google Compute Engine @@ -138,6 +139,7 @@ function Snapshot(scope, name) { */ id: name, methods: methods, + requestModule: teenyRequest, }; if (isDisk) { diff --git a/src/subnetwork.js b/src/subnetwork.js index 8b80db5f..172a38bf 100644 --- a/src/subnetwork.js +++ b/src/subnetwork.js @@ -19,6 +19,7 @@ const common = require('@google-cloud/common'); const util = require('util'); const {promisifyAll} = require('@google-cloud/promisify'); +const {teenyRequest} = require('teeny-request'); /** * An Subnetwork object allows you to interact with a Google Compute Engine @@ -184,6 +185,7 @@ function Subnetwork(region, name) { id: this.name, createMethod: region.createSubnetwork.bind(region), methods: methods, + requestModule: teenyRequest, }); } diff --git a/src/vm.js b/src/vm.js index 6d4216c2..ffba6200 100644 --- a/src/vm.js +++ b/src/vm.js @@ -24,6 +24,7 @@ const is = require('is'); const util = require('util'); const {promisifyAll} = require('@google-cloud/promisify'); const {replaceProjectIdToken} = require('@google-cloud/projectify'); +const {teenyRequest} = require('teeny-request'); const Disk = require('./disk.js'); @@ -250,6 +251,7 @@ function VM(zone, name) { id: this.name, createMethod: zone.createVM.bind(zone), methods: methods, + requestModule: teenyRequest, }); } diff --git a/src/zone.js b/src/zone.js index d9a1f835..5717b4fe 100644 --- a/src/zone.js +++ b/src/zone.js @@ -26,6 +26,7 @@ const is = require('is'); const util = require('util'); const {promisifyAll} = require('@google-cloud/promisify'); const {paginator} = require('@google-cloud/paginator'); +const {teenyRequest} = require('teeny-request'); const Autoscaler = require('./autoscaler.js'); const Disk = require('./disk.js'); @@ -140,6 +141,7 @@ function Zone(compute, name) { */ id: name, methods: methods, + requestModule: teenyRequest, }); /**