Beispiel #1
0
    protected bool CreateMulticastTask(Multicast multicast, string direction, string isMulticast, int portBase)
    {
        bool mcTaskCreated = false;
        bool pxeBootCreated = false;
        bool activeTaskCheck = true;

        if (multicast.GroupImage != null)
        {
            mcTaskCreated = multicast.Create(multicast);

            if (mcTaskCreated)
                activeTaskCheck = multicast.IsHostAlreadyActive(multicast);

            if (activeTaskCheck && mcTaskCreated)
                multicast = multicast.CreateHostTask(multicast);

            if (mcTaskCreated && multicast.ActiveTaskCreated)
            {
                multicast = GetHostIDs(multicast);
                pxeBootCreated = multicast.CreatePXEFiles(multicast, portBase);
            }
        }
        else
        {
            Utility.Message = "The Groups Current Image No Longer Exists";
            return false;
        }

        if (mcTaskCreated && multicast.ActiveTaskCreated && pxeBootCreated)
            return true;
        else
            RollBack(multicast, mcTaskCreated, multicast.ActiveTaskCreated, pxeBootCreated);
        return false;
    }