@startuml
!include skin.inc
participant "API consumer" as cons
participant "NFV-MANO\nfunctional entity" as prod
autonumber
	
== Addition of configuration/information w.r.t. a peer entity ==
note over cons, prod
        Precondition: The functional entity corresponding to PeerEntity available  
end note
autonumber 10
	cons -> prod: POST .../peer_entities (CreatePeerEntityRequest)
	prod -->> prod: Creates resource\n representing the\n peer entity
	prod -> cons: 201 Created (PeerEntity)
note over cons, prod
        Postcondition: The resource related to PeerEntity available to API consumer
end note
== Query/Read configuration/information w.r.t. peer entity ==
autonumber 20
	alt Query/read configuration/information w.r.t. all peer entities
		cons -> prod: GET .../peer_entities
		prod -> cons: 200 OK (PeerEntity[])
	else Read configuration/information w.r.t. individual peer entity
		cons -> prod: GET .../peer_entities/{peerEntityId}
		prod -> cons: 200 OK (PeerEntity)
	end
note over cons, prod
        Postcondition: Configuration and information w.r.t PeerEntity available to API consumer
end note
== Change configuration/information w.r.t. peer entity ==
autonumber 30
	cons -> prod: PATCH .../peer_entities/{peerEntityId}
	prod -->> prod: Processes the\n modification
	prod -> cons: 200 OK (PeerEntityConfigModifications)
note over cons, prod
        Postcondition: Configuration and information w.r.t PeerEntity updated
end note
== Deletion of configuration/information w.r.t. peer entity ==
autonumber 40
	cons -> prod: DELETE .../peer_entities/{peerEntityId}
	prod -->> prod: Deletes the resource\n representing the\n peer entity
	prod -> cons: 204 No Content
note over cons, prod
        Postcondition: Configuration and information w.r.t PeerEntity not available to functional entity
end note	
@enduml

