Skip to content

Create imported commercial peer

A creation workflow that adds an existing Commercial Port to the DB.

initial_input_form_generator()

Generate a form that is filled in using information passed through the API endpoint.

Source code in gso/workflows/commercial_peer/create_imported_commercial_peer.py
def initial_input_form_generator() -> FormGenerator:
    """Generate a form that is filled in using information passed through the API endpoint."""

    class ImportCommercialPeer(SubmitFormPage):
        model_config = ConfigDict(title="Import Commercial Peer")

    user_input = yield ImportCommercialPeer

    return user_input.model_dump()

create_imported_commercial_peer()

Create an Imported Commercial Peer without provisioning it.

Source code in gso/workflows/commercial_peer/create_imported_commercial_peer.py
@workflow(
    "Create Imported Commercial Peer",
    initial_input_form=initial_input_form_generator,
    target=Target.CREATE,
)
def create_imported_commercial_peer() -> StepList:
    """Create an Imported Commercial Peer without provisioning it."""
    # TODO: Implement the steps to import a commercial peer.
    return begin >> resync >> done