コード例 #1
0
        // Token: 0x0600038B RID: 907 RVA: 0x00007614 File Offset: 0x00005814
        public UserTaskResp AddUser(AddUserReq req)
        {
            string text = RestClientUtil.sendRequest("POST", "/service/users", req, this.bean, "AddUser");

            UserResource.log.Info("AddUser result : " + text);
            return(JsonConvert.DeserializeObject <UserTaskResp>(text));
        }
コード例 #2
0
        // Token: 0x06000272 RID: 626 RVA: 0x000061F0 File Offset: 0x000043F0
        public AsynchrTask RebootHost(string hostUri, RebootReq req)
        {
            string text = RestClientUtil.sendRequest("POST", hostUri + "/action/reboot", req, this.bean, "RebootHost");

            HostResource.log.Info("RebootHost result : " + text);
            return(JsonConvert.DeserializeObject <AsynchrTask>(text));
        }
コード例 #3
0
        // Token: 0x06000087 RID: 135 RVA: 0x0000299C File Offset: 0x00000B9C
        public TaskInfo QueryTask(string taskUri)
        {
            string text = RestClientUtil.sendRequest("GET", taskUri, null, this.bean, "QueryTask");

            TaskResource.log.Info("QueryTask result : " + text);
            return(JsonConvert.DeserializeObject <TaskInfo>(text));
        }
コード例 #4
0
        // Token: 0x06000089 RID: 137 RVA: 0x00002A3C File Offset: 0x00000C3C
        public ListTasksResp ListTasks(string siteUri, ListTasksReqEx reqEx)
        {
            ListTasksResp listTasksResp = new ListTasksResp();
            StringBuilder stringBuilder = new StringBuilder(siteUri + "/tasks?");

            if (null != reqEx)
            {
                stringBuilder.Append((reqEx.limit == null) ? "" : ("limit=" + reqEx.limit + "&"));
                stringBuilder.Append((reqEx.offset == null) ? "" : ("offset=" + reqEx.offset + "&"));
                stringBuilder.Append((reqEx.scope == null) ? "" : ("scope=" + reqEx.scope + "&"));
                stringBuilder.Append((reqEx.type == null) ? "" : ("type=" + reqEx.type + "&"));
                stringBuilder.Append((reqEx.user == null) ? "" : ("user="******"&"));
                stringBuilder.Append((reqEx.status == null) ? "" : ("status=" + reqEx.status + "&"));
                stringBuilder.Append((reqEx.startTime == null) ? "" : ("startTime=" + reqEx.startTime + "&"));
                stringBuilder.Append((reqEx.finishTime == null) ? "" : ("finishTime=" + reqEx.finishTime + "&"));
                if (reqEx.taskUrns != null && reqEx.taskUrns.Count > 0)
                {
                    foreach (string text in reqEx.taskUrns)
                    {
                        if (null != text)
                        {
                            stringBuilder.Append("taskUrns=").Append(text + "&");
                        }
                    }
                }
                stringBuilder.Append((reqEx.cancelled == null) ? "" : ("cancelled=" + reqEx.cancelled + "&"));
            }
            string text2 = RestClientUtil.sendRequest("GET", stringBuilder.ToString(0, stringBuilder.Length - 1), null, this.bean, "ListTasks");

            TaskResource.log.Info("ListTasks result : " + text2);
            return(JsonConvert.DeserializeObject <ListTasksResp>(text2));
        }
コード例 #5
0
        // Token: 0x0600038D RID: 909 RVA: 0x00007828 File Offset: 0x00005A28
        public UserTaskResp ModifyUser(string userId, ModifyUserReq req)
        {
            string text = RestClientUtil.sendRequest("PUT", "/service/users/" + userId, req, this.bean, "ModifyUser");

            UserResource.log.Info("ModifyUser result : " + text);
            return(JsonConvert.DeserializeObject <UserTaskResp>(text));
        }
コード例 #6
0
        // Token: 0x06000270 RID: 624 RVA: 0x00006160 File Offset: 0x00004360
        public AsynchrTask ModifyHost(string hostUri, ModifyHostReq req)
        {
            string text = RestClientUtil.sendRequest("PUT", hostUri, req, this.bean, "ModifyHost");

            HostResource.log.Info("ModifyHost result : " + text);
            return(JsonConvert.DeserializeObject <AsynchrTask>(text));
        }
コード例 #7
0
        // Token: 0x06000271 RID: 625 RVA: 0x000061A8 File Offset: 0x000043A8
        public AsynchrTask RemoveHost(string hostUri, int?isForce)
        {
            string text = RestClientUtil.sendRequest("DELETE", hostUri, null, this.bean, "RemoveHost");

            HostResource.log.Info("RemoveHost result : " + text);
            return(JsonConvert.DeserializeObject <AsynchrTask>(text));
        }
コード例 #8
0
        // Token: 0x0600011C RID: 284 RVA: 0x00003638 File Offset: 0x00001838
        public ListSitesResp ListSites()
        {
            ListSitesResp listSitesResp = new ListSitesResp();
            string        text          = RestClientUtil.sendRequest("GET", "/service/sites", null, this.bean, "ListSites");

            CommonResource.log.Info("ListSites result : " + text);
            return(JsonConvert.DeserializeObject <ListSitesResp>(text));
        }
コード例 #9
0
        // Token: 0x06000088 RID: 136 RVA: 0x000029E4 File Offset: 0x00000BE4
        public SDKCommonResp Cancel(string taskUri)
        {
            SDKCommonResp sdkcommonResp = new SDKCommonResp();
            string        text          = RestClientUtil.sendRequest("POST", taskUri + "/cancel", null, this.bean, "Cancel");

            TaskResource.log.Info("Cancel result : " + text);
            return(JsonConvert.DeserializeObject <SDKCommonResp>(text));
        }
コード例 #10
0
        // Token: 0x0600030C RID: 780 RVA: 0x00006C00 File Offset: 0x00004E00
        public SDKCommonResp Logout()
        {
            SDKCommonResp sdkcommonResp = new SDKCommonResp();
            string        text          = RestClientUtil.sendRequest("DELETE", "/service/session", null, this.bean, "Logout");

            AuthenticateResource.log.Info("Logout result : " + text);
            return(JsonConvert.DeserializeObject <SDKCommonResp>(text));
        }
コード例 #11
0
        // Token: 0x06000390 RID: 912 RVA: 0x00007930 File Offset: 0x00005B30
        public SDKCommonResp ResetPassword(ResetPasswordReq req)
        {
            SDKCommonResp sdkcommonResp = new SDKCommonResp();
            string        text          = RestClientUtil.sendRequest("POST", "/service/users/password/reset", req, this.bean, "ResetPassword");

            UserResource.log.Info("ResetPassword result : " + text);
            return(JsonConvert.DeserializeObject <SDKCommonResp>(text));
        }
コード例 #12
0
        // Token: 0x0600038E RID: 910 RVA: 0x0000787C File Offset: 0x00005A7C
        public SDKCommonResp SetUserRoles(string userId, SetUserRolesReq req)
        {
            SDKCommonResp sdkcommonResp = new SDKCommonResp();
            string        text          = RestClientUtil.sendRequest("POST", "/service/users/" + userId + "/setRoles", req, this.bean, "SetUserRoles");

            UserResource.log.Info("SetUserRoles result : " + text);
            return(JsonConvert.DeserializeObject <SDKCommonResp>(text));
        }
コード例 #13
0
        // Token: 0x0600026C RID: 620 RVA: 0x00005E8C File Offset: 0x0000408C
        public HostTaskResp CreateHost(string siteUri, CreateHostReq req)
        {
            string uri  = siteUri + "/hosts";
            string text = RestClientUtil.sendRequest("POST", uri, req, this.bean, "CreateHost");

            HostResource.log.Info("CreateHost result : " + text);
            return(JsonConvert.DeserializeObject <HostTaskResp>(text));
        }
コード例 #14
0
        // Token: 0x0600026E RID: 622 RVA: 0x00006084 File Offset: 0x00004284
        public QueryComputeResourceStaticsResp QueryComputeResourceStatics(string hostUri)
        {
            string uri  = hostUri + "/computeResourceStatics";
            string text = RestClientUtil.sendRequest("GET", uri, null, this.bean, "QueryComputeResourceStatics");

            HostResource.log.Info("QueryComputeResourceStatics result : " + text);
            return(JsonConvert.DeserializeObject <QueryComputeResourceStaticsResp>(text));
        }
コード例 #15
0
        // Token: 0x06000394 RID: 916 RVA: 0x00007AEC File Offset: 0x00005CEC
        public SDKCommonResp ModifyRole(ModifyRoleReq req)
        {
            SDKCommonResp sdkcommonResp = new SDKCommonResp();
            string        text          = RestClientUtil.sendRequest("POST", "/service/roles/mod", req, this.bean, "ModifyRole");

            UserResource.log.Info("ModifyRole result : " + text);
            return(JsonConvert.DeserializeObject <SDKCommonResp>(text));
        }
コード例 #16
0
        // Token: 0x06000391 RID: 913 RVA: 0x00007984 File Offset: 0x00005B84
        public SDKCommonResp RemoveUser(string userId)
        {
            SDKCommonResp sdkcommonResp = new SDKCommonResp();
            string        text          = RestClientUtil.sendRequest("DELETE", "/service/users/" + userId, null, this.bean, "RemoveUser");

            UserResource.log.Info("RemoveUser result : " + text);
            return(JsonConvert.DeserializeObject <SDKCommonResp>(text));
        }
コード例 #17
0
        // Token: 0x06000145 RID: 325 RVA: 0x000045C8 File Offset: 0x000027C8
        public ListOsInfosResp ListOsInfos(string siteUri)
        {
            ListOsInfosResp listOsInfosResp = new ListOsInfosResp();
            string          text            = RestClientUtil.sendRequest("GET", siteUri + "/vms/osversions", null, this.bean, "ListOsInfos");

            VmResource.log.Info("ListOsInfos result : " + text);
            return(JsonConvert.DeserializeObject <ListOsInfosResp>(text));
        }
コード例 #18
0
        // Token: 0x0600013F RID: 319 RVA: 0x00003ED0 File Offset: 0x000020D0
        public VmTaskResp CloneVm(string vmUri, CloneVmReq req)
        {
            VmTaskResp vmTaskResp = new VmTaskResp();
            string     uri        = vmUri + "/action/clone";
            string     text       = RestClientUtil.sendRequest("POST", uri, req, this.bean, "CloneVm");

            VmResource.log.Info("CloneVm result : " + text);
            return(JsonConvert.DeserializeObject <VmTaskResp>(text));
        }
コード例 #19
0
        // Token: 0x0600013D RID: 317 RVA: 0x00003E08 File Offset: 0x00002008
        public AsynchrTask StartVm(string vmUri)
        {
            AsynchrTask asynchrTask = new AsynchrTask();
            string      uri         = vmUri + "/action/start";
            string      text        = RestClientUtil.sendRequest("POST", uri, null, this.bean, "StartVm");

            VmResource.log.Info("StartVm result : " + text);
            return(JsonConvert.DeserializeObject <AsynchrTask>(text));
        }
コード例 #20
0
        // Token: 0x0600013B RID: 315 RVA: 0x00003D48 File Offset: 0x00001F48
        public VmTaskResp CreateVm(string siteUri, CreateVmReq req)
        {
            VmTaskResp vmTaskResp = new VmTaskResp();
            string     uri        = siteUri + "/vms";
            string     text       = RestClientUtil.sendRequest("POST", uri, req, this.bean, "CreateVm");

            VmResource.log.Info("CreateVm result : " + LogUtil.ReplayLog(text));
            return(JsonConvert.DeserializeObject <VmTaskResp>(text));
        }
コード例 #21
0
        // Token: 0x0600013C RID: 316 RVA: 0x00003DA8 File Offset: 0x00001FA8
        public ImportVmTempResp ImportVmTemp(string siteUri, ImportVmTempReq req)
        {
            ImportVmTempResp importVmTempResp = new ImportVmTempResp();
            string           uri  = siteUri + "/vms/action/import";
            string           text = RestClientUtil.sendRequest("POST", uri, req, this.bean, "ImportVmTemp");

            VmResource.log.Info("ImportVmTemp result : " + LogUtil.ReplayLog(text));
            return(JsonConvert.DeserializeObject <ImportVmTempResp>(text));
        }
コード例 #22
0
        public VmTaskResp OsVersions(string vmUri)
        {
            VmTaskResp vmTaskResp = new VmTaskResp();
            string     uri        = vmUri + "/osversions";
            string     text       = RestClientUtil.sendRequest("get", uri, "", this.bean, "osversions");

            VmResource.log.Info("osversions result : " + text);
            return(JsonConvert.DeserializeObject <VmTaskResp>(text));
        }
コード例 #23
0
        // Token: 0x0600026F RID: 623 RVA: 0x000060D8 File Offset: 0x000042D8
        public QueryHostsStatisticsResp QueryHostsStatistics(string siteUri, string scope)
        {
            StringBuilder stringBuilder = new StringBuilder(siteUri + "/hosts/statistics?");

            stringBuilder.Append((scope == null) ? "" : ("scope=" + scope + "&"));
            string text = RestClientUtil.sendRequest("GET", stringBuilder.ToString(0, stringBuilder.Length - 1), null, this.bean, "QueryHostsStatistics");

            HostResource.log.Info("QueryHostsStatistics result : " + text);
            return(JsonConvert.DeserializeObject <QueryHostsStatisticsResp>(text));
        }
コード例 #24
0
        // Token: 0x06000393 RID: 915 RVA: 0x00007A30 File Offset: 0x00005C30
        public ListRolesResp ListRoles(int?limit, int?offset)
        {
            StringBuilder stringBuilder = new StringBuilder("/service/roles/list?");

            stringBuilder.Append((limit == null) ? "" : ("limit=" + limit + "&"));
            stringBuilder.Append((offset == null) ? "" : ("offset=" + offset + "&"));
            string text = RestClientUtil.sendRequest("GET", stringBuilder.ToString(0, stringBuilder.Length - 1), null, this.bean, "ListRoles");

            UserResource.log.Info("ListRoles result : " + text);
            return(JsonConvert.DeserializeObject <ListRolesResp>(text));
        }
コード例 #25
0
        // Token: 0x06000395 RID: 917 RVA: 0x00007B40 File Offset: 0x00005D40
        public SDKCommonResp RemoveRole(string roleName)
        {
            SDKCommonResp sdkcommonResp = new SDKCommonResp();
            string        text          = RestClientUtil.sendRequest("POST", "/service/roles/rmv", new RemoveRoleReq
            {
                roleName = roleName
            }, this.bean, "RemoveRole");

            UserResource.log.Info("RemoveRole result : " + text);
            return(JsonConvert.DeserializeObject <SDKCommonResp>(text));
        }
コード例 #26
0
        // Token: 0x06000396 RID: 918 RVA: 0x00007BA0 File Offset: 0x00005DA0
        public ListRightsResp ListRights(int?rightType)
        {
            ListRightsResp listRightsResp = new ListRightsResp();
            StringBuilder  stringBuilder  = new StringBuilder("/service/roles/getRights");

            stringBuilder.Append((rightType == null) ? "" : ("?rightType=" + rightType));
            string text = RestClientUtil.sendRequest("GET", stringBuilder.ToString(), null, this.bean, "ListRights");

            UserResource.log.Info("ListRights result : " + text);
            return(JsonConvert.DeserializeObject <ListRightsResp>(text));
        }
コード例 #27
0
        // Token: 0x0600013E RID: 318 RVA: 0x00003E64 File Offset: 0x00002064
        public AsynchrTask StopVm(string vmUri, string mode)
        {
            AsynchrTask   asynchrTask   = new AsynchrTask();
            ActionModeReq actionModeReq = new ActionModeReq();

            actionModeReq.mode = mode;
            string uri  = vmUri + "/action/stop";
            string text = RestClientUtil.sendRequest("POST", uri, actionModeReq, this.bean, "StopVm");

            VmResource.log.Info("StopVm result : " + text);
            return(JsonConvert.DeserializeObject <AsynchrTask>(text));
        }
コード例 #28
0
        // Token: 0x06000144 RID: 324 RVA: 0x000044D4 File Offset: 0x000026D4
        public AsynchrTask RemoveVm(string vmUri, int?isReserveDisks, int?isFormat, int?holdTime)
        {
            AsynchrTask   asynchrTask   = new AsynchrTask();
            StringBuilder stringBuilder = new StringBuilder(vmUri + "?");

            stringBuilder.Append((isReserveDisks == null) ? "" : ("isReserveDisks=" + isReserveDisks + "&"));
            stringBuilder.Append((isFormat == null) ? "" : ("isFormat=" + isFormat + "&"));
            stringBuilder.Append((holdTime == null) ? "" : ("holdTime=" + holdTime + "&"));
            string text = RestClientUtil.sendRequest("DELETE", stringBuilder.ToString(0, stringBuilder.Length - 1), null, this.bean, "RemoveVm");

            VmResource.log.Info("RemoveVm result : " + text);
            return(JsonConvert.DeserializeObject <AsynchrTask>(text));
        }
コード例 #29
0
        // Token: 0x0600011F RID: 287 RVA: 0x000039AC File Offset: 0x00001BAC
        public ListDvswitchsResp ListDvswitchs(string siteUri, ListDvswitchsReqEx reqEx)
        {
            ListDvswitchsResp listDvswitchsResp = new ListDvswitchsResp();
            StringBuilder     stringBuilder     = new StringBuilder(siteUri + "/dvswitchs?");

            if (null != reqEx)
            {
                stringBuilder.Append((reqEx.location == null) ? "" : ("location=" + reqEx.location + "&"));
                stringBuilder.Append((reqEx.name == null) ? "" : ("name=" + reqEx.name + "&"));
            }
            string text = RestClientUtil.sendRequest("GET", stringBuilder.ToString(0, stringBuilder.Length - 1), null, this.bean, "ListDvswitchs");

            CommonResource.log.Info("ListDvswitchs result : " + text);
            return(JsonConvert.DeserializeObject <ListDvswitchsResp>(text));
        }
コード例 #30
0
        // Token: 0x06000120 RID: 288 RVA: 0x00003A7C File Offset: 0x00001C7C
        public ListPortGroupsResp ListPortGroups(string dvswitchUri, ListPortGroupsReqEx reqEx)
        {
            ListPortGroupsResp listPortGroupsResp = new ListPortGroupsResp();
            StringBuilder      stringBuilder      = new StringBuilder(dvswitchUri + "/portgroups?");

            if (null != reqEx)
            {
                stringBuilder.Append((reqEx.limit == null) ? "" : ("limit=" + reqEx.limit + "&"));
                stringBuilder.Append((reqEx.offset == null) ? "" : ("offset=" + reqEx.offset + "&"));
                stringBuilder.Append((reqEx.portGroupName == null) ? "" : ("portGroupName=" + reqEx.portGroupName + "&"));
            }
            string text = RestClientUtil.sendRequest("GET", stringBuilder.ToString(0, stringBuilder.Length - 1), null, this.bean, "ListPortGroups");

            CommonResource.log.Info("ListPortGroups result : " + text);
            return(JsonConvert.DeserializeObject <ListPortGroupsResp>(text));
        }