-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Sites import Site, Sites
from PLC.Auth import Auth
+from PLC.Methods.AddSiteTag import AddSiteTag
+
can_update = lambda (field, value): field in \
['name', 'abbreviated_name', 'login_base',
'is_public', 'latitude', 'longitude', 'url',
self.event_objects = {'Site': [site['site_id']]}
self.message = 'Site %d created' % site['site_id']
+ # Set Site HRN
+ root_auth = self.api.config.PLC_HRN_ROOT
+ tagname = 'hrn'
+ tagvalue = '.'.join([root_auth, site['login_base']])
+ AddSiteTag(self.api).__call__(auth,site['site_id'],tagname,tagvalue)
+
+
return site['site_id']