Return the created env on create req
This commit is contained in:
parent
e6e59badf9
commit
84819c5842
@ -145,12 +145,12 @@ func (e *EnvironmentsServer) List(in *proto.ListOptions, stream proto.Environmen
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, env := range envs {
|
for _, env := range envs {
|
||||||
provider, err := providers.GetProvider(environment.Data.Provider)
|
provider, err := providers.GetProvider(env.Data.Provider)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
k8s, err := kubernetes.GetKubernetes(environment.Data.Kubernetes)
|
k8s, err := kubernetes.GetKubernetes(env.Data.Kubernetes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -163,8 +163,8 @@ func (e *EnvironmentsServer) List(in *proto.ListOptions, stream proto.Environmen
|
|||||||
Spec: &proto.EnvironmentSpec{
|
Spec: &proto.EnvironmentSpec{
|
||||||
Provider: proto.Provider(proto.Provider_value[provider.RawProviderName()]),
|
Provider: proto.Provider(proto.Provider_value[provider.RawProviderName()]),
|
||||||
Kubernetes: proto.Kubernetes(proto.Kubernetes_value[k8s.RawKubernetesName()]),
|
Kubernetes: proto.Kubernetes(proto.Kubernetes_value[k8s.RawKubernetesName()]),
|
||||||
ServerLocation: proto.Location(proto.Location_value[provider.RawServerLocation(environment.Data.Location)]),
|
ServerLocation: proto.Location(proto.Location_value[provider.RawServerLocation(env.Data.Location)]),
|
||||||
ServerType: proto.ServerType(proto.ServerType_value[provider.RawServerType(environment.Data.ServerType)]),
|
ServerType: proto.ServerType(proto.ServerType_value[provider.RawServerType(env.Data.ServerType)]),
|
||||||
},
|
},
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user