mirror of
				https://github.com/xcat2/confluent.git
				synced 2025-10-30 19:02:29 +00:00 
			
		
		
		
	Clean up errors on bad ipv4 addresses
confluent errors are better now
This commit is contained in:
		| @@ -191,10 +191,6 @@ if setmode: | ||||
|             for node in fr.get('databynode', []): | ||||
|                 r = fr['databynode'][node] | ||||
|                 exitcode |= client.printerror(r, node) | ||||
|                 if 'error' in r: | ||||
|                     sys.stderr.write(node + ': ' + r['error'] + '\n') | ||||
|                     if 'errorcode' in r: | ||||
|                         rcode |= r['errorcode'] | ||||
|                 if 'value' not in r: | ||||
|                     continue | ||||
|                 keyval = r['value'] | ||||
|   | ||||
| @@ -597,10 +597,20 @@ class IpmiHandler(object): | ||||
|                 )) | ||||
|             elif self.op == 'update': | ||||
|                 config = self.inputdata.netconfig(self.node) | ||||
|                 self.ipmicmd.set_net_configuration( | ||||
|                                 ipv4_address=config['ipv4_address'], | ||||
|                                 ipv4_configuration=config['ipv4_configuration'], | ||||
|                                 ipv4_gateway=config['ipv4_gateway']) | ||||
|                 try: | ||||
|                     self.ipmicmd.set_net_configuration( | ||||
|                         ipv4_address=config['ipv4_address'], | ||||
|                         ipv4_configuration=config['ipv4_configuration'], | ||||
|                         ipv4_gateway=config['ipv4_gateway']) | ||||
|                 except socket.error as se: | ||||
|                     self.output.put(msg.ConfluentNodeError(self.node, | ||||
|                                                            se.message)) | ||||
|                 except ValueError as e: | ||||
|                     if e.message == 'negative shift count': | ||||
|                         self.output.put(msg.ConfluentNodeError( | ||||
|                             self.node, 'Invalid prefix length given')) | ||||
|                     else: | ||||
|                         raise | ||||
|  | ||||
|     def handle_users(self): | ||||
|         # Create user | ||||
|   | ||||
		Reference in New Issue
	
	Block a user