PaloAltoNetworks / PaloAltoNetworks/pan-os-python

Clone()

Open
#124 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
400
Forks
199
PR merge metrics
No merged PRs in 30d

Description

Hi

is it possible to add clone() as move() in base.PanObject as defined in pan.xapi:

clone(xpath=None, xpath_from=None, newname=None)
The clone() method performs the action=clone device configuration API request with the xpath, from (xpath_from function argument) and newname arguments.

This clones (copies) an existing node in the configuration specified by xpath. xpath_from is used to specify the source XPath and newname is used to specify the new name for the cloned node.

https://github.com/kevinsteves/pan-python/blob/master/doc/pan.xapi.rst#movexpathnone-wherenone-dstnone

Thanks in advance,

Contributor guide

Open the contributing guide

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.

Research direction

Start at base.PanObject and use the existing move() method as the entry point, consulting the linked pan.xapi move() documentation for the API request shape. Add clone(xpath=None, xpath_from=None, newname=None) so it issues the clone action with those arguments; done means the method can clone an existing configuration node.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.