'Validate any of the provided params.'

def validate(self):

    res = super(Instance, self).validate()
    if res:
        return res
    datastore_type = self.properties[self.DATASTORE_TYPE]
    datastore_version = self.properties[self.DATASTORE_VERSION]
    self.client_plugin().validate_datastore(datastore_type, datastore_version, self.DATASTORE_TYPE, self.DATASTORE_VERSION)
    users = self.properties[self.USERS]
    if users:
        databases = self.properties[self.DATABASES]
        if (not databases):
            msg = (_('Databases    property    is    required    if    users    property    is    provided    for    resource    %s.') % self.name)
            raise exception.StackValidationFailed(message=msg)
        db_names = set([db[self.DATABASE_NAME] for db in databases])
        for user in users:
            missing_db = [db_name for db_name in user[self.USER_DATABASES] if (db_name not in db_names)]
            if missing_db:
                msg = (_('Database    %(dbs)s    specified    for    user    does    not    exist    in    databases    for    resource    %(name)s.') % {'dbs': missing_db, 'name': self.name})
                raise exception.StackValidationFailed(message=msg)
    is_neutron = self.is_using_neutron()
    nics = self.properties[self.NICS]
    for nic in nics:
        if ((not is_neutron) and nic.get(self.PORT)):
            msg = (_('Can    not    use    %s    property    on    Nova-network.') % self.PORT)
            raise exception.StackValidationFailed(message=msg)
        if (bool(nic.get(self.NET)) == bool(nic.get(self.PORT))):
            msg = (_('Either    %(net)s    or    %(port)s    must    be    provided.') % {'net': self.NET, 'port': self.PORT})
            raise exception.StackValidationFailed(message=msg)
