Detection rule response action identifiers always return an empty list
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 38/100
Piste de recherche
Commencez par le point d’entrée graph_client.security.rules.detection_rules.get() et l’implémentation de ResponseAction get_field_deserializers présentée dans l’issue. Suivez la manière dont identifier est généré et désérialisé, y compris le schéma source ou le générateur, le cas échéant. Le travail est terminé lorsque les detection-rule response actions renvoient l’enum identifier approprié au lieu d’une liste vide.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Describe the bug
When calling a List or Get for detection rules, e.g. await self.graph_client.security.rules.detection_rules.get(), you get a DetectionRuleCollectionResponse.
This response contains a field detection_action.response_actions which is a list of type ResponseAction.
For a specific response action, e.g. IsolateDeviceResponseAction, the identifier field is always [] instead of the Enum it should be, e.g. identifier=<DeviceIdEntityIdentifier.DeviceId: 'deviceId'>.
I believe this is due to this code in the get_field_deserializers:
fields: Dict[str, Callable[[Any], None]] = {
"identifier": lambda n : setattr(self, 'identifier', n.get_collection_of_enum_values(DeviceIdEntityIdentifier)),
"isolationType": lambda n : setattr(self, 'isolation_type', n.get_enum_value(IsolationType)),
}
I suspect the get_collection_of_enum_values should be replaced with get_enum_value. Since I presume that this code is all generated, the root cause of this problem is probably somewhere else.
Expected behavior
Return the correct enum for all ResponseAction identifiers.
How to reproduce
Call await self.graph_client.security.rules.detection_rules.get() on a detection rule with a response action.
SDK Version
1.16.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
No response
Configuration
- OS: MacOS 14.5
- Architecture: Apple ARM
Other information
No response
- Langage dominant
- Python
- Étoiles
- 44
- Forks
- 16
- Merge moyen
- 20 h 39 min
- PR mergées (30 j)
- 3
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoftgraph/msgraph-beta-sdk-python
-
enhancement
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
-
status:waiting-for-triage type:bug
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
-
type:bug type:investigation
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
microsoftgraph/msgraph-beta-sdk-python#1033 · 1 réaction ·
-
status:waiting-for-triage type:bug
Difficulté 3/5 1-2 jours Accessibilité débutants 42/100
microsoftgraph/msgraph-beta-sdk-python#1006 · 1 commentaire ·
-
status:waiting-for-triage type:bug
Difficulté 2/5 1-3 heures Accessibilité débutants 48/100
microsoftgraph/msgraph-beta-sdk-python#987 · 2 commentaires ·
Toutes les issues de microsoftgraph/msgraph-beta-sdk-python
Issues similaires
-
documentation help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
simonw/sqlite-utils#872 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100