onapsdk.nbi package¶
Submodules¶
onapsdk.nbi.nbi module¶
NBI module.
-
class
onapsdk.nbi.nbi.Nbi¶ Bases:
onapsdk.onap_service.OnapService,abc.ABCNBI base class.
-
api_version= '/nbi/api/v4'¶
-
base_url= 'https://nbi.api.simpledemo.onap.org:30274'¶
-
-
class
onapsdk.nbi.nbi.Service(name, service_id, service_specification_name, service_specification_id, customer_id, customer_role, href)¶ Bases:
onapsdk.nbi.nbi.NbiNBI service.
-
classmethod
get_all(customer_id='generic')¶ Get all services for selected customer.
-
property
service_specification¶ Service specification.
- Returns
Service specification object
- Return type
-
classmethod
-
class
onapsdk.nbi.nbi.ServiceOrder(unique_id, href, priority, description, category, external_id, service_instance_name, state=None, customer=None, customer_id=None, service_specification=None, service_specification_id=None)¶ Bases:
onapsdk.nbi.nbi.Nbi,onapsdk.utils.mixins.WaitForFinishMixinService order class.
-
class
StatusEnum(value)¶ Bases:
enum.EnumStatus enum.
- Store possible statuses for service order:
completed,
failed,
inProgress.
- If instantiation has status which is not covered by these values
unknown value is used.
-
ACKNOWLEDGED= 'acknowledged'¶
-
COMPLETED= 'completed'¶
-
FAILED= 'failed'¶
-
IN_PROGRESS= 'inProgress'¶
-
REJECTED= 'rejected'¶
-
UNKNOWN= 'unknown'¶
-
WAIT_FOR_SLEEP_TIME= 10¶
-
property
completed¶ Store an information if service order is completed or not.
Service orded is completed if it’s status is COMPLETED.
- Returns
True if service orded is completed, False otherwise.
- Return type
-
classmethod
create(customer, service_specification, name=None, external_id=None)¶ Create service order.
- Returns
ServiceOrder object
- Return type
-
property
customer¶ Get customer object used in service order.
- Returns
Customer object
- Return type
-
property
failed¶ Store an information if service order is failed or not.
Service orded is completed if it’s status is FAILED.
- Returns
True if service orded is failed, False otherwise.
- Return type
-
property
finished¶ Store an information if service order is finished or not.
Service orded is finished if it’s status is not ACKNOWLEDGED or IN_PROGRESS.
- Returns
True if service orded is finished, False otherwise.
- Return type
-
classmethod
get_all()¶ Get all service orders.
- Returns
ServiceOrder object
- Return type
Iterator[ServiceOrder]
-
property
rejected¶ Store an information if service order is rejected or not.
Service orded is completed if it’s status is REJECTED.
- Returns
True if service orded is rejected, False otherwise.
- Return type
-
property
service_specification¶ Service order service specification used in order item.
- Returns
Service specification
- Return type
-
property
status¶ Service order instantiation status.
It’s populated by call Service order endpoint.
- Returns
Service order status.
- Return type
-
class
-
class
onapsdk.nbi.nbi.ServiceSpecification(unique_id, name, invariant_uuid, category, distribution_status, version, lifecycle_status)¶ Bases:
onapsdk.nbi.nbi.NbiNBI service specification class.
-
classmethod
get_all()¶ Get all service specifications.
- Yields
ServiceSpecification – Service specification object
- Return type
-
classmethod
Module contents¶
NBI package.