def test_min_slots_attr():
    rt = ReservationTemplate()
    min_slots = generate_random_int(lower_bound=1, upper_bound=1024)
    rt.min_slots = min_slots
    assert (rt.min_slots == min_slots)
    print('\nReservation template with min_slots: %s' % (min_slots))
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
###########################################################################
# ___INFO__MARK_END__

from drmaa2 import ReservationTemplate

if __name__ == '__main__':
    import datetime

    print('Impl. spec. keys: %s' %
          ReservationTemplate.get_implementation_specific_keys())
    rt = ReservationTemplate({'reservation_name': 'res-01'})
    print('Initial reservation template: %s' % rt)
    rt.users_acl = ['user1', 'user2', 'user3']
    rt.min_slots = 2
    rt.machine_os = 'LINUX'
    rt.start_time = datetime.datetime.now()
    print('Current reservation template: %s' % rt)
    rt.set_impl_spec_key_value('uge_rt_native', 'xxx')
    print('Impl. spec. key uge_rt_native is set to: %s' %
          rt.get_impl_spec_key_value('uge_rt_native'))
    print('Impl. spec dictionary: %s' % rt.implementation_specific)
    print('Final reservation template: %s' % rt)