Esempio n. 1
0
		public static void ApplyNode(Node node)
		{
			var existingNode = FindNode(node.Address);
			if (existingNode == null)
			{
				InsertNewNode(node);
			}
			else
			{
				UpdateNode(node);
			}
		}
Esempio n. 2
0
		private static void InsertNewNode(Node node)
		{
			if (_version.Major >= MajorVersionThatSwitchedToV2Classes)
			{
				F5Interfaces.LocalLBNodeAddressV2.create(
					new[] { node.Name },
					new[] { node.Address },
					new[] { node.ConnectionLimit });
			}
			else
			{
				F5Interfaces.LocalLBNodeAddress.create(
				new[] { node.Address },
				new[] { node.ConnectionLimit });
				F5Interfaces.LocalLBNodeAddress.set_screen_name(
					new[] { node.Address },
					new[] { node.Name });
			}
		}
Esempio n. 3
0
		private static void UpdateNode(Node node)
		{
			F5Interfaces.LocalLBNodeAddress.set_connection_limit(
				new[] { node.Address },
				new[] { new CommonULong64 { low = node.ConnectionLimit } });
		}