Matteo Scandolo | d7d7047 | 2016-04-29 09:56:48 -0700 | [diff] [blame] | 1 | import dredd_hooks as hooks |
| 2 | import sys |
| 3 | |
| 4 | # HELPERS |
| 5 | # NOTE move in separated module |
| 6 | import os |
| 7 | import sys |
| 8 | sys.path.append("/opt/xos") |
| 9 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xos.settings") |
| 10 | import django |
| 11 | from core.models import * |
| 12 | from services.cord.models import * |
| 13 | from services.vtr.models import * |
| 14 | import urllib2 |
| 15 | import json |
| 16 | django.setup() |
| 17 | |
| 18 | def createFlavor(): |
| 19 | fl = Flavor(id=1) |
| 20 | fl.name = 'm1.large' |
| 21 | fl.save() |
| 22 | print(fl, fl.id) |
| 23 | |
| 24 | createFlavor() |