/plugin-example-inven-collector

Example for inventory collector plugin

Primary LanguagePythonApache License 2.0Apache-2.0

Cloudforet Plugin Example



License: Apache 2.0

plugin-example-inven-collector is an example inventory collector plugin for Cloudforet. This plugin helps you implement custom inventory collection.

Development Guide

To develop the plugin, follow these steps:

  1. Fork the repository (https://github.com/cloudforet-io/plugin-example-inven-collector.git)
  2. Clone the repository.
git clone https://github.com/{Your repository}/plugin-example-inven-collector.git
cd plugin-example-inven-collector

Development Environment

  1. Python Virtual environment
python3 -m venv venv
source venv/bin/activate
  1. Install dependencies
pip3 install -e .

Run Plugin Server

spaceone run plugin-server plugin -m src

Local Test

pip3 install spacectl
spacectl config init -f test/local.yml


List API spec

spacectl api-resources

  1. Collector.init
spacectl exec init inventory.Collector -f test/init.yml

  1. Collector.verify
spacectl exec verify inventory.Collector -f test/verify.yml

  1. Collector.collect
spacectl exec collect inventory.Collector -f test/collect.yml