Ejemplo n.º 1
0
 def setUp(self):
     super(VolumeTypeAccessTest, self).setUp()
     self.type_controller_v2 = types_api_v2.VolumeTypesController()
     self.type_access_controller = type_access.VolumeTypeAccessController()
     self.type_action_controller = type_access.VolumeTypeActionController()
     self.req = FakeRequest()
     self.context = self.req.environ['cinder.context']
     self.stubs.Set(db, 'volume_type_get', fake_volume_type_get)
     self.stubs.Set(db, 'volume_type_get_all', fake_volume_type_get_all)
Ejemplo n.º 2
0
 def setUp(self,
           enforce_scope=False,
           enforce_new_defaults=False,
           *args,
           **kwargs):
     super().setUp(enforce_scope, enforce_new_defaults, *args, **kwargs)
     self.controller = vta.VolumeTypeActionController()
     self.rule_name = vta_policies.TYPE_ACCESS_POLICY
     self.api_version = mv.BASE_VERSION
     self.api_path = f'/v3/{self.project_id}/types'