|
@@ -41,11 +41,12 @@ func capitalize(str string) string {
|
|
|
// O P E N S T A C K C L I E N T
|
|
|
|
|
|
type OpenstackIdentityClient struct {
|
|
|
- client *gophercloud.ServiceClient
|
|
|
- config *configparser.Configuration
|
|
|
- domainID string
|
|
|
- userRoleID string
|
|
|
- adminRoleID string
|
|
|
+ client *gophercloud.ServiceClient
|
|
|
+ config *configparser.Configuration
|
|
|
+ domainID string
|
|
|
+ userRoleID string
|
|
|
+ adminRoleID string
|
|
|
+ cloudAdminID string
|
|
|
}
|
|
|
|
|
|
func initIdentityClient() OpenstackIdentityClient {
|
|
@@ -57,6 +58,7 @@ func initIdentityClient() OpenstackIdentityClient {
|
|
|
domainID := section.ValueOf("projects_domain_id")
|
|
|
userRoleID := section.ValueOf("user_role_id")
|
|
|
adminRoleID := section.ValueOf("admin_role_id")
|
|
|
+ cloudAdminID := section.ValueOf("cloud_admin_id")
|
|
|
|
|
|
opts := gophercloud.AuthOptions{
|
|
|
IdentityEndpoint: section.ValueOf("identity_endpoint"),
|
|
@@ -75,11 +77,12 @@ func initIdentityClient() OpenstackIdentityClient {
|
|
|
checkErr(err)
|
|
|
|
|
|
osclient := OpenstackIdentityClient{
|
|
|
- client: client,
|
|
|
- config: config,
|
|
|
- domainID: domainID,
|
|
|
- userRoleID: userRoleID,
|
|
|
- adminRoleID: adminRoleID,
|
|
|
+ client: client,
|
|
|
+ config: config,
|
|
|
+ domainID: domainID,
|
|
|
+ userRoleID: userRoleID,
|
|
|
+ adminRoleID: adminRoleID,
|
|
|
+ cloudAdminID: cloudAdminID,
|
|
|
}
|
|
|
|
|
|
return osclient
|