4.10.1
This commit is contained in:
@@ -36,6 +36,7 @@ import (
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/interfaces"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn"
|
||||
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
@@ -430,3 +431,19 @@ func (config *ControllerCfg) CloudBroker() *cloudbroker.CloudBroker {
|
||||
return &cloudbroker.CloudBroker{}
|
||||
}
|
||||
}
|
||||
|
||||
func (config *ControllerCfg) SDN() *sdn.SDN {
|
||||
switch config.auth_mode_code {
|
||||
case MODE_LEGACY:
|
||||
client, _ := config.caller.(*decort.LegacyDecortClient)
|
||||
return client.SDN()
|
||||
case MODE_DECS3O:
|
||||
client, _ := config.caller.(*decort.DecortClient)
|
||||
return client.SDN()
|
||||
case MODE_BVS:
|
||||
client, _ := config.caller.(*decort.BVSDecortClient)
|
||||
return client.SDN()
|
||||
default:
|
||||
return &sdn.SDN{}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user