how to modify floder's attribute by script
I create a folder in ZMI, and add several attributes in it. In the folder, I add a Script that modify the folder's attribute. How should I do?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - --On 27. Dezember 2006 16:18:05 +0800 nienfeng <nienfeng@multisuns.com.tw> wrote:
I create a folder in ZMI, and add several attributes in it. In the folder, I add a Script that modify the folder's attribute. How should I do?
<http://plope.com/Books/2_7Edition/AppendixB.stx#2-279> - -aj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (Darwin) iD8DBQFFkirsCJIWIbr9KYwRAp2/AKDBLjLlt9QkNmvbFEC0MF0kv2FFOgCeMc5M KSrGHjhUzK7mZUM//CeNtcI= =855v -----END PGP SIGNATURE-----
nienfeng :
I create a folder in ZMI, and add several attributes in it. In the folder, I add a Script that modify the folder's attribute. How should I do?
I find it : manage_changeProperties() but There are still something I don't know. EX: Email/ (folder), has 3 properties: mTo, mFrom, mCC MailHost(Mailhost) set (Script Python) in set: ## Script (Python) "set" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters= ##title= print container.propertyItems() # output: [('title', ''), ('mTo', 'nienfeng@'), ('mFrom', 'nienfeng@'), ('mCC', '')] print container['MailHost'].propertyItems() # output: still as same as above print container['MailHost'] # output <MailHost at MailHost> container.manage_changeProperties(mTo='testTo') # It work container['MailHost'].manage_changeProperties(smtp_host='testHost') # It don't work and have not any ErrorMessage What's wrong with the container['MailHost'].propertyItems() and container['MailHost'].manage_changeProperties(smtp_host='testHost') Thanks. by nienfeng
participants (2)
-
Andreas Jung -
nienfeng