Add and replace script source by pasting text

Open
#28 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
api, backend

Research direction

Start by tracing the existing file-based source-management flow and its REST endpoint, including permission checks, filename and size validation, replacement confirmation, and revision creation. Implement the single-module text alternative in both interfaces while rejecting simultaneous file and text input; done means the existing rules remain enforced and replacements create new revisions.

Written by the indexing model from the issue text.

Description

app: scripts complexity: low status: backlog type: feature
Plugin Version

v0.0.1

Proposed functionality

Let operators enter a module name and paste Python source instead of uploading a file. Provide the same option through REST.

Accept either a file or text, not both. Use the existing source-management permissions, filename rules, size limits, replacement confirmation, and validation. Replacement must create a new revision, not edit an existing one.

Keep this to a single module. A browser editor, nested upload paths, and multi-file updates remain separate work.

Use case

Some environments block .py attachments but permit approved source-text submissions. This would offer a supported alternative when a Git-backed Project is unavailable, without requiring files to be renamed on the server.

Related request: netbox-community/netbox#21701.

External dependencies

No new package or service is expected.

Dominant language
Python
Stars
8
Forks
0
Avg merge
9h 56m
Merged PRs (30d)
29

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from netbox-community/netbox-scripts

All issues in netbox-community/netbox-scripts

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.