diff --git a/include/Image.h b/include/Image.h index 8093939fea..4877e06cf9 100644 --- a/include/Image.h +++ b/include/Image.h @@ -191,18 +191,6 @@ public: return (persistent_img == 1); }; - bool is_managed() const - { - bool one_managed; - - if (get_template_attribute("OPENNEBULA_MANAGED", one_managed) == false) - { - one_managed = true; - } - - return one_managed; - } - /** * Check the PERSISTENT attribute in an image Template, if not set the * DEFAULT_IMAGE_PERSISTENT and DEFAULT_IMAGE_PERSISTENT_NEW are check in diff --git a/src/rm/RequestManagerImage.cc b/src/rm/RequestManagerImage.cc index 7f9a1dc33b..56c75a83b1 100644 --- a/src/rm/RequestManagerImage.cc +++ b/src/rm/RequestManagerImage.cc @@ -118,15 +118,6 @@ Request::ErrorCode ImagePersistent::request_execute( ds_id = image->get_ds_id(); - if ( !image->is_managed() ) - { - att.resp_msg = "Cannot change persistent state for non-managed images"; - - image->unlock(); - - return ACTION; - } - image->unlock(); ds = dspool->get_ro(ds_id);