Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support editing/patching model files #140

Merged
merged 7 commits into from
Dec 9, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions include/ignition/fuel_tools/FuelClient.hh
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,24 @@ namespace ignition
const ignition::fuel_tools::ModelIdentifier &_model,
const std::vector<std::string> &_headers);

/// \brief Update a model using a PATCH request.
///
/// Model fields that are patched by this function:
/// * private
chapulina marked this conversation as resolved.
Show resolved Hide resolved
/// * Model files contained in _pathToModelDir.
/// * Description, tags, license, and other attributes found in the
/// metadata.pbtxt or model.config file.
///
/// \param[in] _model The model to patch. The contents of this model
/// will be sent in the PATCH request.
/// \param[in] _headers Headers to set on the HTTP request.
/// \param[in] _pathToModelDir a path to a directory containing a model.
/// \return Result of the patch operation.
public: Result PatchModel(
const ignition::fuel_tools::ModelIdentifier &_model,
const std::vector<std::string> &_headers,
const std::string &_pathToModelDir);

/// \brief Parse Collection identifer from URL.
/// \param[in] _url The unique URL of a collection. It may also be a
/// unique name, which is a URL without the server version.
Expand Down
Loading