Adding documentation
diff --git a/openstack/db/v1/instances/doc.go b/openstack/db/v1/instances/doc.go
index 98a1bb3..dc5c90f 100644
--- a/openstack/db/v1/instances/doc.go
+++ b/openstack/db/v1/instances/doc.go
@@ -1 +1,7 @@
+// Package instances provides information and interaction with the instance API
+// resource in the OpenStack Database service.
+//
+// A database instance is an isolated database environment with compute and
+// storage resources in a single tenant environment on a shared physical host
+// machine.
package instances
diff --git a/openstack/db/v1/instances/requests.go b/openstack/db/v1/instances/requests.go
index fc971fd..d87fdec 100644
--- a/openstack/db/v1/instances/requests.go
+++ b/openstack/db/v1/instances/requests.go
@@ -35,6 +35,7 @@
Users users.BatchCreateOpts
}
+// ToInstanceCreateMap will render a JSON map.
func (opts CreateOpts) ToInstanceCreateMap() (map[string]interface{}, error) {
if opts.Size > 300 || opts.Size < 1 {
return nil, fmt.Errorf("Size (GB) must be between 1-300")
diff --git a/openstack/db/v1/instances/results.go b/openstack/db/v1/instances/results.go
index ae3b9e0..f85db81 100644
--- a/openstack/db/v1/instances/results.go
+++ b/openstack/db/v1/instances/results.go
@@ -3,19 +3,11 @@
import (
"github.com/mitchellh/mapstructure"
"github.com/rackspace/gophercloud"
+ "github.com/rackspace/gophercloud/openstack/db/v1/flavors"
"github.com/rackspace/gophercloud/openstack/db/v1/users"
"github.com/rackspace/gophercloud/pagination"
)
-// Flavor represents information about a hardware flavor for a database instance.
-type Flavor struct {
- // The unique identifier for a flavor.
- ID string
-
- // Various links which allow a user to reference the flavor.
- Links []gophercloud.Link
-}
-
// Volume represents information about an attached volume for a database instance.
type Volume struct {
// The size in GB of the volume
@@ -33,7 +25,7 @@
Updated string //time.Time
// Indicates the hardware flavor the instance uses.
- Flavor Flavor
+ Flavor flavors.Flavor
// A DNS-resolvable hostname associated with the database instance (rather
// than an IPv4 address). Since the hostname always resolves to the correct