Exemplo n.º 1
0
        private void GeneratePatchSummary(List<XenServerPatchAlert> alerts, List<AlertFeatureValidator> validators,
            XenServerUpdateAlert updateAlert, XenCenterUpdateAlert xcupdateAlert)
        {
            OuputComponent oc = new OutputTextOuputComponent(XmlLocation, ServerVersion);
            XenCenterUpdateDecorator xcud = new XenCenterUpdateDecorator(oc, xcupdateAlert);
            XenServerUpdateDecorator xsud = new XenServerUpdateDecorator(xcud, updateAlert);
            PatchAlertDecorator pad = new PatchAlertDecorator(xsud, alerts);
            AlertFeatureValidatorDecorator afdCoreFields = new AlertFeatureValidatorDecorator(pad,
                                                                                              validators.First(v => v is CorePatchDetailsValidator),
                                                                                              "Core fields in patch checks:");
            AlertFeatureValidatorDecorator afdPatchUrl = new AlertFeatureValidatorDecorator(afdCoreFields,
                                                                                            validators.First(v => v is PatchURLValidator),
                                                                                            "Required patch URL checks:");
            AlertFeatureValidatorDecorator afdZipContents = new AlertFeatureValidatorDecorator(afdPatchUrl,
                                                                                               validators.First(v => v is ZipContentsValidator),
                                                                                               "Required patch zip content checks:");

            if(CheckHotfixContents)
                Output = afdZipContents.Generate().Insert(0, Output).ToString();
            else
                Output = afdPatchUrl.Generate().Insert(0, Output).ToString();
        }
Exemplo n.º 2
0
 public XenCenterUpdateDecorator(OuputComponent ouputComponent, XenCenterUpdateAlert alert)
 {
     SetComponent(ouputComponent);
     this.alert = alert;
 }