Skip to content

Declarative support

NetOrca can allow for SI's to be treated as the source of truth to create declarations to push to an end device.

Basic process

The basic process for this would be as follows:

  1. Get all ServiceItems for your particular Service GET /serviceowner/serviceitems?service_name={{myservice}}
  2. Get all the outstanding change instances for your service GET /serviceowner/change_instances?service_name={{myservice}}
  3. Create a declaration from the details in that return
  4. Push your declaration to your infrastructure
  5. Mark all outstanding changes obtained in step 2 as completed
  6. Send back (optional) deployed items when completing the above change instances.

Process Diagram

sequenceDiagram
    participant Consumer
    participant NetOrca
    participant ServiceOwner
    participant Deployment
    Consumer->>NetOrca: New declaration sent
    activate NetOrca
    NetOrca-->>NetOrca: Validation Check
    alt Validation Fail
    NetOrca-->>Consumer: 400 Error
    else Validation passes
    NetOrca-->>NetOrca: Declaration compared against existing SI's
        opt Changes detected
        NetOrca-->>NetOrca: Change instances created
            alt Auto approval enabled
                Note over NetOrca: State 'APPROVED'
            else Auto approval disabled
                Note over NetOrca: State 'PENDING'
            end
        end
    NetOrca->>Consumer: 200 OK
    end
    par Change Processing
        loop Check for changes GUI or API
            ServiceOwner->>NetOrca: Get Changes
            alt No Changes detected
                NetOrca->>ServiceOwner: No Changes
                Note over ServiceOwner: Do nothing
            else Changes detected
                NetOrca->>ServiceOwner: List of changes
                activate ServiceOwner
                loop for each change
                    alt Approved
                        ServiceOwner->>NetOrca: Move change state to APPROVED
                    else Error/Not approved
                        ServiceOwner->>NetOrca: Move change state to ERROR
                    end
                deactivate ServiceOwner
                end
            end             
        end
    and Processing Deployment
        Note over ServiceOwner: Deployment Processing
        ServiceOwner->>NetOrca: Get list of approved changes
        NetOrca->>ServiceOwner: Return approve changes list
        Note over ServiceOwner: Store list of approved changes
        ServiceOwner->>NetOrca: Get all SI configurations
        activate ServiceOwner
        NetOrca->>ServiceOwner: SI Configs
        Note over ServiceOwner: Process changes
        ServiceOwner->>ServiceOwner: Generate declaration
        Note over ServiceOwner: Declaration created
        ServiceOwner->>Deployment: Push declaration
        deactivate ServiceOwner
        activate Deployment
        Note over Deployment: Process new declaration
        Deployment->>ServiceOwner: Declaration successfull
        deactivate Deployment
        ServiceOwner->>NetOrca: Mark all APPROVED Changes as COMPLETED
        Note over NetOrca,ServiceOwner: DeployedItems updated
    end