Skip to content

Commit ca6fb19

Browse files
authored
Fix checking AZs in non-standard node flavors (#90)
Fix checking AZs in non-standard node flavors Fail-safe for missing cond:operation:az in os_extra_specs Fixes #89 Reviewed-by: Rodion Gyrbu <fpsoff@outlook.com> Reviewed-by: None <None> Reviewed-by: Anton Sidelnikov <None>
1 parent 9f4b581 commit ca6fb19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/oms/services/compute/v1/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export class ComputeV1 extends Service {
2525
}
2626
// AZ filtering is not working on server side, so still need to filter it
2727
return flavors.filter(f => {
28-
const azs = f.os_extra_specs['cond:operation:az'].split(',')
29-
return azs.find(a => {
28+
const azs = f.os_extra_specs['cond:operation:az'] || ''
29+
return azs.split(',').find(a => {
3030
const items = a.match(groupInfoRe)
3131
return (!!items) &&
3232
(items.length === 3) &&

0 commit comments

Comments
 (0)