Fix attributes processing in ActionMetaclass
Fix attributes processing in ActionMetaclass

ActionMetaclass.__new__() creates a class object twice. At first,
it uses DeclarativeFieldsMetaclass.__new__() only to get a side effect
of gathering form fields to base_fields, and then it uses type.__new__()
to create the resulting class object. Dropping the first created class
object results in ignoring all that DeclarativeFieldsMetaclass.__new__()
does with it (currently, it adds a 'media' attribute).

This change uses the class object returned by
DeclarativeFieldsMetaclass.__new__() adding Meta options to it,
thereby fixing the issue.

Change-Id: Ia4ee0e7187846ea13c04505cbbe7b999c2044871

NCI-Cloud/horizon,henaras/horizon,yanheven/console,spring-week-topos/horizon-week,wolverineav/horizon,henaras/horizon,rickerc/horizon_audit,yjxtogo/horizon,redhat-cip/horizon,gerrive/horizon,coreycb/horizon,endorphinl/horizon-fork,django-leonardo/horizon,RudoCris/horizon,citrix-openstack-build/horizon,dan1/horizon-proto,Dark-Hacker/horizon,openstack-ja/horizon,newrocknj/horizon,henaras/horizon,dan1/horizon-proto,j4/horizon,anthonydillon/horizon,BiznetGIO/horizon,django-leonardo/horizon,django-leonardo/horizon,agileblaze/OpenStackTwoFactorAuthentication,NeCTAR-RC/horizon,izadorozhna/dashboard_integration_tests,opencloudconsortium/tukey-portal,dan1/horizon-x509,kfox1111/horizon,bigswitch/horizon,RudoCris/horizon,VaneCloud/horizon,eayunstack/horizon,rickerc/horizon_audit,gerrive/horizon,yeming233/horizon,dan1/horizon-proto,saydulk/horizon,tqtran7/horizon,tsufiev/horizon,redhat-openstack/horizon,damien-dg/horizon,takeshineshiro/horizon,occ-data/tukey-portal,coreycb/horizon,Dark-Hacker/horizon,mandeepdhami/horizon,Dark-Hacker/horizon,NCI-Cloud/horizon,blueboxgroup/horizon,Tesora/tesora-horizon,noironetworks/horizon,openstack/horizon,citrix-openstack-build/horizon,orbitfp7/horizon,Frostman/eho-horizon,izadorozhna/dashboard_integration_tests,xinwu/horizon,tqtran7/horizon,JioCloud/horizon,blueboxgroup/horizon,davidcusatis/horizon,bigswitch/horizon,wolverineav/horizon,mdavid/horizon,gerrive/horizon,RudoCris/horizon,wangxiangyu/horizon,takeshineshiro/horizon,vladryk/horizon,j4/horizon,froyobin/horizon,yanheven/console,FNST-OpenStack/horizon,kfox1111/horizon,CiscoSystems/horizon,VaneCloud/horizon,LabAdvComp/tukey_portal,luhanhan/horizon,CiscoSystems/avos,icloudrnd/automation_tools,pranavtendolkr/horizon,gerrive/horizon,dan1/horizon-x509,flochaz/horizon,NeCTAR-RC/horizon,CiscoSystems/avos,rdo-management/tuskar-ui,watonyweng/horizon,endorphinl/horizon,watonyweng/horizon,agileblaze/OpenStackTwoFactorAuthentication,gochist/horizon,BiznetGIO/horizon,doug-fish/horizon,newrocknj/horizon,noironetworks/horizon,maestro-hybrid-cloud/horizon,Mirantis/mos-horizon,ChameleonCloud/horizon,kaiweifan/horizon,netscaler/horizon,tsufiev/horizon,spring-week-topos/horizon-week,redhat-cip/horizon,rdo-management/tuskar-ui,yeming233/horizon,takeshineshiro/horizon,CiscoSystems/avos,watonyweng/horizon,agileblaze/OpenStackTwoFactorAuthentication,j4/horizon,kaiweifan/horizon,mrunge/openstack_horizon,tanglei528/horizon,tuskar/tuskar-ui,nvoron23/avos,dan1/horizon-proto,liyitest/rr,spring-week-topos/horizon-week,NeCTAR-RC/horizon,blueboxgroup/horizon,Frostman/eho-horizon,idjaw/horizon,ikargis/horizon_fod,bigswitch/horizon,Metaswitch/horizon,ging/horizon,pranavtendolkr/horizon,tuskar/tuskar-ui,philoniare/horizon,idjaw/horizon,LabAdvComp/tukey_portal,sandvine/horizon,yjxtogo/horizon,ging/horizon,doug-fish/horizon,sandvine/horizon,mrunge/horizon_lib,mrunge/horizon,karthik-suresh/horizon,endorphinl/horizon,mrunge/horizon_lib,Metaswitch/horizon,Mirantis/mos-horizon,redhat-cip/horizon,mdavid/horizon,CiscoSystems/horizon,Tesora/tesora-horizon,kfox1111/horizon,karthik-suresh/horizon,wangxiangyu/horizon,zouyapeng/horizon,tanglei528/horizon,LabAdvComp/tukey_portal,ChameleonCloud/horizon,Hodorable/0602,openstack-ja/horizon,endorphinl/horizon-fork,davidcusatis/horizon,doug-fish/horizon,tsufiev/horizon,newrocknj/horizon,NCI-Cloud/horizon,bac/horizon,CiscoSystems/avos,eayunstack/horizon,henaras/horizon,liyitest/rr,ging/horizon,saydulk/horizon,NeCTAR-RC/horizon,mrunge/horizon_lib,flochaz/horizon,dan1/horizon-x509,wangxiangyu/horizon,coreycb/horizon,mandeepdhami/horizon,ChameleonCloud/horizon,xinwu/horizon,orbitfp7/horizon,sandvine/horizon,Daniex/horizon,wolverineav/horizon,bac/horizon,kfox1111/horizon,tellesnobrega/horizon,icloudrnd/automation_tools,vladryk/horizon,maestro-hybrid-cloud/horizon,mdavid/horizon,VaneCloud/horizon,Tesora/tesora-horizon,rdo-management/tuskar-ui,promptworks/horizon,tellesnobrega/horizon,mrunge/horizon,yjxtogo/horizon,NCI-Cloud/horizon,dan1/horizon-x509,zouyapeng/horizon,Solinea/horizon,Daniex/horizon,promptworks/horizon,mrunge/openstack_horizon,Mirantis/mos-horizon,liyitest/rr,opencloudconsortium/tukey-portal,maestro-hybrid-cloud/horizon,mrunge/horizon,ging/horizon,Solinea/horizon,promptworks/horizon,CiscoSystems/horizon,openstack-ja/horizon,vladryk/horizon,Hodorable/0602,davidcusatis/horizon,JioCloud/horizon,liyitest/rr,davidcusatis/horizon,xme1226/horizon,saydulk/horizon,Frostman/eho-horizon,bac/horizon,watonyweng/horizon,occ-data/tukey-portal,r-icarus/openstack_microserver,xinwu/horizon,agileblaze/OpenStackTwoFactorAuthentication,BiznetGIO/horizon,FNST-OpenStack/horizon,r-icarus/openstack_microserver,RudoCris/horizon,noironetworks/horizon,zouyapeng/horizon,endorphinl/horizon,citrix-openstack-build/horizon,froyobin/horizon,tqtran7/horizon,icloudrnd/automation_tools,bac/horizon,yeming233/horizon,philoniare/horizon,tellesnobrega/horizon,xme1226/horizon,endorphinl/horizon-fork,Mirantis/mos-horizon,Solinea/horizon,aaronorosen/horizon-congress,idjaw/horizon,luhanhan/horizon,anthonydillon/horizon,anthonydillon/horizon,CiscoSystems/horizon,icloudrnd/automation_tools,philoniare/horizon,saydulk/horizon,Hodorable/0602,newrocknj/horizon,bigswitch/horizon,ikargis/horizon_fod,damien-dg/horizon,j4/horizon,yjxtogo/horizon,BiznetGIO/horizon,VaneCloud/horizon,LabAdvComp/tukey_portal,doug-fish/horizon,openstack/horizon,orbitfp7/horizon,endorphinl/horizon,occ-data/tukey-portal,vladryk/horizon,tsufiev/horizon,aaronorosen/horizon-congress,damien-dg/horizon,flochaz/horizon,openstack/horizon,opencloudconsortium/tukey-portal,netscaler/horizon,redhat-openstack/horizon,FNST-OpenStack/horizon,gochist/horizon,coreycb/horizon,tuskar/tuskar-ui,yeming233/horizon,mandeepdhami/horizon,xinwu/horizon,redhat-openstack/horizon,openstack/horizon,anthonydillon/horizon,endorphinl/horizon-fork,pranavtendolkr/horizon,blueboxgroup/horizon,promptworks/horizon,zouyapeng/horizon,redhat-cip/horizon,nvoron23/avos,JioCloud/horizon,mrunge/openstack_horizon,philoniare/horizon,rickerc/horizon_audit,mdavid/horizon,orbitfp7/horizon,r-icarus/openstack_microserver,eayunstack/horizon,Metaswitch/horizon,Daniex/horizon,mandeepdhami/horizon,tqtran7/horizon,yanheven/console,Daniex/horizon,ChameleonCloud/horizon,Metaswitch/horizon,wolverineav/horizon,idjaw/horizon,tellesnobrega/horizon,xme1226/horizon,rdo-management/tuskar-ui,luhanhan/horizon,karthik-suresh/horizon,Solinea/horizon,maestro-hybrid-cloud/horizon,sandvine/horizon,pranavtendolkr/horizon,FNST-OpenStack/horizon,froyobin/horizon,takeshineshiro/horizon,kaiweifan/horizon,tanglei528/horizon,noironetworks/horizon,gochist/horizon,Tesora/tesora-horizon,django-leonardo/horizon,netscaler/horizon,ikargis/horizon_fod,luhanhan/horizon,flochaz/horizon,damien-dg/horizon,nvoron23/avos,Hodorable/0602,nvoron23/avos,aaronorosen/horizon-congress,redhat-openstack/horizon,Dark-Hacker/horizon,wangxiangyu/horizon,karthik-suresh/horizon