@spinnaker/amazon 0.13.1 → 0.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spinnaker/amazon",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.3",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"lib": "npm run build"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@spinnaker/core": "^0.22.
|
|
16
|
+
"@spinnaker/core": "^0.22.2",
|
|
17
17
|
"@uirouter/angularjs": "1.0.26",
|
|
18
18
|
"@uirouter/core": "6.0.8",
|
|
19
19
|
"@uirouter/react": "1.0.7",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"shx": "0.3.3",
|
|
56
56
|
"typescript": "4.3.5"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "587b5a7a5fe2121cd93bed86e5e83795ee401be0"
|
|
59
59
|
}
|
|
@@ -254,6 +254,11 @@ describe('Service: InstanceType', function () {
|
|
|
254
254
|
|
|
255
255
|
describe('filterInstanceTypes', function () {
|
|
256
256
|
const instanceTypes = [
|
|
257
|
+
{
|
|
258
|
+
account: 'test',
|
|
259
|
+
region: 'us-east-1',
|
|
260
|
+
name: 'test.type.incomplete',
|
|
261
|
+
},
|
|
257
262
|
{
|
|
258
263
|
account: 'test',
|
|
259
264
|
region: 'us-west-2',
|
|
@@ -301,9 +306,10 @@ describe('Service: InstanceType', function () {
|
|
|
301
306
|
},
|
|
302
307
|
];
|
|
303
308
|
|
|
304
|
-
it('filters instance types by VPC, virtualization type and architecture', function () {
|
|
309
|
+
it('filters instance types by VPC, virtualization type and architecture, only if the information exists', function () {
|
|
305
310
|
const service = this.awsInstanceTypeService;
|
|
306
311
|
expect(map(service.filterInstanceTypes(instanceTypes, 'hvm', true, 'x86_64'), 'name')).toEqual([
|
|
312
|
+
'test.type.incomplete',
|
|
307
313
|
'm1.small',
|
|
308
314
|
'hs1.8xlarge',
|
|
309
315
|
'm2.xlarge',
|
|
@@ -316,11 +322,13 @@ describe('Service: InstanceType', function () {
|
|
|
316
322
|
'm2.xlarge',
|
|
317
323
|
]);
|
|
318
324
|
expect(map(service.filterInstanceTypes(instanceTypes, 'hvm', true, 'i386'), 'name')).toEqual([
|
|
325
|
+
'test.type.incomplete',
|
|
319
326
|
'm1.small',
|
|
320
327
|
'hs1.8xlarge',
|
|
321
328
|
't2.nano',
|
|
322
329
|
]);
|
|
323
330
|
expect(map(service.filterInstanceTypes(instanceTypes, 'paravirtual', true, 'i386'), 'name')).toEqual([
|
|
331
|
+
'test.type.incomplete',
|
|
324
332
|
'm1.small',
|
|
325
333
|
'hs1.8xlarge',
|
|
326
334
|
]);
|
|
@@ -184,10 +184,16 @@ module(AMAZON_INSTANCE_AWSINSTANCETYPE_SERVICE, []).factory('awsInstanceTypeServ
|
|
|
184
184
|
if (!vpcConfigured && !families.ec2ClassicSupported.includes(i.name.split('.')[0])) {
|
|
185
185
|
return false;
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
|
|
188
|
+
if (
|
|
189
|
+
virtualizationType &&
|
|
190
|
+
i.supportedVirtualizationTypes &&
|
|
191
|
+
!i.supportedVirtualizationTypes.includes(virtualizationType)
|
|
192
|
+
) {
|
|
188
193
|
return false;
|
|
189
194
|
}
|
|
190
|
-
|
|
195
|
+
|
|
196
|
+
if (architecture && i.supportedArchitectures && !i.supportedArchitectures.includes(architecture)) {
|
|
191
197
|
return false;
|
|
192
198
|
}
|
|
193
199
|
|