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