def create(self, bigip): u"""Create resource on a BIG-IP system. The internal data model is applied to the BIG-IP Args: bigip (f5.bigip.ManagementRoot): F5 SDK session object Returns: created resource object. Raises: F5CcclResourceCreateError: resouce cannot be created for an unspecified reason. F5CcclResourceConflictError: resouce cannot be created because it already exists on the BIG-IP """ LOGGER.info("Creating %s: /%s/%s", self.classname(), self.partition, self.name) try: obj = self._uri_path(bigip).create(**self._data) return obj except iControlUnexpectedHTTPError as err: self._handle_http_error(err) except F5SDKError as err: LOGGER.error("Create FAILED: /%s/%s", self.partition, self.name) raise cccl_exc.F5CcclResourceCreateError(str(err))
def f(): raise exceptions.F5CcclResourceCreateError()