Multiple ExtStorage Providers and ext-params
Add support for passing parameters to the ext template (ext-params). Take advantage of disk-params, that don't seem to make much sense in this template (ExtStorage Providers are not predefined and we don't know their needs) and use them to pass the ext-params dynamically to the template. ext-params are correlated with gnt-os-interface's os-params. All ext-params are exported to the ExtStorage Provider through it's environment, with variables prefixed with 'EXTP_' (similarly to the OS interface's 'OSP_' params). ext-params are passed via the --disk option. If the disk template is of type `ext', then any additional options passed to --disk and are not in IDISK_PARAMS are considered ext-params e.g.: gnt-instance add -t ext --disk=0:size=2G,param1=value1,param2=value2 Finally, we introduce a new IDISK_PARAM called IDISK_PROVIDER, that is mandatory for template `ext' and is used to select the desired ExtStorage Provider. This parameter is not a valid --disk option for any other template type. The IDISK_PROVIDER parameter becomes the first element of the disk's unique_id tuple e.g.: unique_id = ('sample_provider1', 'UUID.ext.diskX') Example selecting different ExtStorage Providers for each disk and passing different ext-params to them: -t ext --disk=0:size=2G,provider=sample_provider1,param1=value1 --disk=1:size=3G,provider=sample_provider2,param2=value2 Signed-off-by:Constantinos Venetsanopoulos <cven@grnet.gr> Signed-off-by:
Iustin Pop <iustin@google.com> [iustin@google.com: small simplification in bdev code, pylint fixes] Reviewed-by:
Iustin Pop <iustin@google.com>
Loading
Please register or sign in to comment