Copy reference object example.

This commit is just implemented to validate the medhod.
But this is not conveniant, because reference models must not be
changed.
So next step is to make them private attributes.
This commit is contained in:
uggla 2015-07-10 12:11:22 +02:00
parent ad8908753e
commit 8fb8a77dca
1 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,7 @@
# coding=utf-8
import types
import pprint
import config
@ -57,8 +58,14 @@ class Fakeprovider(Driver):
# Now create a manager model from reference model.
ci.ci_type = "Manager"
ci.data = config.alexandria.model.Manager
ci.data = config.alexandria.model.Manager.copy()
if ci.data is config.alexandria.model.Manager:
print "identical"
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(ci.data)
class DriverCollection(list):
pass