infix icon indicating copy to clipboard operation
infix copied to clipboard

Upload image and upgrade

Open mattiaswal opened this issue 6 months ago • 0 comments

This add support for upgrading images with curl only, without FTP or similiar. The image needs to be base64 encoded.

Example:

TEMP_JSON=/tmp/restconf.txt
echo -n '{"infix-system:input":{"image":"' > "$TEMP_JSON"
base64 -w 0 "image.pkg >> "$TEMP_JSON"
echo '"}}' >> "$TEMP_JSON"
    
curl -k \
      -X POST \
      -u "admin:admin" \
      -H "Content-Type: application/yang-data+json" \
      -H "Accept: application/yang-data+json" \
      -d @"$TEMP_JSON" \
      "https://192.168.30.1/restconf/operations/infix-system:install-bundle"

Description

This is WiP since it uses huge amout of memory. Will take a look at that first.

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • [ ] Bugfix
    • [ ] Regression tests
    • [ ] ChangeLog updates (for next release)
  • [ ] Feature
    • [ ] YANG model change => revision updated?
    • [ ] Regression tests added?
    • [ ] ChangeLog updates (for next release)
    • [ ] Documentation added?
  • [ ] Test changes
    • [ ] Checked in changed Readme.adoc (make test-spec)
    • [ ] Added new test to group Readme.adoc and yaml file
  • [ ] Code style update (formatting, renaming)
  • [ ] Refactoring (please detail in commit messages)
  • [ ] Build related changes
  • [ ] Documentation content changes
    • [ ] ChangeLog updated (for major changes)
  • [ ] Other (please describe):

mattiaswal avatar Jul 11 '25 14:07 mattiaswal