Loading...
Loading...
Create and manage Infrahub Generators. Use when building design-driven automation that creates infrastructure objects from templates, topology definitions, or any design-to-implementation workflow in Infrahub.
npx skill4agent add opsmill/infrahub-skills infrahub-generator-creator| Priority | Category | Prefix | Description |
|---|---|---|---|
| CRITICAL | Architecture | | Components, groups |
| CRITICAL | Python Class | | Generator, generate() |
| HIGH | Tracking | | Upsert, idempotent |
| HIGH | API Ref | | Constructor, props |
| HIGH | Registration | | .infrahub.yml config |
| MEDIUM | Patterns | | Cleaning, batch, store |
| LOW | Testing | | infrahubctl commands |
.gqlInfrahubGeneratorgenerate()from infrahub_sdk.generator import InfrahubGenerator
class MyGenerator(InfrahubGenerator):
async def generate(self, data: dict) -> None:
obj = await self.client.create(
kind="DcimDevice",
data={"name": "spine-01"},
)
await obj.save(allow_upsert=True)