Java 类com.vmware.vim25.AuthorizationDescription 实例源码

项目:vijava    文件:ListAuthorization.java   
public static void main(String[] args) throws Exception
{
  if(args.length != 3)
  {
    System.out.println("Usage: java ListAuthorization <url> " 
      + "<username> <password>");
    return;
  }

  ServiceInstance si = new ServiceInstance(
      new URL(args[0]), args[1], args[2], true);

  AuthorizationManager am = si.getAuthorizationManager();
  AuthorizationDescription ad = am.getDescription();

  System.out.println("Descriptions of all privileges:");
  printDescriptions(ad.getPrivilege());

  System.out.println("Descriptions of all privilege groups:");
  printDescriptions( ad.getPrivilegeGroup());

  System.out.println("List of all privileges with details:");
  printPrivileges(am.getPrivilegeList());

  System.out.println("List of all the roles with details:");
  printRoles(am.getRoleList());

  si.getServerConnection().logout();
}
项目:jcloud-vsphere    文件:AuthorizationManagerApi.java   
AuthorizationDescription getDescription();