Hi Martin, By looking at the code - there seems no validator for the format provided by the user for the UserDefinedVMProperties.
It seems that the engine will write an exception to log specifying the format is invalid, as the format is being validated during engine startup by InitBackendServicesOnStartupBean.create() which invokes VmPropertiesUtils.getInstance().init() Therefore there is a need to validate the format in earlier stage, when setting the values for the properties via the engine-config. 1. Extend the engine-config value helpers with a new type: DevicePropertiesValueHelper extends org.ovirt.engine.core.config.entity.helper.ValueHelper and also a compliant DevicePropertiesValueHelperTest 2. DevicePropertiesValueHelper.validate() should reuse the parsing logic of the device properties from VmPropertiesUtils.parseVMPropertiesRegex() 3. Define the value helper for you new property in packaging/etc/engine-config/engine-config.properties: CustomDeviceProperties.description="your description" CustomDeviceProperties.type=DevicePropertiesValueHelper You the new install-dev to easily test you changes. Regards, Moti ----- Original Message ----- > From: "Martin Perina" <[email protected]> > To: [email protected] > Sent: Tuesday, May 14, 2013 10:51:02 AM > Subject: [Engine-devel] Engine config and device custom properties > > Hi, > > I'm working on a patch to support custom device properties in ovirt-engine. > I would like that custom device properties format can be set using > engine-config > command in a similar way as UserDefinedVMProperties. What is needed to be > done > to support this? > > Thanks > > Martin > _______________________________________________ > Engine-devel mailing list > [email protected] > http://lists.ovirt.org/mailman/listinfo/engine-devel > _______________________________________________ Engine-devel mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-devel
