Commit 0cf9a461 authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Adapt to changes at the backend

parent 2425d630
......@@ -35,9 +35,11 @@ type (
User s.User `json:"user"`
Credentials map[string][]s.Credential `json:"credentials"`
Questionnaire map[string]string `json:"questionnaire"`
VO vo `json:"vo"`
// Service may be overwritten by scheduleTask
// VO is only set if this is a VODeployment
VO vo `json:"vo,omitempty"`
// Service may be filled by scheduleTask
Service service `json:"service,omitempty"`
// Exchange and RoutingKey are inserted when we receive the task via RabbitMQ
......@@ -193,7 +195,6 @@ func (c *config) taskResponder() {
}
}
// IMPLEMENTATIONS
func (c *config) fetchTasks() (err error) {
if len(c.EntitlementToServices) == 0 && len(c.GroupToServices) == 0 {
log.Printf("[HTTP] Not fetching because the are no services to fetch")
......@@ -293,7 +294,7 @@ func (c *config) handleTask(t task) (err error) {
StateTarget: t.StateTarget,
User: t.User,
Questionnaire: t.Questionnaire,
Credentials: t.Credentials,
Credentials: t.User.Credentials,
}
iBytes, err := input.Marshal()
......@@ -379,7 +380,7 @@ func (c *config) handleTask(t task) (err error) {
// credentials to have the same state as the whole execution (output.State)
if output.UserCredentialStates == nil {
var userCredentialStates = make(s.UserCredentialStates)
for credType, credList := range t.Credentials {
for credType, credList := range t.User.Credentials {
for _, credential := range credList {
if stateMap, ok := userCredentialStates[credType]; !ok {
userCredentialStates[credType] = map[string]s.State{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment