From: Tony Mack Date: Fri, 19 Jan 2007 20:13:34 +0000 (+0000) Subject: - added logging variable 'object_type' X-Git-Tag: pycurl-7_13_1~63 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=238d5594712b9d918636501e754a8f5816313e25;p=plcapi.git - added logging variable 'object_type' --- diff --git a/PLC/Methods/AddPerson.py b/PLC/Methods/AddPerson.py index 511040f..bd634cb 100644 --- a/PLC/Methods/AddPerson.py +++ b/PLC/Methods/AddPerson.py @@ -30,6 +30,8 @@ class AddPerson(Method): returns = Parameter(int, 'New person_id (> 0) if successful') + object_type = 'Person' + def call(self, auth, person_fields): person_fields = dict(filter(can_update, person_fields.items())) diff --git a/PLC/Methods/AddPersonKey.py b/PLC/Methods/AddPersonKey.py index 0c36284..0bba3a1 100644 --- a/PLC/Methods/AddPersonKey.py +++ b/PLC/Methods/AddPersonKey.py @@ -29,6 +29,8 @@ class AddPersonKey(Method): returns = Parameter(int, 'New key_id (> 0) if successful') + object_type = 'Person' + def call(self, auth, person_id_or_email, key_fields): key_fields = dict(filter(can_update, key_fields.items())) diff --git a/PLC/Methods/AddRoleToPerson.py b/PLC/Methods/AddRoleToPerson.py index 3b583f7..b90f1f9 100644 --- a/PLC/Methods/AddRoleToPerson.py +++ b/PLC/Methods/AddRoleToPerson.py @@ -27,6 +27,8 @@ class AddRoleToPerson(Method): returns = Parameter(int, '1 if successful') + object_type = 'Person' + def call(self, auth, role_id_or_name, person_id_or_email): # Get role diff --git a/PLC/Methods/AdmDeleteAllPersonKeys.py b/PLC/Methods/AdmDeleteAllPersonKeys.py index 9f038f9..c4800ba 100644 --- a/PLC/Methods/AdmDeleteAllPersonKeys.py +++ b/PLC/Methods/AdmDeleteAllPersonKeys.py @@ -30,6 +30,8 @@ class AdmDeleteAllPersonKeys(Method): returns = Parameter(int, '1 if successful') + object_type = 'Person' + def call(self, auth, person_id_or_email): # Get account information persons = Persons(self.api, [person_id_or_email]) diff --git a/PLC/Methods/AdmDeletePersonKeys.py b/PLC/Methods/AdmDeletePersonKeys.py index fd24eef..f23a472 100644 --- a/PLC/Methods/AdmDeletePersonKeys.py +++ b/PLC/Methods/AdmDeletePersonKeys.py @@ -29,6 +29,8 @@ class AdmDeletePersonKeys(Method): returns = Parameter(int, '1 if successful') + object_type = 'Person' + def call(self, auth, person_id_or_email, key_ids): # Get account information persons = Persons(self.api, [person_id_or_email]) diff --git a/PLC/Methods/AdmGetPersonRoles.py b/PLC/Methods/AdmGetPersonRoles.py index 024b93c..e05f955 100644 --- a/PLC/Methods/AdmGetPersonRoles.py +++ b/PLC/Methods/AdmGetPersonRoles.py @@ -33,6 +33,8 @@ class AdmGetPersonRoles(Method): returns = dict + object_type = 'Person' + def call(self, auth, person_id_or_email): # Get account information persons = Persons(self.api, [person_id_or_email]) diff --git a/PLC/Methods/AdmIsPersonInRole.py b/PLC/Methods/AdmIsPersonInRole.py index b32ab03..b031b64 100644 --- a/PLC/Methods/AdmIsPersonInRole.py +++ b/PLC/Methods/AdmIsPersonInRole.py @@ -29,6 +29,8 @@ class AdmIsPersonInRole(Method): returns = Parameter(int, "1 if account has role, 0 otherwise") + object_type = 'Person' + def call(self, auth, person_id_or_email, role_id_or_name): # This is a totally fucked up function. I have no idea why it # exists or who calls it, but here is how it is supposed to diff --git a/PLC/Methods/DeletePerson.py b/PLC/Methods/DeletePerson.py index d789adc..dcb2e52 100644 --- a/PLC/Methods/DeletePerson.py +++ b/PLC/Methods/DeletePerson.py @@ -25,6 +25,8 @@ class DeletePerson(Method): returns = Parameter(int, '1 if successful') + object_type = 'Person' + def call(self, auth, person_id_or_email): # Get account information diff --git a/PLC/Methods/DeleteRoleFromPerson.py b/PLC/Methods/DeleteRoleFromPerson.py index 009b0b2..439857f 100644 --- a/PLC/Methods/DeleteRoleFromPerson.py +++ b/PLC/Methods/DeleteRoleFromPerson.py @@ -27,6 +27,8 @@ class DeleteRoleFromPerson(Method): returns = Parameter(int, '1 if successful') + object_type = 'Person' + def call(self, auth, role_id_or_name, person_id_or_email): # Get role diff --git a/PLC/Methods/ResetPassword.py b/PLC/Methods/ResetPassword.py index 1486a82..43ee8ba 100644 --- a/PLC/Methods/ResetPassword.py +++ b/PLC/Methods/ResetPassword.py @@ -39,6 +39,8 @@ class ResetPassword(Method): returns = Parameter(int, '1 if verification_key is valid') + object_type = 'Person' + def call(self, auth, person_id_or_email, verification_key = None, verification_expires = None): # Get account information persons = Persons(self.api, [person_id_or_email]) diff --git a/PLC/Methods/SetPersonPrimarySite.py b/PLC/Methods/SetPersonPrimarySite.py index 86e96c9..644826b 100644 --- a/PLC/Methods/SetPersonPrimarySite.py +++ b/PLC/Methods/SetPersonPrimarySite.py @@ -25,6 +25,8 @@ class SetPersonPrimarySite(Method): returns = Parameter(int, '1 if successful') + object_type = 'Person' + def call(self, auth, person_id_or_email, site_id_or_login_base): # Get account information persons = Persons(self.api, [person_id_or_email]) diff --git a/PLC/Methods/UpdatePerson.py b/PLC/Methods/UpdatePerson.py index 85c4a71..594f1ff 100644 --- a/PLC/Methods/UpdatePerson.py +++ b/PLC/Methods/UpdatePerson.py @@ -33,6 +33,8 @@ class UpdatePerson(Method): returns = Parameter(int, '1 if successful') + object_type = 'Person' + def call(self, auth, person_id_or_email, person_fields): person_fields = dict(filter(can_update, person_fields.items()))