Quantcast
Channel: VMware Communities : Discussion List - Virtual Disk Development Kit
Viewing all articles
Browse latest Browse all 2039

Help in understanding users and login steps

$
0
0

Hi,

 

I am beginning developing c# applications using vcloud sdk for .net. In my first 'hello world' application I am just trying to logon to my vCloud (vCD).

 

192.168.1.10 - IP address of vCD

administrator - local administrator user of my vcloud

myorg - one of the organizations in my vCloud

user1 - one of the local users in 'myorg'

Public Addresses in my cloud-

     VCD Public URL -https://192.168.1.10/cloud

     VCD public console proxy address - 192.168.1.10

     VCD public REST API base URL -  https://192.168.1.10/

 

Case 1-

Intention is to connect to vCD as administrator and browse provider VDCs, Organizations, users, etc. Following code fails.

 

vCloudClient vc = new vCloudClient("https://192.168.1.10", com.vmware.vcloud.sdk.constants.Version.V5_5);

vc.Login("administrator", "password");

 

This fails with exception message -  "The given header was not found."

 

Case 2-

Attempt to logon as organization user.

 

vCloudClient vc = new vCloudClient("https://192.168.1.10", com.vmware.vcloud.sdk.constants.Version.V5_5);

vc.Login("user1@myorg", "password");

 

Login succeeds. I believe the user is logged on inside the organization and can execute APIs further to work with the organization.

 

Case 3-

GET http://192.168.1.10/api/versions

returns login URL -  https://192.168.1.10/api/sessions

I tried this URL in vCloudClient constructor. Then for any user, Login method fails with exception message - "The request has invalid accept header. Supported API versions are: [1.5, 5.1, 5.5]"


I am confused here. I do not understand how to use of login URL returned by GET http://192.168.1.10/api/versions. I would like to understand why the cases 1 and 2 fail. Am I using wrong classes or URLs or is the administrator user also part of some organization?

 

It would be great if somebody points me to references (for class relationships, operations, workflows) which will help me gear up faster with .NET SDK. There seems to be quite good documentation about vCloud REST APIs. However, the documentation in the downloaded .net sdk does not seem to be verbose.

 

Thanks,

Vivek.


Viewing all articles
Browse latest Browse all 2039

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>