Skip to main content

Python CLI for managing template library.

Project description

Introduction

Usage

Before you begin using xopera-template-library tool you have to configure the endpoint and login with your account Examples:

$ xopera-template-library setup
$ xopera-template-library login --username "username1" --password "password1"

At any point the -h(help) flag is available to display proceeding options. Example:

$ xopera-template-library service-template -h
usage: xopera-template-library service-template [-h]
                                                {save,get,list,version} ...

positional arguments:
  {save,get,list,version}
    save                Save a template to database.
    get                 Get a template from database.
    list                List templates from database.
    version             Version options for templates.

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

Next you can use option list to display available templates. Use the flag --public_access to display all public service or entity templates or without the flag to display all templates that you own. Listing templates allows you to identify the ID of a certain template for future use and to view template information. Examples:

$ xopera-template-library service-template list

$ xopera-template-library entity-template list

$ xopera-template-library service-template list --public_access

$ xopera-template-library entity-template list --name AwsLambda
$ xopera-template-library entity-template version list --template_name AwsLambda

To download a template you have to provide the path to where you want the template to be saved, whenever a template has public access and one of the 3 possible idefitifers of the template: template_name, template_id or version_id. If you use template name or ID the client will print available versions and ask you to pick one.

$ xopera-template-library service-template get --template_name DemoBlueprintOpenFaaS --public_access --path example/

If the desired template doesn't exist yet you can create and upload your own. You can start by generating a basic file structure by running... The tool will ask you for your model name and type. Possible types are data_types, artifact_types, capability_types, requirement, relationship_types, interface_types, node_types, group, policy_types, csar, other. Examples:

$ xopera-template-library create-model
Model name:Test
Model type:artifact_types

After the basic files are generated you can edit them and upload your template to the library: Examples:

$ xopera-template-library entity-template save --name AwsLambda --path example/AwsLambdaFunction --public_access --version 0.0.1

Particle to upload structure

|-- Folder
       |-- files
           |-- create.yml
           |-- undeploy.yml
       |-- NodeType.tosca

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xopera-template-library-0.1.10.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xopera_template_library-0.1.10-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file xopera-template-library-0.1.10.tar.gz.

File metadata

  • Download URL: xopera-template-library-0.1.10.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.3

File hashes

Hashes for xopera-template-library-0.1.10.tar.gz
Algorithm Hash digest
SHA256 699cfd9bec8cf3f85e5bbc3812e19c587dbaa853fb79089f0203c144d6794a82
MD5 4929c1a6079a6ab187b6c8a9b59165b3
BLAKE2b-256 fa75b7b01236183750b87f01b9357f3501ff1d9d96ee79ae5fa1dbae1ce13d98

See more details on using hashes here.

File details

Details for the file xopera_template_library-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: xopera_template_library-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.3

File hashes

Hashes for xopera_template_library-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 95a0633c9029456470f462c359000e4d8b6754b5428b27d53921a4b0ca0140d0
MD5 a70e22344d1d3abaf737ca80fa1864f1
BLAKE2b-256 0a3e6b7bd13fa2513a1c41e24ab0e4beeaa2acd801c6bbad0d83edef69b59740

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page