Page tree

 

RESOURCE FUNCTION CONFIGURATION AND ACTIVATION API CONFORMANCE TEMPLATE

 

Document Number:  <TMF664>

Document Version: : <V0.2>

Date:  03 May 2017

Document Status: Draft

NOTICE

Copyright © TeleManagement Forum 2013. All Rights Reserved.

 

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to TM FORUM, except as needed for the purpose of developing any document or deliverable produced by a TM FORUM Collaboration Project Team (in which case the rules applicable to copyrights, as set forth in the TM FORUM IPR Policy , must be followed) or as required to translate it into languages other than English.

The limited permissions granted above are perpetual and will not be revoked by TM FORUM or its successors or assigns.

This document and the information contained herein is provided on an "AS IS" basis and TM FORUM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

 

Direct inquiries to the TM Forum office:

240 Headquarters Plaza,

East Tower – 10 th Floor,

Morristown, NJ   07960 USA

Tel No.   +1 973 944 5100

Fax No.   +1 973 944 5110

TM Forum Web Page: www.tmforum.org

TM Forum Web Page: www.tmforum.org

Table of Contents

NOTICE

Table of Contents

List of Tables

Introduction

API DESCRIPTION

RESOURCE MODEL CONFORMANCE

Resource Function API MANDATORY AND OPTIONAL RESOURCES

Resource Function resource MANDATORY AND OPTIONAL ATTRIBUTES

Resource Function/Heal resource MANDATORY AND OPTIONAL ATTRIBUTES

ResourceFunction/Scale resource MANDATORY AND OPTIONAL ATTRIBUTES

Resource Function/Migrate resource MANDATORY AND OPTIONAL ATTRIBUTES

API OPERATIONS CONFORMANCE

Resource Function MANDATORY AND OPTIONAL OPERATIONS

Resource Function/Heal MANDATORY AND OPTIONAL OPERATIONS

Resource Function/Scale MANDATORY AND OPTIONAL OPERATIONS

Resource Function/Migrate MANDATORY AND OPTIONAL OPERATIONS

API GET FILTERING OPERATION CONFORMANCE

Filtering in Resource Function resource

GET /resourceFunction/

GET /resourceFunction /{ID}

Filtering in ResourceFunction/Heal resource

GET /resourceFunction/Heal

GET /resourceFunction/Heal /{ID}

Filtering in ResourceFunction/Scale resource

GET /resourceFunction/Scale

GET /resourceFunction/Scale /{ID}

Filtering in ResourceFunction/Migrate resource

GET /resourceFunction/Migrate

GET /resourceFunction/Migrate /{ID}

API POST OPERATION CONFORMANCE

POST to /resourceFunction

POST to /resourceFunction/Heal

POST to /resourceFunction/Scale

POST to /resourceFunction/Migrate

API PATCH OPERATION CONFORMANCE

API DELETE OPERATION CONFORMANCE

DELETE  /resourceFunction//{ID}

API CONFORMANCE TEST SCENARIOS

Resource Function resource TEST CASES

 

List of Tables

 

No se encuentran elementos de tabla de ilustraciones.

 

Introduction

The following document is the REST API Conformance for the Resource Function Configuration and Activation API (TMF xxx).

API DESCRIPTION

The Resource Function Configuration and Activation API provides the standardized client interface to Hybrid Infrastructure Management Systems for provision, lifecycle management, configuration and activation of composite and atomic resource function.

A resource function represents a Network Service, VNF and PNF as well as a Network Flow path in ETSI NFV terminology.

RESOURCE MODEL CONFORMANCE

Resource Function API MANDATORY AND OPTIONAL RESOURCES

 

Resource Name

Mandatory or Optional

Comments

ResourceFunction

M

 

ResourceFunction/Heal

O

 

ResourceFunction/Scale

O

 

ResourceFunction/Migrate

O

 

 

 

Resource Function resource MANDATORY AND OPTIONAL ATTRIBUTES

 

Attribute Name

Mandatory or Optional

Comments

id

M (in response messages)

O (otherwise)

Generated by the server and provided in the response upon resource function creation.

Accepted in entity-creation requests if the server supports the incoming identifier as the reference to create new resources

href

M (in response messages)

O (otherwise)

Value in response must be the same as the one set in Location header provided upon entity creation

Name

O

 

description

O

 

type

O

 

version

O

 

role

O

 

location

O

Mandatory for services where physical location is an important attribute.

 

Id

O

 

 

href

M

 

autoModification

O

 

priority

O

 

state

M (in response messages)

O (otherwise)

 

subState

M (in response messages)

O (otherwise)

 

schedule

O

 

 

id

O

 

 

href

M

 

 

resourceFunctionConfig

M

 

sap

M (in response messages)

O (otherwise)

 

 

id

O

 

 

href

M

 

resourceFunctionSpecification

M/O

Mandatory for intent based requests where the resource function is to be created from a resource specification.

 

Id

O

 

 

href

M

 

characteristics

M/O

Mandatory in situations where the resource specification requires certain characteristics to be set.

 

name

M

 

 

value

M

 

feature

M/O

Mandatory in situations where the resource specification requires certain features to be set.

 

name

M

 

 

listOfCharacteristics

M

 

featureGroup

 

 

 

name

M

 

 

listOfCharacteristics

M/O

Either list OfCharacteristics or list OfFeatures needs to be provided

 

listOfFeatures

M/O

Either list OfCharacteristics or list OfFeatures needs to be provided

supportingResourceFunction

M/O

Mandatory for detail based requests where a new composite resource function is being created from a number of other resource functions.

connectivity

M/O

 

 

source

M

 

 

target

M

 

 

relation

M

 

relatedParty

O

Array of structures

 

id

O

 

 

href

M

 

 

role

M

 

 

Resource Function/Heal resource MANDATORY AND OPTIONAL ATTRIBUTES

 

Attribute Name

Mandatory or Optional

Comments

Id

M (in response messages)

O (otherwise)

Generated by the server and provided in the response upon resource function creation.

Accepted in entity-creation requests if the server supports the incoming identifier as the reference to create new resources

href

M

 

cause

O

 

degreeHealing

M

 

healAction

M

 

healPolicy

O

 

 

Id

O

 

 

href

M

 

startTime

O

 

additionalParms

O

Mandatory for services where physical location is an important attribute.

 

name

M

 

 

value

M

 

healStatus

M (in response messages)

O (otherwise)

 

ResourceFunction/Scale resource MANDATORY AND OPTIONAL ATTRIBUTES

 

Attribute Name

Mandatory or Optional

Comments

Id

M (in response messages)

O (otherwise)

Generated by the server and provided in the response upon resource function creation.

Accepted in entity-creation requests if the server supports the incoming identifier as the reference to create new resources

href

M (in response messages)

O (otherwise)

Value in response must be the same as the one set in Location header provided upon entity creation

type

O

 

aspectId

M

 

numberOfSteps

M

 

schedule

O

 

 

id

O

 

 

href

M

 

 

resourceFunctionConfig

M

 

additionalParms

O

 

 

name

M

 

 

value

M

 

scaleStatus

M (in response messages)

O (otherwise)

 

Resource Function/Migrate resource MANDATORY AND OPTIONAL ATTRIBUTES

 

Attribute Name

Mandatory or Optional

Comments

Id

M (in response messages)

O (otherwise)

Generated by the server and provided in the response upon resource function creation.

Accepted in entity-creation requests if the server supports the incoming identifier as the reference to create new resources

href

M (in response messages)

O (otherwise)

Value in response must be the same as the one set in Location header provided upon entity creation

adminStateModification

O

 

sapsToRemove

O

 

 

id

O

 

 

href

M

 

sapsToAdd

O

 

 

id

O

 

 

href

M

 

priority

O

 

startTime

O

 

completionMode

O

Mandatory for services where physical location is an important attribute.

location

M

 

 

id

O

 

 

href

M

 

migrateStatus

O

 

 

 

API OPERATIONS CONFORMANCE

For every single resource use the following templates and define what operations are optional and what operations are mandatory.

Resource Function MANDATORY AND OPTIONAL OPERATIONS

 

Uniform API Operation

Mandatory/Optional

Comments

GET

M

GET must be used to retrieve a representation of a resource

 

POST

M

POST must be used to create a new resource

PUT

O

PUT must be used to completely update a resource identified by its resource URI

PATCH (JSON-MERGE)

M

PATCH must be used to partially update a resource

DELETE

M

DELETE must be used to remove a resource

Notification

O

Notifications when a Resource Function is created, modified and deleted.

 

Resource Function/Heal MANDATORY AND OPTIONAL OPERATIONS

 

Uniform API Operation

Mandatory/Optional

Comments

GET

M

GET must be used to retrieve a representation of a resource

 

POST

M

POST must be used to create a new resource

PUT

O

PUT must be used to completely update a resource identified by its resource URI

PATCH (JSON-MERGE)

O

PATCH must be used to partially update a resource

DELETE

O

DELETE must be used to remove a resource

 

Resource Function/Scale MANDATORY AND OPTIONAL OPERATIONS

 

Uniform API Operation

Mandatory/Optional

Comments

GET

M

GET must be used to retrieve a representation of a resource

 

POST

M

POST must be used to create a new resource

PUT

O

PUT must be used to completely update a resource identified by its resource URI

PATCH (JSON-MERGE)

O

PATCH must be used to partially update a resource

DELETE

O

DELETE must be used to remove a resource

Resource Function/Migrate MANDATORY AND OPTIONAL OPERATIONS

 

Uniform API Operation

Mandatory/Optional

Comments

GET

M

GET must be used to retrieve a representation of a resource

 

POST

M

POST must be used to create a new resource

PUT

O

PUT must be used to completely update a resource identified by its resource URI

PATCH (JSON-MERGE)

O

PATCH must be used to partially update a resource

DELETE

O

DELETE must be used to remove a resource

 

 

 

API GET FILTERING OPERATION CONFORMANCE

Definitions

 

Filtered Search: A filtered search can be applied using query parameters in order to obtain only the resource entities that meet the criteria defined by the filtering parameters included in the query request. Several elements can be applied to the filtered search. In that case logic, a logical AND is applied to combine the criteria (e.g.:?severity=<value> &status=<value>)

 

Filtered Data (Attribute selection): In order to apply a filter and limit the number of attributes included in the response, the GET request can include the  “ ?fields=” query parameter. Several elements can be applied to the filter. In that case, a logical AND is applied to combine the values (e.g.:?fields=severity,status) will provide in the response only the values assigned to attributes category and channel. Attribute selection capabilities are the same for collections retrieval and individual resource queries

 

Filtering in Resource Function resource

Attribute name

Filtered search

First Level

Filtered search

N Level

Attribute Selection First Level

Attribute Selection N Level

id

NA

NA

N/A

NA

href

NA

NA

N/A

NA

Name

O

NA

M

NA

description

O

NA

M

NA

type

O

NA

M

NA

version

M

NA

M

NA

role

O

NA

M

NA

location

O

NA

M

NA

autoModification

O

NA

M

NA

priority

O

NA

M

NA

state

M

NA

M

NA

subState

M

NA

M

NA

schedule

O

NA

M

NA

sap

M

NA

M

NA

resourceFunctionSpecification

M

NA

M

NA

characteristics

O

NA

M

NA

feature

O

NA

M

NA

featureGroup

O

NA

M

NA

supportingResourceFunction

NA

NA

M

NA

connectivity

NA

NA

M

NA

relatedParty

O

NA

M

NA

 

GET /resourceFunction/

 

Filtered Search: A filtered search can be applied using the following filtering criteria

 

  • Version: To obtain all resource functions with a particular version.
  • state: To obtain all resource functions with a particular state.
  • substate: To obtain all resource functions with a particular substate within a state
  • sap: Obtain resource function providing a particular service access point.
  • resourceSpecification: To obtain the the list of Resource Functions created from a particular specification.

 

  • other optional attributes as defined in the table above

 

Filtered Data: A filtered response can be requested for the following attributes using the “?fields=” query parameter

-           Any of the attributes in the first level of Resource Function resource definition

 

GET /resourceFunction /{ID}

Filtered Search: A filtered response can be requested for the following attributes using the “?fields=” query parameter

-           Any of the attributes in thefirst level of Cutsomer resource definition

 

Filtering in ResourceFunction/Heal resource

Attribute name

Filtered search

First Level

Filtered search

N Level

Attribute Selection First Level

Attribute Selection N Level

Id

NA

NA

N/A

NA

href

M

NA

N/A

NA

cause

O

NA

M

NA

degreeHealing

O

NA

M

NA

healAction

O

NA

M

NA

healPolicy

O

NA

M

NA

startTime

O

NA

M

NA

additionalParms

O

NA

M

NA

healStatus

M

NA

M

NA

 

GET /resourceFunction/Heal

 

Filtered Search: A filtered search can be applied using the following filtering criteria

 

  • href: To obtain all the heal tasks against a particular resource function specified by the

href.

  • status: To obtain the the list of heal tasks with a particular status.
  • other optional attributes as defined in the table above

 

Filtered Data: A filtered response can be requested for the following attributes using the “?fields=” query parameter

-           Any of the attributes in the first level of Resource Function resource definition

 

GET /resourceFunction/Heal /{ID}

Filtered Search: A filtered response can be requested for the following attributes using the “?fields=” query parameter

-           Any of the attributes in thefirst level ResourceFunction/Heal

Filtering in ResourceFunction/Scale resource

Attribute name

Filtered search

First Level

Filtered search

N Level

Attribute Selection First Level

Attribute Selection N Level

Id

NA

NA

N/A

NA

href

M

NA

N/A

NA

type

O

NA

M

NA

aspectId

O

NA

M

NA

numberOfSteps

O

NA

M

NA

schedule

O

NA

M

NA

startTime

O

NA

M

NA

additionalParms

O

NA

M

NA

scaleStatus

M

NA

M

NA

 

GET /resourceFunction/Scale

 

Filtered Search: A filtered search can be applied using the following filtering criteria

 

  • href: To obtain all the scale tasks against a particular resource function specified by the

href.

  • status: To obtain the the list of scale tasks with a particular status.
  • other optional attributes as defined in the table above

 

Filtered Data: A filtered response can be requested for the following attributes using the “?fields=” query parameter

-           Any of the attributes in the first level of ResourceFunction/Scale resource definition

 

GET /resourceFunction/Scale /{ID}

Filtered Search: A filtered response can be requested for the following attributes using the “?fields=” query parameter

-           Any of the attributes in thefirst level of ResourceFunction/Scale resource definition

Filtering in ResourceFunction/Migrate resource

Attribute name

Filtered search

First Level

Filtered search

N Level

Attribute Selection First Level

Attribute Selection N Level

Id

NA

NA

NA

NA

href

M

NA

NA

NA

adminStateModification

O

NA

M

NA

sapsToRemove

O

NA

M

NA

sapsToAdd

O

NA

M

NA

priority

O

NA

M

NA

startTime

O

NA

M

NA

completionMode

O

NA

M

NA

location

O

NA

M

NA

migrateStatus

M

NA

M

NA

 

GET /resourceFunction/Migrate

 

Filtered Search: A filtered search can be applied using the following filtering criteria

 

  • href: To obtain all the Migrate tasks against a particular resource function specified by the

href.

  • status: To obtain the the list of Migrate tasks with a particular status.
  • other optional attributes as defined in the table above

 

Filtered Data: A filtered response can be requested for the following attributes using the “?fields=” query parameter

-           Any of the attributes in the first level of ResourceFunction/Migrate resource definition

 

GET /resourceFunction/Migrate /{ID}

Filtered Search: A filtered response can be requested for the following attributes using the “?fields=” query parameter

-           Any of the attributes in thefirst level of ResourceFunction/Migrate resource definition

 

API POST OPERATION CONFORMANCE

POST to /resourceFunction

This Uniform Contract operation is used to create a ResourceFunction resource in the server.

The response to this operation must include a Location header set to /resourceFunction /{ID} where {ID} indicates the identifier assigned by the server to the new Resource Function resource created

POST

M

 

Response Status Code 201 or 202

M

201 when the resource function can be created immediately and 202 when the transaction is long lived and where a Monitor object is returned.

Other Status Codes

NA

 

 

 

The following table indicates attributes that are required to be sent when creating a new Resource Function resource as well as attributes with special considerations. All other attributes defining the resource are not required to be sent as aprt of the BODY of the POST request message:

Attribute name

Mandatory

Default

Rule

id

NA

 

Set by server

href

NA

 

Set by server

Name

N

 

 

description

N

 

 

type

N

 

 

version

N

 

 

role

N

 

 

location

N

 

 

autoModification

N

 

 

priority

N

 

 

state

N

 

 

subState

N

 

 

schedule

N

 

 

sap

Y

 

 

resourceFunctionSpecification

Y/N

 

Mandatory for intent based requests where resource function has to be created based on a specification.

characteristics

Y/N

 

Mandatory if the resource specification requires certain resource characteristics as mandatory.

feature

Y/N

 

Mandatory if the resource specification requires certain resource characteristics as mandatory.

featureGroup

Y/N

 

Mandatory if the resource specification requires certain resource characteristics as mandatory.

supportingResourceFunction

Y/N

 

Mandatory for detail based requests where a composite resource function has to be created from other resource functions.

connectivity

Y/N

 

Mandatory for detail based requests.

relatedParty

N

 

 

 

The response from the server must include a BODY with the contents of the new resource created or to be created, filled with at least the same information elements that were included in the request and are supported by the server. Notice that the value stored by the server may be different than the one set in the request.

If the POST request includes optional parameters (as per the model resource definition) that are not supported by the server, then the server must reject the request (replying with a 4xx error response) indicating the parameter not supported.

All the parameters listed above must be supported by the server when included in the request to create a new resource

The BODY of the response from the server must include attribute “href” set to the same value as the one in the Location header.

In case of 201, the server must include in the BODY of the response, even if they are not included in the request, the following attributes that are mandatory in the definition of a Resource Function as per the resource model defined

  • id
  • href
  • status
  • subStatus

 

The BODY of the response from the server must include attribute “href” (or “reference”) under each one of the entities within the resource function model that can be addressed individually and were included in the response. This applies to any of the following entities

  • resourceFunction created as in the supportingResourceFunction structure.

 

 

POST to /resourceFunction/Heal

This Uniform Contract operation is used to create a resourceFunction/Heal resource in the server.

The response to this operation must include a Location header set to /resourceFunction/heal /{ID} where {ID} indicates the identifier assigned by the server to the new Product Offering resource created

POST

M

 

Response Status Code 201

M

 

Other Status Codes

NA

 

 

 

The following table indicates attributes that are required to be sent when creating a new Heal resource as well as attributes with special considerations. All other attributes defining the resource are not required to be sent as part of the BODY of the POST request message:

Attribute name

Mandatory

Default

Rule

Id

NA

 

Set by server

href

Y

 

 

cause

N

 

 

degreeHealing

Y

 

 

healAction

Y

 

 

healPolicy

N

 

 

startTime

N

 

 

additionalParms

N

 

 

healStatus

NA

 

Set by server

 

The response from the server must include a BODY with the contents of the new resource created, filled with at least the same information elements that were included in the request and are supported by the server. Notice that the value stored by the server may be different than the one set in the request (e.g.: severity may be differently understood by the server after processing than the one perceived by the requestor)

If the POST request includes optional parameters (as per the model resource definition) that are not supported by the server, then the server must reject the request (replying with a 4xx error response) indicating the parameter not supported.

All  parameters in the table must be supported by the server when included in the request to create a new resource

The BODY of the response from the server must include attribute “href” set to the same value as the one in the Location header.

The server must include in the BODY of the response, even if they are not included in the request, the following attributes that are mandatory in the definition of a Heal as per the resource model defined

  • id
  • href
  • healStatus

POST to /resourceFunction/Scale

This Uniform Contract operation is used to create a resourceFunction/Scale resource in the server.

The response to this operation must include a Location header set to /resourceFunction/scale /{ID} where {ID} indicates the identifier assigned by the server to the new Product Offering resource created

POST

M

 

Response Status Code 201

M

 

Other Status Codes

NA

 

 

 

The following table indicates attributes that are required to be sent when creating a new Scale resource as well as attributes with special considerations. All other attributes defining the resource are not required to be sent as part of the BODY of the POST request message:

Attribute name

Mandatory

Default

Rule

Id

NA

 

Set by server

href

Y

 

 

type

N

 

 

aspectId

Y

 

 

numberOfSteps

Y

 

 

schedule

N

 

 

startTime

N

 

 

additionalParms

N

 

 

scaleStatus

NA

 

Set by server

 

The response from the server must include a BODY with the contents of the new resource created, filled with at least the same information elements that were included in the request and are supported by the server. Notice that the value stored by the server may be different than the one set in the request (e.g.: severity may be differently understood by the server after processing than the one perceived by the requestor)

If the POST request includes optional parameters (as per the model resource definition) that are not supported by the server, then the server must reject the request (replying with a 4xx error response) indicating the parameter not supported.

All  parameters in the table must be supported by the server when included in the request to create a new resource

The BODY of the response from the server must include attribute “href” set to the same value as the one in the Location header.

The server must include in the BODY of the response, even if they are not included in the request, the following attributes that are mandatory in the definition of a Scale as per the resource model defined

  • id
  • href
  • scaleStatus

POST to /resourceFunction/Migrate

This Uniform Contract operation is used to create a resourceFunction/migrate resource in the server.

The response to this operation must include a Location header set to /resourceFunction/migrate /{ID} where {ID} indicates the identifier assigned by the server to the new Product Offering resource created

POST

M

 

Response Status Code 201

M

 

Other Status Codes

NA

 

 

 

The following table indicates attributes that are required to be sent when creating a new Migrate resource as well as attributes with special considerations. All other attributes defining the resource are not required to be sent as part of the BODY of the POST request message:

Attribute name

Mandatory

Default

Rule

Id

NA

 

Set by server

href

Y

 

 

adminStateModification

N

 

 

sapsToRemove

N

 

 

sapsToAdd

N

 

 

priority

N

 

 

startTime

N

 

 

completionMode

N

 

 

location

N

 

 

migrateStatus

NA

 

Set by server

 

The response from the server must include a BODY with the contents of the new resource created, filled with at least the same information elements that were included in the request and are supported by the server. Notice that the value stored by the server may be different than the one set in the request (e.g.: severity may be differently understood by the server after processing than the one perceived by the requestor)

If the POST request includes optional parameters (as per the model resource definition) that are not supported by the server, then the server must reject the request (replying with a 4xx error response) indicating the parameter not supported.

All  parameters in the table must be supported by the server when included in the request to create a new resource

The BODY of the response from the server must include attribute “href” set to the same value as the one in the Location header.

The server must include in the BODY of the response, even if they are not included in the request, the following attributes that are mandatory in the definition of a Migrate as per the resource model defined

  • id
  • href
  • migrateStatus

 

 

API PATCH OPERATION CONFORMANCE

This section defines which attributes are patchable.

 

Attribute name

Patchable

Comment

id

N

 

href

N

 

Name

Y

 

description

Y

 

type

Y

 

version

Y

 

role

Y

 

location

N

Change in location is achieved through a Migrate task.

autoModification

Y

 

priority

Y

 

state

N

 

subState

N

 

schedule

Y

 

sap

N

Change in SAP is achieved through a Migrate task

resourceFunctionSpecification

Y

e.g. when a Resource Function needs to be upgraded to the next version of the resource specification.

characteristics

Y

Those characteristics allowed to be patched by Resource Function Specfication.

feature

Y

Those features allowed to be patched by Resource Function Specfication.

featureGroup

Y

Those featureGroups allowed to be patched by Resource Function Specfication.

supportingResourceFunction

Y

Mandatory for detail based requests where a composite resource function has to be created from other resource functions.

connectivity

Y

Mandatory for detail based requests.

relatedParty

Y

 

 

API DELETE OPERATION CONFORMANCE

This section defines what operations can be used to delete a Resource Function resource.

DELETE  /resourceFunction//{ID}

Response from the server will include the http 200 Ok code to confirm that the Resource Function has been deleted.

API CONFORMANCE TEST SCENARIOS

This section describes the test scenarios required for the basic CONNECT certification of Resource Function Configuration and Activation API.

Test Cases must be executed in the order defined for each resource because the result from one of the scenarios will be input for the next one.

Requests must be addressed to the endpoint provided for certification, specifically they must be addressed to the URI defined by the concatenation of the {apiRoot} and the specific resource, where the {apiRoot} is defined as {serverRoot}/resourceFunction , being {serverRoot} defines the certification endpoint

Resource Function resource TEST CASES

Nominal Scenarios

TC_ResFn_N1 – Create new Resource Function with minimum required information using intent based requests

  • Send a POST message to {apiRoot}/ with the following contents in the BODY

{

 

  "sap" : [

    {

      "id" : "SAP-49876" ,

      "href" : "http://serverlocation:port/resourceSpecification/SAP-49876"

    }

  ],

  "resourceSpecification" : {

    "id" : "RS-6789" ,

    "href" : "http://serverlocation:port/resourceSpecification/RS-6789"

  },

  "resourceCharacteristic" : [

    {

      "name" : "bandwidth" ,

      "value" : "100MB"

    }

  }

 

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 201-Created

 

-           Include a location header in the body set to /{apiRoot}/resourceFunction/{IDrfn1} where {IDrfn1} indicates the identifier assigned by the server to the new Resource Function resource

 

-           The response message includes all mandatory parameters (including description, severity and type that were not sent in the original request)

 

-           The body of the response matches the values set in the original request

 

  • Send a GET message to /{apiRoot}/resourceFunction/

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

 

-           The body of the response includes one Resource Function resource with ID set to {IDrfn1}, the same identifier as assigned by the server to the new resource created

 

-           The response message includes all mandatory parameters

 

-           The body of the response for the resource with identifier {IDrfn1} matches the values set in the original request

 

  • Send a GET message to /{apiRoot}/resourceFunction/{IDrfn1}

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

 

-           The response message includes all mandatory parameters

 

-           The body of the response includes a Resource Function resource structure that matches the values in the original request

 

 

TC_ResFn_N2 – Create new Resource Function with set of all parameters supported by server in detail based mode

  • Send a POST message to {apiRoot}/resourceFunction/ with the following contents in the BODY

{

  "name" : "CDN Cluster" ,

  "description" : "CDN capability spread across multiple geographies" ,

  "version" : "1.2" ,

  "role" : "Backup Media Store" ,

  "location" : {

    "href" : "http://serverlocation:port/location/4980" ,

    "id" : "4980"

  },

  "autoModification" : "scaleStorage" ,

  "priority" : "2" ,

  "schedule" : [

    {

      "id" : "SCH-78906" ,

      "href" : "http://serverlocation:port/resourceSpecification/SCH-78906"

    }

  ],

  "sap" : [

    {

      "id" : "SAP-49876" ,

      "href" : "http://serverlocation:port/resourceSpecification/SAP-49876"

    }

  ],

 

  "supportingResourceFunction" : [

    {

      "http://serverlocation:port/resourceFunction/6789" ,

      "http://serverlocation:port/resourceFunction/1234"

    }

 

  ],

  "connectivity" : [

    {

      "source" : "http://serverlocation:port/resourceFunction/6789" ,

      "target" : "http://serverlocation:port/resourceFunction/1234" ,

      "relationship" : "AdjacentTo"

    }

  ],

  "relatedParty" : [

    {

      "id" : "1234" ,

      "href" : "http://serverlocation:port/partyManagement/partyRole/1234" ,

      "role" : "Admin"

    }

  ]

}

 

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 201-Created

 

-           Include a location header in the body set to /{apiRoot}/resourceFunction/{IDrfn2} where {IDrfn2} indicates the identifier assigned by the server to the new Resource Function resource

 

-           The response message includes all mandatory parameters (including the ones that  were not sent in the original request)

 

-           The body of the response matches the values set in the original request

 

  • Send a GET message to /{apiRoot}resourceFunction/

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

 

-           The body of the response includes one Resource Function  resource with ID set to {IDrfn2}, the same identifier as assigned by the server to the new resource created  and another Resource Function with ID set to {IDrfn1}.

 

-           The response message includes all mandatory parameters

 

-           The body of the response for the resource with identifier {IDrfn2} matches the values set in the original request

 

  • Send a GET message to /{apiRoot}/resourceFunction/{IDrfn2}

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

 

-           The response message includes all mandatory parameters

 

-           The body of the response includes a Resource Function resource structure that matches the values in the original request

 

TC_ResFn_N3 – Search for Resource Functions with specific characteristics

  • Send a GET message to /{apiRoot}/resourceFunction

 

  • Wait for a response from the server with the following characteristics

-           Response Code 200-OK

 

-           The body of the response includes at least two ResourceFunction resources referring to {IDrfn1} and {IDrfn2}

 

-           The body of the response for the resource with each identifier matches the values in the corresponding original request

 

  • Send a GET message to /{apiRoot}/ resourceFunction?resourceSpecification.href= "http://serverlocation:port/resourceSpecification/RS-6789"
  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

 

-           The body of the response includes one ResourceFunction resource referring to {IDrfn1} and there is no reference to ResourceFunction resource {IDrfn2}

 

-           The response message includes all mandatory parameters

 

-           The body of the response for the resource with identifier {IDrfn1} matches the values in the original request

 

  • Send a GET message to /{apiRoot}/resourceFunction?version=1.2

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

 

-           The body of the response includes one ResourceFunction resource referring to {IDrfn2} and there is no reference to ResourceFunction resource {IDrfn1}

 

-           The response message includes all mandatory parameters

 

-           The body of the response for the resource with identifier {IDrfn2} matches the values in the original request

 

 

TC_ResFn_N4 – Filtered retrieval of Resource Functions

  • Send a GET message to /{apiRoot}/resourceFunction/{IDrfn1}?fields=state

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

 

-           The body of the response includes one ResourceFunction resource referring to {IDrfn1} and including only attributes id,href and state, matching the values in the original request

 

  • Send a GET message to /{apiRoot}/ resourceFunction /{IDrfn2}?fields=version,state,substate

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

 

-           The body of the response includes one ResourceFunction resource referring to {IDrfn2} and including only attributes id,href,version,state,substate matching the values in the original request

Notice that this test case is using parameters ”version” , ”state” and ”substate”  to filter the data included in the response  but any other parameter could be used

 

TC_ResFn_N5 – Filtered Search and Filtered data response

  • Send a GET message to /{apiRoot}/resourceFunction?version=1.2&fields=state,subState,autoModification

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

 

-           The body of the response includes one ResourceFunctionresource referring to {IDrfn2} and there is no reference to ResourceFunction resource {IDrfn1}

 

-           The body of the response for the resource with each identifier includes only attribute id,href,state,subState and autoModification, matching the values in the corresponding original request

Notice that this test case is using the parameter ”version” to filter the data included in the response  but any other parameter could be used

 

TC_ResFn_N6 – Patch

  • Send a PATCH message to {apiRoot}/ with the following contents in the BODY

{

  "id" : "IDrfn1" ,

  "href" : "http://serverlocation:port/resourceFunction/IDrfn1" ,

  "name" : "CDN Cluster Super" ,

  "description" : "CDN capability spread across multiple geographies super " ,

  "type" : "Content Delivery V2" ,

  "version" : "1.3" ,

  "role" : "Backup Media Store"

}

  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

 

Notice that this test case a few  parameters like ”version” to test the patch but  any other parameter as per the table could be used.

  • Send a GET message to /{apiRoot}/resourceFunction/{IDrfn1}
  • Wait for a response from the server with the following characteristics
    • Response Code 200-OK

 

  • The body of the response for the resource with each identifier matches the values in the corresponding patch request for patched attributes and original request for other attributes.

 

TC_ResFn_N7 – Delete

  • Send a Delete message to /{apiRoot}/resourceFunction/{IDrfn1}

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

  • Send a GET message to /{apiRoot}/resourceFunction/{IDrfn1}
  • Wait for a response from the server with the following characteristics

-           Response Code 404-Not Found

 

Error Scenarios

TC_ResFn_E1 – Unknown Resource Function identifier

  • Send a GET message to /{apiRoot}/resourceFunction/{IDrfn3}, where {IDrfn3} does not match any of the identifiers previously created in the server

 

  • Wait for a response from the server with the following characteristics

 

  • Response Code 404-Not Found

 

TC_ResFn_E2 – Invalid Request – Missing mandatory parameter

  • Send a POST message to {apiRoot}/resourceFunction/ with the following contents in the BODY.
  • {
  •  
  •   "sap" : [
  •     {
  •       "id" : "SAP-49876" ,
  •       "href" : "http://serverlocation:port/resourceSpecification/SAP-49876"
  •     }
  •   ],
  •  
  •   }

 

Notice that this request is missing mandatory parameter ”resourceSpecification” but any other mandatory parameter could be used

 

  • Wait for an error response from the server indicating the mandatory parameter is missing in the request

 

 

TC_ResFn_E3 – Invalid Request – Missing parameter mandatory in context

  • Send a POST message to {apiRoot}/resourceFunction/ with the following contents in the BODY.
  • {
  •  
  •   "sap" : [
  •     {
  •       "id" : "SAP-49876" ,
  •       "href" : "http://serverlocation:port/resourceSpecification/SAP-49876"
  •     }
  •   ],
  •   "resourceSpecification" : {
  •     "id" : "RS-6789" ,
  •     "href" : "http://serverlocation:port/resourceSpecification/RS-6789"
  •   },
  •  
  •   }

 

Notice that this request is missing mandatory parameters “ resourceCharacteristic ” when information element  “ resourceSpecification” is included in the request, but any other parameter that becomes mandatory based on the context could be used

 

  • Wait for an error response from the server indicating the mandatory parameter is missing in the request