Пример #1
0
Файл: RNOW.cs Проект: sap-sh/t
        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="ticketId"></param>
        /// <param name="plannedStartDate"></param>
        /// <param name="plannedEndDate"></param>
        /// <param name="assignmentGroup"></param>
        /// <param name="assignedTo"></param>
        /// <param name="hostIds"></param>
        /// <returns></returns>
        public SnowTicket CreateDeploymentTask(string userId, string ticketId, string plannedStartDate, string plannedEndDate, string assignmentGroup, string assignedTo, List<long> hostIds, string taskName)
        {
            PayLoadTags payLoadTags = new PayLoadTags();

            string payload = payLoadTags.CreateDeploymentTask(userId, ticketId, plannedStartDate, plannedEndDate, assignmentGroup, assignedTo, hostIds, taskName);

            SnowTicket result = GetResult(userId, Utility.REQUEST_TYPE_DEPLOY_TASK_CREATE, payload);

            return result;
        }
Пример #2
0
Файл: RNOW.cs Проект: sap-sh/t
        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="ticketId"></param>
        /// <param name="reason"></param>
        /// <returns></returns>
        public SnowTicket CancelTicket(string userId, string ticketId, string reason)
        {
            PayLoadTags payLoadTags = new PayLoadTags();

            string payload = payLoadTags.CancelTicket(userId, ticketId, reason);

            SnowTicket result = GetResult(userId, Utility.REQUEST_TYPE_TICKET_UPDATE, payload);

            return result;
        }
Пример #3
0
Файл: RNOW.cs Проект: sap-sh/t
        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="taskId"></param>
        /// <param name="successful"></param>
        /// <returns></returns>
        public SnowTicket CloseDeploymentTask(string userId, string taskId, bool successful)
        {
            PayLoadTags payLoadTags = new PayLoadTags();

            string completionStatus = (successful ? Utility.VAL_DEPLOYMENT_C_STATUS_SUCCESS : Utility.VAL_DEPLOYMENT_C_STATUS_FAILURE); ;
            string implementationStatus = (successful ? Utility.VAL_DEPLOYMENT_I_STATUS_SUCCESS : Utility.VAL_DEPLOYMENT_I_STATUS_FAILURE);
            string payload = payLoadTags.CloseDeploymentTask(userId, taskId, Utility.VAL_DEPLOYMENT_STATE_CLOSED, completionStatus, implementationStatus,null, null);
            SnowTicket result = GetResult(userId, Utility.REQUEST_TYPE_DEPLOY_TASK_UPDATE,  payload);
            return result;
        }
Пример #4
0
Файл: RNOW.cs Проект: sap-sh/t
        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="ticketId"></param>
        /// <returns></returns>
        public SnowTicket AcceptConflict(string userId, string ticketId)
        {
            PayLoadTags payLoadTags = new PayLoadTags();

            string payload = payLoadTags.AcceptConflict(userId, ticketId);

            SnowTicket result = GetResult(userId, Utility.REQUEST_TYPE_CONFLICT_ACCEPTANCE, payload);

            return result;
        }
Пример #5
0
Файл: RNOW.cs Проект: sap-sh/t
        /// <summary>
        /// Sample Method to update Snow Request
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="ticketId"></param>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <returns></returns>
        public SnowTicket UpdateChangeRequestDates(string userId, string ticketId, DateTime startDate, DateTime endDate)
        {
            PayLoadTags payLoadTags = new PayLoadTags();

            string payload = payLoadTags.UpdateChangeRequest(userId, ticketId, startDate,endDate);

            SnowTicket result = GetResult(userId, Utility.REQUEST_TYPE_TICKET_UPDATE, payload);

            return result;
        }
Пример #6
0
Файл: RNOW.cs Проект: sap-sh/t
        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="ticketId"></param>
        /// <param name="hostId"></param>
        /// <returns></returns>
        public bool RemoveHostFromTicket(string userId,  string ticketId,  long hostId)
        {
            PayLoadTags payLoadTags = new PayLoadTags();

            string payload = payLoadTags.RemoveHostFromTicket(userId, ticketId, hostId);

            SnowTicket result = GetResult(userId, Utility.REQUEST_TYPE_TICKET_REMOVE_CI, payload);

            return result.IsSuccess ;
        }
Пример #7
0
Файл: RNOW.cs Проект: sap-sh/t
        /// <summary>
        /// 
        /// </summary>
        /// <param name="changerequestid"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        public SnowTicket GetTicketDetails(string changerequestid, string userId)
        {
            PayLoadTags payLoadTags = new PayLoadTags();

            string payload = payLoadTags.getChangeRequestDetailsPayload(changerequestid);

            SnowTicket result = GetResult(userId, Utility.REQUEST_TYPE_TICKET_GET, payload);

            return result;
        }
Пример #8
0
Файл: RNOW.cs Проект: sap-sh/t
        /// <summary>
        /// 
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="shortDescription"></param>
        /// <param name="description"></param>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <param name="owningITStream"></param>
        /// <param name="owningITSubStream"></param>
        /// <param name="hostIds"></param>
        /// <param name="buildingIds"></param>
        /// <returns></returns>
        public SnowTicket CreateTicket(string userId, DateTime startDate, DateTime endDate, List<long> hostIds, List<string> buildingIds, string description, string shortDescription)
        {
            PayLoadTags payLoadTags = new PayLoadTags();

            string payload = payLoadTags.CreateChangeRequest(userId, startDate, endDate, hostIds, buildingIds, description, shortDescription);

            SnowTicket result = GetResult(userId, Utility.REQUEST_TYPE_TICKET_CREATE, payload);

            return result;
        }