CrudService

class ydk::CrudService : public Service

CRUD Service class for supporting CRUD operations on entities.

CrudService()
bool create(path::ServiceProvider &provider, Entity &entity)

Create the entity.

Parameters:
  • provider – An instance of ServiceProvider
  • entity – An instance of Entity class defined under a bundle
Returns:

true if successful, false if not

Raises YCPPError:
 

If an error has occurred

bool update(path::ServiceProvider &provider, Entity &entity)

Update the entity.

Parameters:
  • provider – An instance of ServiceProvider
  • entity – An instance of Entity class defined under a bundle
Returns:

true if successful, false if not

Raises YCPPError:
 

If an error has occurred

bool delete_(path::ServiceProvider &provider, Entity &entity)

Delete the entity.

Parameters:
  • provider – An instance of ServiceProvider
  • entity – An instance of Entity class defined under a bundle
Returns:

true if successful, false if not

Raises YCPPError:
 

If an error has occurred

std::shared_ptr<ydk::Entity> read(path::ServiceProvider &provider, Entity &filter)

Read the entity.

Parameters:
  • provider – An instance of ServiceProvider
  • filter – An instance of Entity class defined under a bundle
Returns:

A pointer to an instance of Entity as identified by the filter if successful, nullptr if not

Raises YCPPError:
 

If an error has occurred

std::shared_ptr<ydk::Entity> read_config(path::ServiceProvider &provider, Entity &filter)

Read only config.

Parameters:
  • provider – An instance of ServiceProvider
  • filter – An instance of entity class defined under a bundle
Returns:

A pointer to an instance of Entity as identified by the filter if successful, nullptr if not

Raises YCPPError:
 

If an error has occurred