Skip to content
Snippets Groups Projects
Commit 043e509d authored by Neil-Jocelyn Schark's avatar Neil-Jocelyn Schark
Browse files

parameters

parent 9a4a552c
Branches
No related tags found
2 merge requests!11Big boom integration,!6Draft: Akms ckms api implementation
Pipeline #180987 passed
...@@ -54,6 +54,8 @@ type Config struct { ...@@ -54,6 +54,8 @@ type Config struct {
Sync bool `yaml:"Sync"` Sync bool `yaml:"Sync"`
QuantumModule QuantumModule `yaml:"QuantumModule"` QuantumModule QuantumModule `yaml:"QuantumModule"`
} `yaml:"Peers"` } `yaml:"Peers"`
AkmsURL string `yaml:"AkmsURL"`
AkmsCkmsServerPort string `yaml:"AkmsCkmsServerPort"`
} }
type QuantumModule struct { type QuantumModule struct {
...@@ -126,8 +128,10 @@ func NewEkmsClient(bootInfo *Config) (myInfo *ekmsInfo) { ...@@ -126,8 +128,10 @@ func NewEkmsClient(bootInfo *Config) (myInfo *ekmsInfo) {
// TODO: return an error. // TODO: return an error.
func emulatedKMS(config *Config, id uuid.UUID, peerChannel chan string) *kms.EKMS { func emulatedKMS(config *Config, id uuid.UUID, peerChannel chan string) *kms.EKMS {
// Attach to eKMS // Attach to eKMS
emuKMS := kms.NewEKMS(config.Name, id, os.Stdout, log.TraceLevel, false, config.InterComAddr) emuKMS := kms.NewEKMS(config.Name, id, os.Stdout, log.TraceLevel, false, config.InterComAddr, config.AkmsURL)
akmsCkmsReceiverServer := akmsCkmsServer.NewAKMSReceiver("4567", emuKMS)
// Create AKMSReceiverServer object
akmsCkmsReceiverServer := akmsCkmsServer.NewAKMSReceiver(config.AkmsCkmsServerPort, emuKMS)
var qm kms.QuantumModule var qm kms.QuantumModule
var err error var err error
...@@ -172,8 +176,9 @@ func emulatedKMS(config *Config, id uuid.UUID, peerChannel chan string) *kms.EKM ...@@ -172,8 +176,9 @@ func emulatedKMS(config *Config, id uuid.UUID, peerChannel chan string) *kms.EKM
// Start the SDN/management and key retrieval interface // Start the SDN/management and key retrieval interface
go kms.StartETSI(config.GRPCAddr, emuKMS) go kms.StartETSI(config.GRPCAddr, emuKMS)
// Start the AKMSReceiverServer // Start the akmsCkmsReceiverServer
go akmsCkmsReceiverServer.Serve() go akmsCkmsReceiverServer.Serve()
return emuKMS return emuKMS
} }
......
...@@ -65,7 +65,7 @@ type QuantumElementInterface interface { ...@@ -65,7 +65,7 @@ type QuantumElementInterface interface {
GetQlID() qlElementId GetQlID() qlElementId
}*/ }*/
func NewEKMS(kmsName string, kmsUUID uuid.UUID, logOutput io.Writer, logLevel log.Level, logInJson bool, interComAddr string) (newEKMS *EKMS) { func NewEKMS(kmsName string, kmsUUID uuid.UUID, logOutput io.Writer, logLevel log.Level, logInJson bool, interComAddr string, akmsURL string) (newEKMS *EKMS) {
/* /*
* Setup logging * Setup logging
*/ */
...@@ -86,7 +86,7 @@ func NewEKMS(kmsName string, kmsUUID uuid.UUID, logOutput io.Writer, logLevel lo ...@@ -86,7 +86,7 @@ func NewEKMS(kmsName string, kmsUUID uuid.UUID, logOutput io.Writer, logLevel lo
log.SetReportCaller(false) log.SetReportCaller(false)
} }
ckmsAkmsClient := akmsCkmsClient.NewCkmsAkmsClient("127.0.0.1:1234") ckmsAkmsClient := akmsCkmsClient.NewCkmsAkmsClient(akmsURL)
createdEKMS := &EKMS{ createdEKMS := &EKMS{
kmsName: kmsName, kmsName: kmsName,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment