Esempio n. 1
0
        /// <summary>
        /// Create ACL Token
        /// </summary>
        private static void CreateACLToken()
        {
            var aclGovern = new ACLGovern();
            var result    = aclGovern.CreateACLToken(new ACLTokenParmeter {
                ID = "a0e4a748-2192-161a-0510-9bf59fe950bd", Name = "acl01", Type = "client"
            }).GetAwaiter().GetResult();

            Console.WriteLine($"result={result.result}");
            Console.WriteLine($"back content={EntityToString(result.backBootstrapACLs)}");
        }
Esempio n. 2
0
 static void CreateACLToken()
 {
     try
     {
         var acl    = new ACLGovern();
         var result = acl.CreateACLToken(new ACLTokenParmeter {
             ID = "acl001", Name = "dc1", Rules = "", Type = "management"
         }).GetAwaiter().GetResult();
         Console.WriteLine(result.result);
         Console.WriteLine(result.backBootstrapACLs.ID);
     }
     catch (Exception exc)
     {
         Console.WriteLine($"错误:{exc.Message}");
     }
 }