~asomya/+junk/quantum-dev

« back to all changes in this revision

Viewing changes to quantum/api/views/ports.py

  • Committer: Salvatore Orlando
  • Date: 2011-07-22 07:01:43 UTC
  • mfrom: (20.1.19 quantum-unit-tests)
  • Revision ID: salvatore.orlando@eu.citrix.com-20110722070143-w1dxq5zulo0wfcs3
Merging branch lp:~netstack/quantum/quantum-unit-tests

Provides functionality as specified by blueprint https://blueprints.launchpad.net/quantum/+spec/api-spec-unit-tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
    def build(self, port_data, is_detail=False):
33
33
        """Generic method used to generate a port entity."""
34
 
        print "PORT-DATA:%s" % port_data
35
34
        if is_detail:
36
35
            port = self._build_detail(port_data)
37
36
        else:
45
44
    def _build_detail(self, port_data):
46
45
        """Return a simple model of a server."""
47
46
        return dict(port=dict(id=port_data['port-id'],
48
 
          attachment=port_data['attachment'],
49
47
          state=port_data['port-state']))