azure-sdk-for-python
azure-sdk-for-python copied to clipboard
FlowLog class attribute values not populated
- Package Name:
- azure-mgmt-network
- Package Version:
- 20.0.0
- Operating System:
- Windows 10 21H2
- Python Version: Python 3.9.9
Describe the bug We are using Python API to create NSG FLowLog 'NetworkWatchersOperations::begin_set_flow_log_configuration'. This does not provided info about FlowLog. How can we check the FlowLog Provisioning state using Python API? I have attached a pic while debugging which displays FlowLog info, but none of the attributes value are populated, even if the web portal displays FLowLog to be enabled.
To Reproduce Here is the pseudo-code used to enable FlowLogs:
flowLogInfo = azure.mgmt.network.models::FlowLogInformation (target_resource_id=nsg.id, storage_id=int_storage_id, enabled=True,retention_policy=netw_models.RetentionPolicyParameters(days=90,enabled=True), format=netw_models.FlowLogFormatParameters(type='JSON')) … NetworkManagementClient::network_watchers.begin_set_flow_log_configuration( resource_group_name='NetworkWatcherRG', continuation_token=None,network_watcher_name=watcher, polling=False,polling_interval=0, parameters=fli) …
Expected behavior We expect FlowLog attributes to be populated and reflect its state correctly.
Screenshots
Label prediction was below confidence level 0.6
for Model:ServiceLabels
: 'Storage:0.11249544,Event Hubs:0.08363691,Network - Virtual Network:0.05020503'
Thank you for your feedback. This has been routed to the support team for assistance.
Hi @VaKale-ptc In python SDK, if operation name has begin_
prefix, it is long running operation. You'd better use it like:
response = network_watchers.begin_set_flow_log_configuration(...)
final_response = response.result()
in final_response
, you shall see some status returned by server(provisioning_state, etc)
Hi @VaKale-ptc. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve
” to remove the “issue-addressed” label and continue the conversation.
Hi @VaKale-ptc, since you haven’t asked that we “/unresolve
” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve
” to reopen the issue.