Feature/filestorage securityservices create (#132)

* sfs: Add support for security services Create

* sfs: Add acceptance tests for security service Create

* sfs: Fix comments
diff --git a/openstack/sharedfilesystems/v2/securityservices/testing/fixtures.go b/openstack/sharedfilesystems/v2/securityservices/testing/fixtures.go
new file mode 100644
index 0000000..78adc48
--- /dev/null
+++ b/openstack/sharedfilesystems/v2/securityservices/testing/fixtures.go
@@ -0,0 +1,52 @@
+package testing
+
+import (
+	"fmt"
+	"net/http"
+	"testing"
+
+	th "github.com/gophercloud/gophercloud/testhelper"
+	fake "github.com/gophercloud/gophercloud/testhelper/client"
+)
+
+func MockCreateResponse(t *testing.T) {
+	th.Mux.HandleFunc("/security-services", func(w http.ResponseWriter, r *http.Request) {
+		th.TestMethod(t, r, "POST")
+		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
+		th.TestHeader(t, r, "Content-Type", "application/json")
+		th.TestHeader(t, r, "Accept", "application/json")
+		th.TestJSONRequest(t, r, `
+        {
+            "security_service": {
+                "description": "Creating my first Security Service",
+                "dns_ip": "10.0.0.0/24",
+                "user": "demo",
+                "password": "***",
+                "type": "kerberos",
+                "name": "SecServ1"
+            }
+        }`)
+
+		w.Header().Add("Content-Type", "application/json")
+		w.WriteHeader(http.StatusOK)
+
+		fmt.Fprintf(w, `
+        {
+            "security_service": {
+                "status": "new",
+                "domain": null,
+                "project_id": "16e1ab15c35a457e9c2b2aa189f544e1",
+                "name": "SecServ1",
+                "created_at": "2015-09-07T12:19:10.695211",
+                "updated_at": null,
+                "server": null,
+                "dns_ip": "10.0.0.0/24",
+                "user": "demo",
+                "password": "supersecret",
+                "type": "kerberos",
+                "id": "3c829734-0679-4c17-9637-801da48c0d5f",
+                "description": "Creating my first Security Service"
+            }
+        }`)
+	})
+}
diff --git a/openstack/sharedfilesystems/v2/securityservices/testing/requests_test.go b/openstack/sharedfilesystems/v2/securityservices/testing/requests_test.go
new file mode 100644
index 0000000..2b3325e
--- /dev/null
+++ b/openstack/sharedfilesystems/v2/securityservices/testing/requests_test.go
@@ -0,0 +1,53 @@
+package testing
+
+import (
+	"testing"
+
+	"github.com/gophercloud/gophercloud"
+	"github.com/gophercloud/gophercloud/openstack/sharedfilesystems/v2/securityservices"
+	th "github.com/gophercloud/gophercloud/testhelper"
+	"github.com/gophercloud/gophercloud/testhelper/client"
+)
+
+// Verifies that a security service can be created correctly
+func TestCreate(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	MockCreateResponse(t)
+
+	options := &securityservices.CreateOpts{
+		Name:        "SecServ1",
+		Description: "Creating my first Security Service",
+		DNSIP:       "10.0.0.0/24",
+		User:        "demo",
+		Password:    "***",
+		Type:        "kerberos",
+	}
+
+	s, err := securityservices.Create(client.ServiceClient(), options).Extract()
+	th.AssertNoErr(t, err)
+
+	th.AssertEquals(t, s.Name, "SecServ1")
+	th.AssertEquals(t, s.Description, "Creating my first Security Service")
+	th.AssertEquals(t, s.User, "demo")
+	th.AssertEquals(t, s.DNSIP, "10.0.0.0/24")
+	th.AssertEquals(t, s.Password, "supersecret")
+	th.AssertEquals(t, s.Type, "kerberos")
+}
+
+// Verifies that a security service cannot be created without a type
+func TestCreateFails(t *testing.T) {
+	options := &securityservices.CreateOpts{
+		Name:        "SecServ1",
+		Description: "Creating my first Security Service",
+		DNSIP:       "10.0.0.0/24",
+		User:        "demo",
+		Password:    "***",
+	}
+
+	_, err := securityservices.Create(client.ServiceClient(), options).Extract()
+	if _, ok := err.(gophercloud.ErrMissingInput); !ok {
+		t.Fatal("ErrMissingInput was expected to occur")
+	}
+}