'Resource\'s validation.
Validates to ensure that segmentation_id is not there for flat
network type.'

def validate(self):

    super(ProviderNet, self).validate()
    if (self.properties[self.PROVIDER_SEGMENTATION_ID] and (self.properties[self.PROVIDER_NETWORK_TYPE] != 'vlan')):
        msg = _('segmentation_id    not    allowed    for    flat    network    type.')
        raise exception.StackValidationFailed(message=msg)
