- self.debug('adding new relation between {} and {}, endpoints: {}, {}'
- .format(ee_id_1, ee_id_2, endpoint_1, endpoint_2))
+ self.log.debug('adding new relation between {} and {}, endpoints: {}, {}'
+ .format(ee_id_1, ee_id_2, endpoint_1, endpoint_2))
+
+ # check arguments
+ if not ee_id_1:
+ message = 'EE 1 is mandatory'
+ self.log.error(message)
+ raise N2VCBadArgumentsException(message=message, bad_args=['ee_id_1'])
+ if not ee_id_2:
+ message = 'EE 2 is mandatory'
+ self.log.error(message)
+ raise N2VCBadArgumentsException(message=message, bad_args=['ee_id_2'])
+ if not endpoint_1:
+ message = 'endpoint 1 is mandatory'
+ self.log.error(message)
+ raise N2VCBadArgumentsException(message=message, bad_args=['endpoint_1'])
+ if not endpoint_2:
+ message = 'endpoint 2 is mandatory'
+ self.log.error(message)
+ raise N2VCBadArgumentsException(message=message, bad_args=['endpoint_2'])