Child pages
  • Записки новичка: полезные мелочи

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Справимся так:

Code Block
./noc shecllshell
from noc.sa.models import *
default = ManagedObjectProfile.objects.get(name='default')
full_discovery = ManagedObjectProfile.objects.get(name='full-discovery')
mo = ManagedObject.objects.filter(object_profile=full_discovery)
for m in mo:
  m.object_profile = default
  m.save()


quit()

 

Меняем профиль  'full-discovery' на 'default'

...