Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Su <derek.su@suse.com>
  • Loading branch information
derekbit committed Jun 4, 2024
1 parent ad77af3 commit 762d26a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
6 changes: 0 additions & 6 deletions app/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,6 @@ func start(c *cli.Context) (err error) {
return err
}

// if spdkEnabled {
// if err := cleanupStaledNvmeAndDmDevices(); err != nil {
// return err
// }
// }

// setup tls config
var tlsConfig *tls.Config
tlsDir := c.GlobalString("tls-dir")
Expand Down
22 changes: 12 additions & 10 deletions pkg/api/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,22 @@ func RPCToInstanceList(obj *rpc.InstanceListResponse) map[string]*Instance {
}

type InstanceStatus struct {
State string `json:"state"`
ErrorMsg string `json:"errorMsg"`
Conditions map[string]bool `json:"conditions"`
PortStart int32 `json:"portStart"`
PortEnd int32 `json:"portEnd"`
State string `json:"state"`
ErrorMsg string `json:"errorMsg"`
Conditions map[string]bool `json:"conditions"`
PortStart int32 `json:"portStart"`
PortEnd int32 `json:"portEnd"`
RemoteTarget bool `json:"remoteTarget"`
}

func RPCToInstanceStatus(obj *rpc.InstanceStatus) InstanceStatus {
return InstanceStatus{
State: obj.State,
ErrorMsg: obj.ErrorMsg,
Conditions: obj.Conditions,
PortStart: obj.PortStart,
PortEnd: obj.PortEnd,
State: obj.State,
ErrorMsg: obj.ErrorMsg,
Conditions: obj.Conditions,
PortStart: obj.PortStart,
PortEnd: obj.PortEnd,
RemoteTarget: obj.RemoteTarget,
}
}

Expand Down
11 changes: 6 additions & 5 deletions pkg/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,11 +711,12 @@ func engineResponseToInstanceResponse(e *spdkapi.Engine) *rpc.InstanceResponse {
DataEngine: rpc.DataEngine_DATA_ENGINE_V2,
},
Status: &rpc.InstanceStatus{
State: e.State,
ErrorMsg: e.ErrorMsg,
PortStart: e.Port,
PortEnd: e.Port,
Conditions: make(map[string]bool),
State: e.State,
ErrorMsg: e.ErrorMsg,
PortStart: e.Port,
PortEnd: e.Port,
Conditions: make(map[string]bool),
RemoteTarget: e.RemoteTarget,
},
}
}
Expand Down

0 comments on commit 762d26a

Please sign in to comment.