'Validate any of the provided params.'

def validate(self):

    super(NetworkGateway, self).validate()
    connections = self.properties[self.CONNECTIONS]
    for connection in connections:
        segmentation_type = connection[self.SEGMENTATION_TYPE]
        segmentation_id = connection.get(self.SEGMENTATION_ID)
        if ((segmentation_type == 'vlan') and (segmentation_id is None)):
            msg = _('segmentation_id    must    be    specified    for    using    vlan')
            raise exception.StackValidationFailed(message=msg)
        if ((segmentation_type == 'flat') and segmentation_id):
            msg = _('segmentation_id    cannot    be    specified    except    0    for    using    flat')
            raise exception.StackValidationFailed(message=msg)
