-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Richard Tief
committed
Aug 30, 2021
1 parent
a5f7fa9
commit 7333f70
Showing
7 changed files
with
116 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
from collectors.AlertCollector import AlertCollector | ||
|
||
|
||
class NSXTMgmtNodeAlertCollector(AlertCollector): | ||
class NSXTTransportNodeAlertCollector(AlertCollector): | ||
|
||
def __init__(self): | ||
super().__init__() | ||
self.vrops_entity_name = 'nsxt_mgmt_node' | ||
self.label_names = ['nsxt_mgmt_cluster', 'nsxt_adapter', 'nsxt_mgmt_node'] | ||
self.resourcekind = ["ManagementNode"] | ||
self.vrops_entity_name = 'nsxt_transport_node' | ||
self.label_names = ['nsxt_mgmt_cluster', 'nsxt_adapter', 'transport_zone_name', 'nsxt_transport_node'] | ||
self.resourcekind = ["TransportNode"] | ||
|
||
def get_resource_uuids(self): | ||
return self.get_nsxt_mgmt_nodes_by_target() | ||
return self.get_nsxt_transport_nodes_by_target() | ||
|
||
def get_labels(self, resource_id, project_ids): | ||
return [self.nsxt_mgmt_nodes[resource_id]['mgmt_cluster_name'], | ||
self.nsxt_mgmt_nodes[resource_id]['nsxt_adapter_name'], | ||
self.nsxt_mgmt_nodes[resource_id]['name']] if resource_id in self.nsxt_mgmt_nodes else [] | ||
return [self.nsxt_transport_nodes[resource_id]['mgmt_cluster_name'], | ||
self.nsxt_transport_nodes[resource_id]['nsxt_adapter_name'], | ||
self.nsxt_transport_nodes[resource_id]['transport_zone_name'], | ||
self.nsxt_transport_nodes[resource_id]['name']] if resource_id in self.nsxt_transport_nodes else [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from collectors.PropertiesCollector import PropertiesCollector | ||
|
||
|
||
class NSXTTransportNodePropertiesCollector(PropertiesCollector): | ||
|
||
def __init__(self): | ||
super().__init__() | ||
self.vrops_entity_name = 'nsxt_transport_node' | ||
self.label_names = ['nsxt_mgmt_cluster', 'nsxt_adapter', 'transport_zone_name', 'nsxt_transport_node'] | ||
|
||
def get_resource_uuids(self): | ||
return self.get_nsxt_transport_nodes_by_target() | ||
|
||
def get_labels(self, resource_id, project_ids): | ||
return [self.nsxt_transport_nodes[resource_id]['mgmt_cluster_name'], | ||
self.nsxt_transport_nodes[resource_id]['nsxt_adapter_name'], | ||
self.nsxt_transport_nodes[resource_id]['transport_zone_name'], | ||
self.nsxt_transport_nodes[resource_id]['name']] if resource_id in self.nsxt_transport_nodes else [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters