1 from sfa.util.method import Method
2 from sfa.util.sfalogging import logger
4 from sfa.storage.parameter import Parameter
6 class get_key_from_incoming_ip(Method):
8 Generate a new keypair and gid for requesting caller (component/node).
9 This is a myplc-specific API call used by component manager
10 @return 1 If successful
13 interfaces = ['registry']
17 returns = Parameter(int, "1 if successful, faults otherwise")
20 if hasattr(self.api.manager,'get_key_from_incoming_ip'):
21 return self.api.manager.get_key_from_incoming_ip (api)
23 logger.warning("get_key_from_incoming_ip not supported by registry manager")