Revision a6e6fe48 snf-cyclades-app/synnefo/logic/management/commands/server-create.py

b/snf-cyclades-app/synnefo/logic/management/commands/server-create.py
1
# Copyright 2012 GRNET S.A. All rights reserved.
1
# Copyright 2012-2014 GRNET S.A. All rights reserved.
2 2
#
3 3
# Redistribution and use in source and binary forms, with or
4 4
# without modification, are permitted provided that the following
......
108 108
        if not image_id:
109 109
            raise CommandError("image-id is mandatory")
110 110

  
111
        flavor = common.get_flavor(flavor_id)
111
        flavor = common.get_resource("flavor", flavor_id)
112 112
        image = common.get_image(image_id, user_id)
113 113
        if backend_id:
114
            backend = common.get_backend(backend_id)
114
            backend = common.get_resource("backend", backend_id)
115 115
        else:
116 116
            backend = None
117 117

  
......
147 147
                    val = {"port": port_id}
148 148
                elif con_kind == "floatingip":
149 149
                    fip_id = opt.split(":")[1]
150
                    fip = common.get_floating_ip_by_id(fip_id, for_update=True)
150
                    fip = common.get_resource("floating-ip", fip_id,
151
                                              for_update=True)
151 152
                    val = {"uuid": fip.network_id, "fixed_ip": fip.address}
152 153
                else:
153 154
                    raise CommandError("Unknown argument for option --port")

Also available in: Unified diff