1) Yang A (xyx-tempa) 2) Yang B (xyz-tempb) imports yang A and defines a new enum and an augmented leaf to Yang A 3) Deviation Yang (xyz-temp-deviation.yang) deviates/replaces a type of the leaf defined in YangA with a type defined in YangB.
There is not much to add to the error message itself, the deviation module indeed introduces circular module dependencies. Your options include:
If you have control over the date model, fix the problem, e.g. by moving the typedef to another module that does not depend on tempa.
Modify and fix the downloaded YANG modules before running the building the NED. The modules should be somewhere in your NSO instance’s state directory.
Just deselect the deviation module. If it’s only deviation consists of narrowing the data type from string to enumeration, you may keep string - NSO would then allow you to use other values than strings base-0 and base-1, and if you do so, subsequent commit would probably fail. But other than that, everything else should work.
Combine 2. and 3. - deselect the deviation module and modify the deviated module so that the result corresponds to what the device expects.
I am probably missing your point. Circular module dependencies are not allowed, and for a reason. Your deviation module makes xyz-tempa dependent on xyz-tempb, since a leaf defined in the former is now typed by a type from the latter; and xyz-tempb depends on xyz-tempa by its definition. Operationally, it does not matter if a circular dependency was there from the day one or was introduced via a deviation, even though the latter may not be explicitly forbidden by the RFC. The fact that the tools you mention ignore or are somehow able to cope with circular dependencies is hardly really relevant.