Skip to content

Commit 0e192c9

Browse files
committed
fix cinder, nova name mapping
1 parent 207afab commit 0e192c9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

watcher/target_type_uri_strategy.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ def __init__(self):
224224
}
225225
regex_mapping = {
226226
'flavors/[^/|$]+': 'flavors/flavor',
227+
'servers/[^/|$]+': 'servers/server',
227228
}
228229
super(NovaTargetTypeURIStrategy, self).__init__(
229230
name='nova',
@@ -267,10 +268,14 @@ def __init__(self):
267268
'os-quota-class-sets': 'class',
268269
'os-quota-sets': 'quota',
269270
}
271+
regex_mapping = {
272+
'volumes/[^/|$]+': 'volumes/volume',
273+
}
270274
super(CinderTargetTypeURIStrategy, self).__init__(
271275
name='cinder',
272276
prefix='service/storage/block',
273-
mapping=mapping
277+
mapping=mapping,
278+
regex_mapping=regex_mapping
274279
)
275280

276281

0 commit comments

Comments
 (0)