Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FirmwareDirectDownload" /> class.
 /// </summary>
 /// <param name="HttpServer">HTTP Server option when the image source is a local https server  .</param>
 /// <param name="ImageSource">Source type referring the image to be downloaded from CCO or from a local https server   (default to ImageSourceEnum.Cco).</param>
 /// <param name="IsPasswordSet">IsPasswordSet.</param>
 /// <param name="Password">Password as configured on the local https server  .</param>
 /// <param name="Upgradeoption">Option to control the upgrade, e.g., sd_upgrade_mount_only - download the image into sd and upgrade wait for the server on-next boot   (default to UpgradeoptionEnum.Upgrademountonly).</param>
 /// <param name="Username">Username as configured on the local https server   .</param>
 public FirmwareDirectDownload(FirmwareHttpServer HttpServer = default(FirmwareHttpServer), ImageSourceEnum?ImageSource = ImageSourceEnum.Cco, bool?IsPasswordSet = default(bool?), string Password = default(string), UpgradeoptionEnum?Upgradeoption = UpgradeoptionEnum.Upgrademountonly, string Username = default(string))
 {
     this.HttpServer = HttpServer;
     // use default value if no "ImageSource" provided
     if (ImageSource == null)
     {
         this.ImageSource = ImageSourceEnum.Cco;
     }
     else
     {
         this.ImageSource = ImageSource;
     }
     this.IsPasswordSet = IsPasswordSet;
     this.Password      = Password;
     // use default value if no "Upgradeoption" provided
     if (Upgradeoption == null)
     {
         this.Upgradeoption = UpgradeoptionEnum.Upgrademountonly;
     }
     else
     {
         this.Upgradeoption = Upgradeoption;
     }
     this.Username = Username;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FirmwareNetworkShare" /> class.
 /// </summary>
 /// <param name="CifsServer">CIFS file server option  .</param>
 /// <param name="HttpServer">HTTP(for WWW) file server option  .</param>
 /// <param name="IsPasswordSet">IsPasswordSet.</param>
 /// <param name="MapType">File server protocols like CIFS, NFS, WWW for HTTP(S) that hosts the image   (default to MapTypeEnum.Nfs).</param>
 /// <param name="NfsServer">NFS file server option  .</param>
 /// <param name="Password">Password as configured on the file server  .</param>
 /// <param name="Upgradeoption">Option to control the upgrade, e.g., 1) nw_upgrade_mount_only - mount the image from a file server and run upgrade on-next server boot 2) nw_upgrade_full - mount the image and run upgrade immediately   (default to UpgradeoptionEnum.Full).</param>
 /// <param name="Username">Username as configured on the file server   .</param>
 public FirmwareNetworkShare(FirmwareCifsServer CifsServer = default(FirmwareCifsServer), FirmwareHttpServer HttpServer = default(FirmwareHttpServer), bool?IsPasswordSet = default(bool?), MapTypeEnum?MapType = MapTypeEnum.Nfs, FirmwareNfsServer NfsServer = default(FirmwareNfsServer), string Password = default(string), UpgradeoptionEnum?Upgradeoption = UpgradeoptionEnum.Full, string Username = default(string))
 {
     this.CifsServer    = CifsServer;
     this.HttpServer    = HttpServer;
     this.IsPasswordSet = IsPasswordSet;
     // use default value if no "MapType" provided
     if (MapType == null)
     {
         this.MapType = MapTypeEnum.Nfs;
     }
     else
     {
         this.MapType = MapType;
     }
     this.NfsServer = NfsServer;
     this.Password  = Password;
     // use default value if no "Upgradeoption" provided
     if (Upgradeoption == null)
     {
         this.Upgradeoption = UpgradeoptionEnum.Full;
     }
     else
     {
         this.Upgradeoption = Upgradeoption;
     }
     this.Username = Username;
 }