Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why tenant example returns null?

This is what I did:

public static void main(String[] args) {
    OSClient os = OSFactory.builder().endpoint("http://MyIPAddress:5000/v2.0")
            .credentials("admin", "admin").authenticate();
    System.out.println(os.identity().tenants().list());

    // Create a Tenant > doesn't work NPE
    Tenant t = os.identity().tenants().create(Builders.tenant().name("ABC Corporation").build());
    System.out.println(t.getName());
}

But t is null, I don't understand why.
Can anyone please clarify what am I doing wrong or point to me what may be the reason of such behavior?
Any kind of help is very much appreciated.
Thanks in advance.

Best regards,
mismas