public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Dominik Csapak <d.csapak@proxmox.com>,
	Hannes Laimer <h.laimer@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox/proxmox-backup] add 'pbs-shell' tool
Date: Wed, 15 Sep 2021 07:25:54 +0200	[thread overview]
Message-ID: <34eabcdc-5ec1-4a24-526f-7ad005bbf739@proxmox.com> (raw)
In-Reply-To: <84271615-32d7-9ada-372a-141d05210406@proxmox.com>

disclaimer: I had half an answer here but missed to send it out soon enough, it's somewhat
obsolete due to your v2 but also does not hurt to have on the list so still sending it..

On 13.09.21 12:38, Dominik Csapak wrote:
> thanks for testing!
> 
> On 9/13/21 11:36, Hannes Laimer wrote:
>> I just noticed two things while testing:
>>   - if an endpoint expects a parameter called 'path'(e.g. POST /config
>>       /datastore), the parameter conflicts with the api path itself
> 
> i'll fix it in the v2 by renaming the variable to 'api-path'. or
> should i prefix it with 'pbs-shell' or something?
> (it must be something that will not occur in the normal api)

meh... Ideally we'd use something that the API probably won't be allowed to use
any time in the future (e.g., 🛠️ ;P).

But, `api-path` sounds all right, it's unlikely to be used anytime soon, and
even if we can think through a better solution then, it's a fixed argument any
way I figure; so adapting that wouldn't be an actual breaking change.

So your v2 is fine.

> while i think it *would* be better if we let the proxy/daemon
> start the worker, there is no way to detect api calls
> that start a worker before actually executing it...
> since it's *only* a debug tool, its still fine i think..

I (low-priority) planned to add an actual UPID "type" in PVE since a bit for
API calls that return a worker, doing so in PBS could be used as indication
that a endpoint may return a worker.

> 
> alternatively, we can switch to a http client for executing
> the api entirely...

In that case I'd really like to produce a full-feature API client crate that
can also cope with PVE/PMG (not much to change there). We need that anyway
for future projects and it shouldn't be to hard, can be somewhat modeled
after the pve-api-client perl thingy in API and semantics; it would be great
though if it could cope with either hyper or something simple & sync like
ureq (once the native-tls support pull-request is merged).





      reply	other threads:[~2021-09-15  5:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09 13:48 Dominik Csapak
2021-09-09 13:48 ` [pbs-devel] [PATCH proxmox 1/1] proxmox: generate_usage_str: don't require static lifetimes Dominik Csapak
2021-09-15  7:40   ` [pbs-devel] applied: " Thomas Lamprecht
2021-09-09 13:48 ` [pbs-devel] [PATCH proxmox-backup 1/5] add 'pbs-shell' utility Dominik Csapak
2021-09-09 13:48 ` [pbs-devel] [PATCH proxmox-backup 2/5] api2: add missing token list match_all property Dominik Csapak
2021-09-09 13:48 ` [pbs-devel] [PATCH proxmox-backup 3/5] api2: disks/directory: refactor BASE_MOUNT_DIR Dominik Csapak
2021-09-09 13:48 ` [pbs-devel] [PATCH proxmox-backup 4/5] api2: disks/directory: add 'name' property to directory mount listing Dominik Csapak
2021-09-09 13:48 ` [pbs-devel] [PATCH proxmox-backup 5/5] api2: nodes: add missing node list api call Dominik Csapak
2021-09-15  9:44   ` [pbs-devel] applied: " Thomas Lamprecht
2021-09-13  9:36 ` [pbs-devel] [PATCH proxmox/proxmox-backup] add 'pbs-shell' tool Hannes Laimer
2021-09-13 10:38   ` Dominik Csapak
2021-09-15  5:25     ` Thomas Lamprecht [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34eabcdc-5ec1-4a24-526f-7ad005bbf739@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=d.csapak@proxmox.com \
    --cc=h.laimer@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal