I am new to OpenStack, just a few hours experience. I want to create a new machine using OpenStack.NET and this is the code that I come up with.
var identityUrl = "http://server:5000/v2.0";
var imageUrl = "http://server:9292";
var username = "username";
var password = "password";
var cloudId = new CloudIdentity() { Username = username, Password = password };
var cloudIdProvider = new CloudIdentityProvider(new Uri(identityUrl));
cloudIdProvider.Authenticate(cloudId);
var cloudServersProvider = new CloudServersProvider(cloudId, cloudIdProvider);
var newServer = cloudServersProvider.CreateServer("cloudServerName", "Windows Server 2012", "m1.medium");
identityUrl
is the url for identity service
imageUrl
is the url for image service
I can authenticate on cloudIdProvider.Authenticate(cloudId);
line so I think the identity service and username/password are correct.
When I debug on cloudServersProvider.CreateServer("cloudServerName", "Windows Server 2012", "m1.medium");
, it throws No region was provided, the service does not provide a region-independent endpoint, and there is no default region set for the user's account.
exception which I don't know how to fix it.