My higher goal is to have State not store the workspace, context, nor credentials. See #210
We store Context and Credentials separately in the database. So it makes sense to keep them separate.
But having a single container that holds all runtime state simplifies matters.
Before
Passed Context and Credentials separately.
The State accessed them using State#workspace#context and State#workspace#credentials.
If we go towards removing State#workspace, run_nonblock(context, credentials) will provide that data.
After
Context contains the context and Context#to_h returns the same value. But Context#credentials will contain the sensitive credentials.
The State accesses them using State#workspace#context and `State#workspace#context#credentials.
If we go towards removing State#workspace, run_nonblock(context) will be able to provide that data.
Compromise
Would have liked to remove Workspace#context and Workspace#initialize(..., context), but left it in there until we update manageiq-providers-workspace.
Overview
My higher goal is to have
State
not store theworkspace
,context
, norcredentials
. See #210We store
Context
andCredentials
separately in the database. So it makes sense to keep them separate.But having a single container that holds all runtime state simplifies matters.
Before
Passed
Context
andCredentials
separately. TheState
accessed them usingState#workspace#context
andState#workspace#credentials
.If we go towards removing
State#workspace
,run_nonblock(context, credentials)
will provide that data.After
Context
contains the context andContext#to_h
returns the same value. ButContext#credentials
will contain the sensitive credentials.The
State
accesses them usingState#workspace#context
and `State#workspace#context#credentials.If we go towards removing
State#workspace
,run_nonblock(context)
will be able to provide that data.Compromise
Would have liked to remove
Workspace#context
andWorkspace#initialize(..., context
), but left it in there until we updatemanageiq-providers-workspace
.