noc.inv.models.objectmodel

Module Contents

noc.inv.models.objectmodel.id_lock
class noc.inv.models.objectmodel.ObjectModelConnection

Bases: mongoengine.document.EmbeddedDocument

meta
name
description
type
direction
gender
group
cross
protocols
internal_name
json_data
__str__(self)
__eq__(self, other)
class noc.inv.models.objectmodel.ObjectModel

Bases: mongoengine.document.Document

Equipment vendor

meta
name
description
vendor
connection_rule
cr_context
data
connections
uuid
plugins
tags
category
_id_cache
_name_cache
_model_cache
json_data
__str__(self)
classmethod get_by_id(cls, id)
classmethod get_by_name(cls, name)
get_data(self, interface, key)
on_save(self)
has_connection(self, name)
get_connection_proposals(self, name)

Return possible connections for connection name as (model id, connection name)

get_model_connection(self, name)
classmethod get_model(cls, vendor, part_no)

Get ObjectModel by part part_no, Search order:

  • NOC model name
  • asset.part_no* value (Part numbers)
  • asset.order_part_no* value (FRU numbers)
classmethod _get_model(cls, vendor, part_no)

Get ObjectModel by part part_no, Search order:

  • NOC model name
  • asset.part_no* value (Part numbers)
  • asset.order_part_no* value (FRU numbers)
to_json(self)
get_json_path(self)
clear_unknown_models(self)

Exclude model’s part numbers from unknown models

class noc.inv.models.objectmodel.ModelConnectionsCache

Bases: mongoengine.document.Document

meta
type
gender
model
name
classmethod rebuild(cls)

Rebuild cache

classmethod update_for_model(cls, model)

Update connection cache for object model :param model: ObjectModel instance :return: