Example #1
0
 def test_check_allow_configdrive_as_dict(self, mock_request):
     mock_request.version.minor = 56
     utils.check_allow_configdrive(states.ACTIVE, {'meta_data': {}})
     utils.check_allow_configdrive(states.ACTIVE, {'meta_data': {},
                                                   'network_data': {},
                                                   'user_data': {}})
     utils.check_allow_configdrive(states.ACTIVE, {'user_data': 'foo'})
     utils.check_allow_configdrive(states.ACTIVE, {'user_data': ['foo']})
Example #2
0
 def test_check_allow_configdrive_as_dict(self, mock_request):
     mock_request.version.minor = 56
     utils.check_allow_configdrive(states.ACTIVE, {'meta_data': {}})
     utils.check_allow_configdrive(states.ACTIVE, {
         'meta_data': {},
         'network_data': {},
         'user_data': {}
     })
     utils.check_allow_configdrive(states.ACTIVE, {'user_data': 'foo'})
     utils.check_allow_configdrive(states.ACTIVE, {'user_data': ['foo']})
Example #3
0
 def test_check_allow_configdrive(self, mock_request):
     mock_request.version.minor = 35
     utils.check_allow_configdrive(states.ACTIVE)
     utils.check_allow_configdrive(states.REBUILD)
     mock_request.version.minor = 34
     utils.check_allow_configdrive(states.ACTIVE)
Example #4
0
 def test_check_allow_configdrive(self, mock_request):
     mock_request.version.minor = 35
     utils.check_allow_configdrive(states.ACTIVE, "abcd")
     utils.check_allow_configdrive(states.REBUILD, "abcd")
     mock_request.version.minor = 34
     utils.check_allow_configdrive(states.ACTIVE, "abcd")