Commit fcb1f361 authored by Umberto Fattore's avatar Umberto Fattore Committed by Hammad Zafar
Browse files

NFVSOL(26)000063_Clause_7_Sequence_Diagrams

parent e77f49d2
Loading
Loading
Loading
Loading
+70 −1
Original line number Original line Diff line number Diff line
@@ -880,7 +880,76 @@ The HTTP methods marked as \"M\" (mandatory) in the \"Cat\" column of table 7.3-


## 7.4 Sequence diagrams (informative)
## 7.4 Sequence diagrams (informative)


<mark>Editor's Note:    This sub-clause will add sequence diagrams of operations supported over this service interface.</mark>
### 7.4.1 Introduction

The following clauses describe the sequences for querying, replacing and modifying an inventory object. 

The diagrams and their description contain placeholders indicated as &lt;inventory object collection URI> and &lt;inventory object URI> which refer to the URIs of the corresponding API resources specified in clause 7.3.

Flows related to task monitoring, subscription management and notifications are described in Annex A of the present document.

### 7.4.2 Querying information about inventory objects

This clause describes the sequences for querying information about both multiple and individual inventory objects.

![Figure 7.4.2-1: Flow of querying information about inventory objects](media/image43.png)

**Figure 7.4.2-1: Flow of querying information about inventory objects**

The querying of information about one or more inventory objects, as illustrated in Figure 7.4.2-1, consists of the following steps.

**Precondition:** One or more individual inventory objects have previously been created.

1. If the API consumer intends to get information about multiple inventory objects, it sends a GET request to the appropriate &lt;inventory object collection URI>.
1. The PIM returns a \"200 OK\" response to the API consumer and includes in the message content body a representation of an &lt;inventory object collection>, containing information about all the individual inventory objects that have been created.
1. If the API consumer intends to get information about an individual inventory object, it sends a GET request to the appropriate &lt;inventory object URI>.
1. The PIM returns a \"200 OK\" response to the API consumer and includes in the message content body a representation of the individual inventory object.

**Postcondition:** None.

**Error handling:** In case of failure, appropriate error information is provided in the response.

### 7.4.3 Modifying an inventory object

This clause describes a sequence for modifying an individual inventory object.

![Figure 7.4.3-1: Flow of inventory object modification](media/image44.png)

**Figure 7.4.3-1: Flow of inventory object modification**

The modification of an inventory object, as illustrated in Figure 7.4.3-1, consists of the following steps.

**Precondition:** The individual inventory object has been previously created.

1. The API consumer sends a PATCH request to the &lt;inventory object URI>, including data structure in the message content body representing the modifiable properties to be modified in the individual inventory object.
1. If the PIM supports asynchronous operations and modification of the inventory object requires some time to process, the PIM returns a \"202 Accepted\" response. The response also contains the URI of the associated Task Monitor in the Location header. The response body can optionally contain representation of the corresponding Task resource created by the PIM for this asynchronous operation.
1. The PIM modifies the individual inventory object.
1. The PIM returns a \"200 OK\" response to the API consumer and includes in the message content body a representation of the modified inventory object. Alternatively, the PIM can also return a \"204 No Content\" response to the API consumer indicating successful operation.

**Postcondition:** Upon successful completion of the synchronous operation or of the corresponding task in case of asynchronous operation, the individual inventory object has been modified.

**Error handling:** In case of failure, appropriate error information is provided in the response.

### 7.4.4 Replacing an inventory object

This clause describes a sequence for replacing an individual inventory object.

![Figure 7.4.4-1: Flow of inventory object replacement](media/image45.png)

**Figure 7.4.4-1: Flow of inventory object replacement**

The replacement of an individual inventory object, as illustrated in Figure 7.4.4-1, consists of the following steps.

**Precondition:** The individual inventory object has been previously created.

1. The API consumer sends a PUT request to the &lt;inventory object URI> including a valid representation of the individual inventory object to be replaced in the message content body.
1. If the PIM supports asynchronous operations and replacement of the inventory object requires some time to process, the PIM returns a \"202 Accepted\" response. The response also contains the URI of the associated Task Monitor in the Location header. The response body can optionally contain representation of the corresponding Task resource created by the PIM for this asynchronous operation.
1. The PIM replaces the individual inventory object.
1. The PIM returns a \"200 OK\" response to the API consumer and includes in the message content body a representation of the replaced inventory object. Alternatively, the PIM can also return a \"204 No Content\" response to the API consumer indicating successful operation.

**Postcondition:** Upon successful completion of the synchronous operation or of the corresponding task in case of asynchronous operation, the individual inventory object has been replaced.

**Error handling:** In case of failure, appropriate error information is provided in the response.


## 7.5 Resources
## 7.5 Resources
<mark>Editor's Note:    This sub-clause will add API resources of the service interface.</mark>
<mark>Editor's Note:    This sub-clause will add API resources of the service interface.</mark>

media/image43.png

0 → 100644
+9.44 KiB
Loading image diff...

media/image44.png

0 → 100644
+13.5 KiB
Loading image diff...

media/image45.png

0 → 100644
+13.2 KiB
Loading image diff...
+22 −0
Original line number Original line Diff line number Diff line
@startuml
skinparam defaultFontName "Arial"
skinparam defaultFontSize 11
	participant "API consumer" as cli 
	participant "PIM" as srv
  note over cli, srv
	Precondition: The individual inventory object has been previously created.
	end note
	autonumber
	cli -> srv: PATCH <inventory object URI> (PatchSet)
alt Asynchronous Operation
	cli <- srv: 202 Accepted
else Synchronous Operation
	srv -> srv: Modifies individual\ninventory object
	cli <- srv: 200 OK (<inventory object>) / 204 No Content
	autonumber stop
end
	note over cli, srv
	Postcondition: Upon successful completion of the synchronous operation or of the corresponding task
	 in case of asynchronous operation, the individual inventory object has been modified.
	end note
@enduml
 No newline at end of file
Loading