Fix validate

These commits enable the validate function to work with JunOS devices (and probably others) and also fix a problem with manager.raise_mode (setting raise mode was not working before).