Well, this is a bit complex. Attributes are ostensibly filled during runtime by other systems, for example during the install workflow an ip_address would get its real value. It's not really clear how another system would be able to insert a function here, but it's not impossible. In ARIA's case, functions are implemented as pickled Python classes, so it would be possible to do this, however obviously it would not be portable.
But, you can also give attributes default values. For default values, obviously you can use functions. On Wed, Nov 15, 2017 at 2:51 PM, DeWayne Filppi <[email protected]> wrote: > General TOSCA question. Is there anything in the spec that requires > attributes to be values rather than functions? IOW, is there anything in > there that prevents an orchestrator from representing an attribute read as > more of a "getter", rather than a database fetch? I ask because I've run > across a case where I'd prefer an attribute reference to return a > calculated value. Seems more flexible if allowed, and if not allowed, it > should be allowed. > > DeWayne >
