Smarts: Dynamic Model attribute or class does not function properly; Does the Dynamic Model compiler provide error checking when creating attributes?
search cancel

Smarts: Dynamic Model attribute or class does not function properly; Does the Dynamic Model compiler provide error checking when creating attributes?

book

Article ID: 331614

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Symptoms:




The following conditions, events and system behaviors may be observed with this issue
  • Smarts Dynamic Model attribute or class does not function properly when called
  • An attribute is created in a Smarts model (mdl) file where the reference calling the attribute has a different spelling than the attribute itself. In the following example, the model file the attribute created was heartbeatRecieved but was referenced as heartbeatReceived:
Test Model
interface Foo:Node
{
attribute unsigned heartbeatRecieved timestamped
"The time as reckoned in seconds-since-the-epoch when the last "
"heartbeat was received. "
= 0;

readonly computed attribute unsigned lastHeartbeatReceivedTime
"the time in seconds since the last Unix Epoch when the "
"last heartbeat was received "
= timestamp(heartbeatReceived);
}
  • When the attribute is called, it fails to function as expected.
  • The Smarts Dynamic Model compiler did not generate any errors or log messages to indicate there was any issue in the compilation.


Environment

VMware Smart Assurance - SMARTS

Cause

The Smarts dynmodel compiler does not provide error checking on attribute or class names. These can be created and referenced in the dynamic model without validating the class name and checking for proper reference.

Resolution

An enhancement request has been submitted to provide error checking functionality that will help Dynamic Modeling users identify issues with matching classes/attributes with references in the mdl files. Until this functionality is available, Smarts users who create dynamic models must take care to make sure that the class or attribute creation matches references in the mdl file.