func (client *Client) GetClient(Type string) (*gophercloud.ServiceClient, error) {
	if client.clientList[Type] != nil {
		return client.clientList[Type], nil
	}
	if client.provider == nil {
		return nil, fmt.Errorf(MsgConnectionFailed)
	}
	var err error
	switch Type {
	case "compute":
		client.clientList[Type], err = openstack.NewComputeV2(client.provider,
			gophercloud.EndpointOpts{})
	case "identity":
		client.clientList[Type], err = openstack.NewIdentityV3(client.provider,
			gophercloud.EndpointOpts{})
	case "image":
		client.clientList[Type], err = openstack.NewImageServiceV2(client.provider,
			gophercloud.EndpointOpts{})
	case "network":
		client.clientList[Type], err = openstack.NewNetworkV2(client.provider,
			gophercloud.EndpointOpts{})
	default:
		return nil, fmt.Errorf(MsgConnectionFailed)
	}
	if err != nil {
		return nil, fmt.Errorf(MsgConnectionFailed)
	}
	return client.clientList[Type], nil
}
client.GetClient() returns valid gophercloud.ServiceClient based on `Type` of service.
If ServiceClient does not exists then it lazily initializes it.

Valid values for Type:
* "compute"
* "identity"
* "image"
* "network"
package openstack
import (
	"fmt"
	"github.com/gophercloud/gophercloud"
	"github.com/gophercloud/gophercloud/openstack"
)
const (
	msgInvalidAuthOptions = "must provide non-nil gophercloud.AuthOptions to client.New()"
	MsgConnectionFailed   = "Failed to connect to openstack."
)
type Client struct {
	provider *gophercloud.ProviderClient
	clientList map[string]*gophercloud.ServiceClient
}
func New(config *gophercloud.AuthOptions) (*Client, error) {
	return newClient(config)
}
func newClient(config *gophercloud.AuthOptions) (*Client, error) {
	if config == nil {
		return nil, fmt.Errorf(msgInvalidAuthOptions)
	}
	providerClient, err := openstack.AuthenticatedClient(*config)
	if err != nil {
		return nil, err
	}
	c := &Client{
		provider:   providerClient,
		clientList: make(map[string]*gophercloud.ServiceClient),
	}
	return c, nil
}