Database Reference
In-Depth Information
def setprops(self, show=False):
"""
setprops() is called directly from the class or
from an instance and calls the EM CLI function that
applies the defined set of properties to each target
in the filtered list of targets. The 'show' boolean
parameter can be set to True to call the show()
function after the properties have been applied.
"""
assert len(self.propdict) > 0, \
'The propdict parameter must contain ' + \
'at least one property. Use the ' + \
'props() function to modify.'
self.reloadtargs = True
__delim = '@#&@#&&'
__subseparator = 'property_records=' + __delim
for __inttarg in self.targs:
for __propkey, __propvalue \
in self.propdict.items():
__property_records = __inttarg['TARGET_NAME'] + \
__delim + __inttarg['TARGET_TYPE'] + \
__delim + __propkey + __delim + __propvalue
print('Target: ' + __inttarg['TARGET_NAME'] +
' (' + __inttarg['TARGET_TYPE'] +
')\n\tProperty: '
+ __propkey + '\n\tValue: ' +
__propvalue + '\n')
emcli.set_target_property_value(
subseparator=__subseparator,
property_records=__property_records)
if show == True:
self.show()
Search WWH ::




Custom Search