File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
python/understack-workflows/understack_workflows/oslo_event Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 3
3
4
4
from openstack .connection import Connection
5
5
from pydantic import BaseModel
6
+ from pydantic import computed_field
6
7
from pynautobot .core .api import Api as Nautobot
7
8
8
9
from understack_workflows .helpers import save_output
@@ -37,13 +38,19 @@ def from_event_dict(cls, data: dict) -> Self:
37
38
node_uuid = payload_data ["uuid" ],
38
39
)
39
40
41
+ @computed_field
42
+ @property
43
+ def lessee_undashed (self ) -> str :
44
+ """Returns lessee without dashes."""
45
+ return self .lessee .hex
46
+
40
47
41
48
def handle_provision_end (conn : Connection , _ : Nautobot , event_data : dict ) -> int :
42
49
"""Operates on an Ironic Node provisioning END event."""
43
50
# Check if the project is configured with tags.
44
51
event = IronicProvisionSetEvent .from_event_dict (event_data )
45
52
logger .info ("Checking if project %s is tagged with UNDERSTACK_SVM" , event .lessee )
46
- if not is_project_svm_enabled (conn , event .lessee ):
53
+ if not is_project_svm_enabled (conn , event .lessee_undashed ):
47
54
return 0
48
55
49
56
# Check if the server instance has an appropriate property.
You can’t perform that action at this time.
0 commit comments