from sfa.util.plxrn import hrn_to_pl_slicename, slicename_to_hrn
from sfa.trust.certificate import Keypair, Certificate
from sfa.util.plxrn import hrn_to_pl_slicename, slicename_to_hrn
from sfa.trust.certificate import Keypair, Certificate
-def get_server(url=None, port=None, keyfile=None, certfile=None,verbose=False):
+def server_proxy(url=None, port=None, keyfile=None, certfile=None,verbose=False):
- registry = get_server(url = registry, keyfile=keyfile, certfile=certfile)
- registry.get_key()
+ registry = server_proxy(url = registry, keyfile=keyfile, certfile=certfile)
+ registry.get_key_from_incoming_ip()
def create_server_keypair(keyfile=None, certfile=None, hrn="component", verbose=False):
"""
def create_server_keypair(keyfile=None, certfile=None, hrn="component", verbose=False):
"""
cert.save_to_file(certfile, save_parents=True)
@handle_gid_mismatch_exception
cert.save_to_file(certfile, save_parents=True)
@handle_gid_mismatch_exception
create_server_keypair(keyfile, certfile, hrn, verbose)
# get credential from registry
create_server_keypair(keyfile, certfile, hrn, verbose)
# get credential from registry
cert = Certificate(filename=certfile)
cert_str = cert.save_to_string(save_parents=True)
cred = registry.GetSelfCredential(cert_str, 'node', hrn)
cert = Certificate(filename=certfile)
cert_str = cert.save_to_string(save_parents=True)
cred = registry.GetSelfCredential(cert_str, 'node', hrn)
# make sure server key cert pair exists
create_server_keypair(keyfile=keyfile, certfile=certfile, hrn=hrn, verbose=verbose)
# make sure server key cert pair exists
create_server_keypair(keyfile=keyfile, certfile=certfile, hrn=hrn, verbose=verbose)
# make sure server key cert pair exists
create_server_keypair(keyfile=keyfile, certfile=certfile, hrn=hrn, verbose=verbose)
# make sure server key cert pair exists
create_server_keypair(keyfile=keyfile, certfile=certfile, hrn=hrn, verbose=verbose)
- from sfa.plc.plcdriver import PlcComponentApi
- api = PlcComponentApi()
+ from sfa.generic import Generic
+ generic=Generic.the_flavour()
+ api = generic.make_api(interface='component')
xids_tuple = api.driver.nodemanager.GetXIDs()
slices = eval(xids_tuple[1])
slicenames = slices.keys()
xids_tuple = api.driver.nodemanager.GetXIDs()
slices = eval(xids_tuple[1])
slicenames = slices.keys()