flayer.profiles¶
flayer.profiles ¶
Explicit deployment profiles and owned generated artifacts.
Artifact
dataclass
¶
Artifact(name: str, content: bytes, sensitive: bool = True)
ArtifactBundle
dataclass
¶
ArtifactBundle(identity: StackIdentity, kind: str, name: str, files: tuple[Artifact, ...])
ArtifactError ¶
Bases: ContractError
An artifact is invalid, foreign, changed, busy, or unavailable for safe storage.
GatewayDevice
dataclass
¶
GatewayDevice(device_id: str, public_key: str, source_cidrs: tuple[str, ...])
GatewayError ¶
Bases: ContractError
Profile intent or a prepared initialization artifact violates its contract.
GatewayPlan
dataclass
¶
GatewayPlan(profile: GatewayProfile)
Immutable composition input; serialized lifecycle plans bind an exported artifact.
GatewayPort
dataclass
¶
GatewayPort(protocol: str, port: int, cidrs: tuple[str, ...])
GatewayProfile
dataclass
¶
GatewayProfile(identity: StackIdentity, zone_id: str, image_id: str, subnet_cidr: str, ssh_public_key: str, management_cidrs: tuple[str, ...], transport: GatewayTransport, service_ports: tuple[GatewayPort, ...] = (), ssh_username: str = 'gateway-admin', ssh_port: int = 22, cores: int = 2, memory_gib: int = 2, boot_disk_gib: int = 20, schema_version: int = PROFILE_SCHEMA_VERSION)
Explicit cloud placement and Ubuntu 24.04 cloud-init security intent.
GatewayTarget
dataclass
¶
GatewayTarget(name: str, host: str, port: int)
GatewayTransport
dataclass
¶
GatewayTransport(username: str, targets: tuple[GatewayTarget, ...], devices: tuple[GatewayDevice, ...])
A restricted SSH local-forward transport with separately declared device keys.
BuildDeviceBundle ¶
BuildDeviceBundle(identity: StackIdentity, device_id: str, transport: str, files: tuple[Artifact, ...]) -> ArtifactBundle
Wrap externally issued transport files without generating or validating credentials.
Source code in installed/flayer/profiles/artifacts.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |
RemoveArtifactBundle ¶
RemoveArtifactBundle(root: str | Path, identity: StackIdentity, *, kind: str, name: str) -> bool
Remove only exact, unchanged owned files; never recurse or delete provider resources.
Source code in installed/flayer/profiles/artifacts.py
538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 | |
WriteArtifactBundle ¶
WriteArtifactBundle(root: str | Path, bundle: ArtifactBundle) -> Path
Publish a new manifest-last bundle exclusively and roll back only created files.
Source code in installed/flayer/profiles/artifacts.py
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 | |
BuildServerBundle ¶
BuildServerBundle(profile: GatewayProfile) -> ArtifactBundle
Build initialization bytes without resolving secrets, uploading, or claiming readiness.
Source code in installed/flayer/profiles/gateway.py
557 558 559 560 561 562 563 564 565 | |
BuildSshDeviceBundle ¶
BuildSshDeviceBundle(profile: GatewayProfile, device_id: str, *, endpoint: str, identity_file: str | Path, known_hosts_file: str | Path, local_ports: tuple[int, ...]) -> ArtifactBundle
Generate usable local TCP forwards with caller-provided key and trusted-host references.
Source code in installed/flayer/profiles/gateway.py
586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 | |
CompileGateway ¶
CompileGateway(profile: GatewayProfile) -> GatewayPlan
Compile validated profile intent without performing filesystem or provider operations.
Source code in installed/flayer/profiles/gateway.py
435 436 437 438 439 440 441 442 443 | |
LoadGatewayProfile ¶
LoadGatewayProfile(path: str | Path) -> GatewayProfile
Read a bounded explicit profile without consulting credentials or environment defaults.
Source code in installed/flayer/profiles/gateway.py
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | |
ParseGatewayProfile ¶
ParseGatewayProfile(data: Mapping[str, object]) -> GatewayProfile
Reject unknown settings, secret fields, and unversioned profile tables.
Source code in installed/flayer/profiles/gateway.py
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | |
RenderPlan ¶
RenderPlan(plan: GatewayPlan, *, user_data_file: str | Path) -> str
Bind exact generated bytes to a lifecycle TOML plan without importing future orchestration.
Source code in installed/flayer/profiles/gateway.py
642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 | |