list_all() for network_watchers only lists network watchers with provisioning state 'Succeeded'
The count should always be 27 since there are 27 network watchers if I disable one of them then count becomes 26 which shouldn't happen
network_client = NetworkManagementClient(credentials, str(subscription.subscription_id))
network_watcher_list = network_client.network_watchers.list_all()
count=0
for network_watcher in network_watcher_list:
count=count+1
print count
Following is the link to Network_watchers class https://github.com/Azure/azure-sdk-for-python/blob/master/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/network_watchers_operations.py/#L21
@tjprescott ?
@prakhark Currently how disable network watcher works is actually delete that network watcher. So when we list all the network watchers, the deleted ones cannot be found anymore.
There is no bug in the SDK. It's expected behavior. If customer disable network watcher in portal, that means that resource is deleted from NRP KVS. Thus, no network watcher resource will be returned to customer when he try to query it.