Skip to content

Commit

Permalink
[connectedvmware] Search for BIOS IDs with both Big Endian and Middle…
Browse files Browse the repository at this point in the history
… Endian (#7763)

* Search for BIOS IDs with both Little Endian and Big Endian format

* Message nit
  • Loading branch information
nascarsayan committed Jul 2, 2024
1 parent 43addea commit cd974b0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/connectedvmware/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Release History
===============
1.1.1
++++++
* `create-from-machines` : Search for BIOS IDs with both Little Endian and Middle Endian format.

1.1.0
++++++
* Prompt credentials if not provided for Guest Agent.
Expand Down
9 changes: 6 additions & 3 deletions src/connectedvmware/azext_connectedvmware/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,10 @@ def create_from_machines(
substring(u, 11, 2), substring(u, 9, 2), '-',
substring(u, 16, 2), substring(u, 14, 2), '-',
substring(u, 19))
| project machineId=id, name, resourceGroup, vmUuidRev, kind
| extend vmUuid=pack_array(u, vmUuidRev)
| mv-expand vmUuid
| extend vmUuid=tostring(vmUuid)
| project machineId=id, name, resourceGroup, vmUuid, kind
| join kind=inner (
ConnectedVMwareVsphereResources
| where type =~ 'Microsoft.ConnectedVMwareVsphere/VCenters/InventoryItems'
Expand All @@ -852,8 +855,8 @@ def create_from_machines(
| extend biosId = tolower(tostring(p['smbiosUuid']))
| extend managedResourceId=tolower(tostring(p['managedResourceId']))
| project inventoryId=id, biosId, managedResourceId
) on $left.vmUuidRev == $right.biosId
| project-away vmUuidRev
) on $left.vmUuid == $right.biosId
| project-away vmUuid
"""
query = " ".join(query.splitlines())

Expand Down
2 changes: 1 addition & 1 deletion src/connectedvmware/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# TODO: Confirm this is the right version number you want and it matches your
# HISTORY.rst entry.

VERSION = '1.1.0'
VERSION = '1.1.1'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down

0 comments on commit cd974b0

Please sign in to comment.