一个用于jamf-pro补丁定义管理的命令行工具。

patchlib的Python项目详细描述


patchcli

一个命令行工具,用于生成jamf pro补丁定义、补丁更新, 以及与补丁服务器和communitypatch api的内置集成。

警告:此工具正在进行活动开发,并且cli界面和 功能将在更新之间频繁更改。

安装

patchcli可以从python包索引安装:

$ pip install patchlib

patchlib模块包含patchcli命令。

关于

基本用法

$ patchcli -h
usage: patchcli [-h] [-v] [-P PROFILE] {patch,validate,api,create_profile} ...

PatchCLI is a command line tool for Jamf Pro patch definition management.

Global Options:
  -h, --help            show this help message and exit
  -v, --version         Display version information.
  -P PROFILE, --profile PROFILE
                        The Patch API profile name to use.

Commands:
    patch               Create a new definition JSON file
    validate            Validate an existing definition JSON file.
    api                 Perform quick interactions with the Patch APIs.
    create_profile      Create a profile to use the Patch API integrations.

补丁命令

$ patchcli patch -h
usage: patchcli patch [-h] [-o <output_dir>] [-p <publisher_name>] [-n <name>]
                      [-e <ext_att_path>] [--app-version <version>]
                      [--min-sys-version <version>] [--patch-only]
                      path

positional arguments:
  path                  Path to the application

optional arguments:
  -h, --help            show this help message and exit
  -o <output_dir>, --output <output_dir>
                        Directory path to write JSON file
  -p <publisher_name>, --publisher <publisher_name>
                        Provide publisher name for a full definition
  -n <name>, --name <name>
                        Provide the display name for a full definition
  -e <ext_att_path>, --extension-attribute <ext_att_path>
                        Path to a script to include as an extension attribute
                        * You can include multiple extension attribute
                        arguments
  --app-version <version>
                        Provide the version of the app (override
                        CFBundleShortVersionString)
  --min-sys-version <version>
                        Provide the minimum supported version fo macOS for
                        this app (e.g. 10.9)
  --patch-only          Only create a patch, not a full definition

验证命令

$ patchcli validate -h
usage: patchcli validate [-h] [-p] path

positional arguments:
  path         Path to the definition JSON file.

optional arguments:
  -h, --help   show this help message and exit
  -p, --patch  Validate a patch, not a full definition.

API命令
$ patchcli api -h
usage: patchcli api [-h] {list_titles,get_title} ...

optional arguments:
  -h, --help            show this help message and exit

API Commands:
    list_titles         List available software titles
    get_title           Get a software title definition

修补API配置文件

$ patchcli create_profile -h
usage: patchcli create_profile [-h] [-n <profile_name>] [-t <api_token>]
                               (--ps <patch_server_url> | --cp | --cpb)
                               [--overwrite]

optional arguments:
  -h, --help            show this help message and exit
  -n <profile_name>, --name <profile_name>
                        Profile name
  -t <api_token>, --token <api_token>
                        The API token
  --ps <patch_server_url>, --patch-server <patch_server_url>
                        The URL to a local Patch Server instance
  --cp, --community-patch
                        Use the Community Patch service
  --cpb, --community-patch-beta
                        Use the Beta Community Patch service
  --overwrite           Overwrite an existing profile of the same name.

patchlib

导入并使用修补程序服务器和communitypatch的api客户端。

历史记录

版本

0.3.0(2018-10-31)

添加了apicreate_profile命令。新选项允许基本API访问 使用命令行界面,并将展开以包含更多功能和 直接集成到patch命令中。

0.2.2(2018-10-29)

修复了阻止通过pip安装的setup.py问题。

0.2.1(2018-10-29)

自述输入错误。

0.2.0(2018-10-27)

更新了cli界面以使用子命令。所有以前的功能 patchstarter.py脚本已移动到patch命令中。

添加了允许用户执行架构验证的validate命令 在上载到修补程序之前手动创建/编辑定义文件 服务器。

0.1.0(2018-10-25)

存储库设置。端口现有的PasChaseT.Py功能。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java正在寻找Java8中的内置函数以忽略异常   javascript JQuery更改Div的颜色   java PostgreSQL使用JDBC写入inet列   java为什么体重指数计算结果不正确?   java禁用linux中的log4j控制台日志记录   java我可以让我的JMS主题在新订阅者连接时通知发布者(使用ActiveMQ)   基于三个浮点输入的java过滤器JTable?   Java OpenGL/LWJGL体素纹理   在SpringBoot java应用程序中,有没有一种方法可以通过不同的机器使用hostIP作为主机远程连接到redis服务器   java Struts 2 s:提交按钮语法以在映射中设置值   java源代码:setDomainEnv。windows 7中的cmd文件   缺少货币计算java的返回语句   JavaHibernate没有注意到从其他源进行的数据库更新   无法在OpenCV/Java中生成负矩阵   Java不做循环   java无法使用类对象写入文件ArrayList   jpa使用数组作为调用Java的存储过程的输入   java使用文件提供程序检索内容Uri失败   需要java程序来创建方法模板