File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
internal/namespaces/inference/v1beta1 Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -32,15 +32,19 @@ func endpointCreateBuilder(c *core.Command) *core.Command {
32
32
createEndpointCustomRequest := argsI .(* createEndpointRequestCustom )
33
33
createEndpointreq := createEndpointCustomRequest .CreateEndpointRequest
34
34
endpoint := createEndpointCustomRequest .Endpoint
35
+ endpointToCreate := inference.EndpointSpec {
36
+ Public : nil ,
37
+ PrivateNetwork : nil ,
38
+ DisableAuth : endpoint .DisableAuth ,
39
+ }
35
40
if endpoint .IsPublic {
36
41
publicEndpoint := & inference.EndpointSpecPublic {}
37
- endpointToCreate := inference.EndpointSpec {
38
- Public : publicEndpoint ,
39
- PrivateNetwork : nil ,
40
- DisableAuth : endpoint .DisableAuth ,
41
- }
42
- createEndpointreq .Endpoint = & endpointToCreate
42
+ endpointToCreate .Public = publicEndpoint
43
+ }
44
+ if endpoint .PrivateNetwork != nil && endpoint .PrivateNetwork .PrivateNetworkID != "" {
45
+ endpointToCreate .PrivateNetwork = & inference.EndpointSpecPrivateNetwork {PrivateNetworkID : endpoint .PrivateNetwork .PrivateNetworkID }
43
46
}
47
+ createEndpointreq .Endpoint = & endpointToCreate
44
48
45
49
return runner (ctx , createEndpointreq )
46
50
}
You can’t perform that action at this time.
0 commit comments