コード例 #1
0
        /// <summary>
        /// Returns a clone of the current instance.
        /// </summary>
        /// <param name="parentNode">The cloned parent node.</param>
        /// <returns>The clone.</returns>
        public NodeLabels Clone(NodeDefinition parentNode)
        {
            Covenant.Requires <ArgumentNullException>(parentNode != null);

            var clone = new NodeLabels(parentNode);

            this.CopyTo(clone);

            return(clone);
        }
コード例 #2
0
        /// <summary>
        /// Copies the label properties to another instance.
        /// </summary>
        /// <param name="target">The target instance.</param>
        internal void CopyTo(NodeLabels target)
        {
            Covenant.Requires <ArgumentNullException>(target != null);

            // WARNING:
            //
            // This method will need to be updated whenever new standard labels are added or changed.
            // The [nhive/neon-hive-manager] and [nhive/neon-proxy-manager] service images will also
            // need to be rebuilt.

            target.StorageCapacityGB = this.StorageCapacityGB;
            target.StorageLocal      = this.StorageLocal;
            target.StorageSSD        = this.StorageSSD;
            target.StorageRedundant  = this.StorageRedundant;
            target.StorageEphemeral  = this.StorageEphemeral;

            target.ComputeCores        = this.ComputeCores;
            target.ComputeArchitecture = this.ComputeArchitecture;
            target.ComputeRamMB        = this.ComputeRamMB;
            target.ComputeSwap         = this.ComputeSwap;

            target.PhysicalLocation    = this.PhysicalLocation;
            target.PhysicalMachine     = this.PhysicalMachine;
            target.PhysicalFaultDomain = this.PhysicalFaultDomain;
            target.PhysicalPower       = this.PhysicalPower;

            target.LogEsData = this.LogEsData;

            target.CephMON              = this.CephMON;
            target.CephOSD              = this.CephOSD;
            target.CephOSDDevice        = this.CephOSDDevice;
            target.CephMDS              = this.CephMDS;
            target.CephOSDDriveSizeGB   = this.CephOSDDriveSizeGB;
            target.CephOSDCacheSizeMB   = this.CephOSDCacheSizeMB;
            target.CephOSDJournalSizeMB = this.CephOSDJournalSizeMB;
            target.CephMDSCacheSizeMB   = this.CephMDSCacheSizeMB;

            target.HiveMQ        = this.HiveMQ;
            target.HiveMQManager = this.HiveMQManager;

            foreach (var item in this.Custom)
            {
                target.Custom.Add(item.Key, item.Value);
            }
        }
コード例 #3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public NodeDefinition()
 {
     Labels = new NodeLabels(this);
 }