Fixes #237 Also update the code to use the constant values for api.ReadWriteOnce and api.ReadOnlyMany.