Database Reference
In-Depth Information
and (__inttarg['EMD_URL'] == None or \
__agentcompfilt.search(__inttarg['EMD_URL'])):
self.targs.append(__inttarg)
__myoperator = operator
for __myop in sort:
__myoperator = operator.itemgetter(__myop)
self.targssort = sorted(self.targs, key=__myoperator)
if show == True:
self.show()
def show(self):
"""
show() can be called from an instance directly or
as a parameter from some of the other functions.
Prints a neatly formatted display of the target name
and type along with all of the target's currently
defined property names and values.
"""
print('%-5s%-40s%s' % (
' ', 'TARGET_TYPE'.ljust(40, '.'),
'TARGET_NAME'))
print('%-15s%-30s%s\n%s\n' % (
' ', 'PROPERTY_NAME'.ljust(30, '.'),
'PROPERTY_VALUE', '=' * 80))
for __inttarg in self.targssort:
print('%-5s%-40s%s' % (
' ', __inttarg['TARGET_TYPE'].ljust(40, '.'),
__inttarg['TARGET_NAME']))
self.__showprops(__inttarg['TARGET_GUID'])
print('')
def __showprops(self, guid):
"""
__showprops() prints the target properties for the
target with the unique guid matching the 'guid'
variable passed to the function. This function is
called by the show() function for each target to
print out the corresponding properties of the target.
This function is called by other functions and
should never be called directly.
"""
self.__loadtargobjects()
for __inttargprops in self.targprops:
__intpropname = \
__inttargprops['PROPERTY_NAME'].split('_')
if __inttargprops['TARGET_GUID'] == guid and \
__intpropname[0:2] == ['orcl', 'gtp']:
print('%-15s%-30s%s' %
(' ', ' '.join(__intpropname[2:]).ljust(
30, '.'),
__inttargprops['PROPERTY_VALUE']))
Search WWH ::




Custom Search