# Qos attribute in form.yml

**URL:** <https://discourse.openondemand.org/t/qos-attribute-in-form-yml/2295>\
**Category:** Get Help\
**Tags:** question\
**Created:** [September 27, 2022, 7:36pm UTC](https://discourse.openondemand.org/t/qos-attribute-in-form-yml/2295 "2022-09-27T19:36:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RonRahaman](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/ronrahaman/32/1031_2.png) [@RonRahaman](https://discourse.openondemand.org/u/RonRahaman)\
**Post date:** [September 27, 2022, 7:36pm UTC](https://discourse.openondemand.org/t/qos-attribute-in-form-yml/2295/1 "2022-09-27T19:36:02Z")

</div>

We’re setting up OOD on Slurm, and I had a question about adding a qos attribute to `form.yml`.

I noticed that `script.yml` allows the `qos` field ([in 1.8 release notes](https://osc.github.io/ood-documentation/latest/release-notes/v1.8-release-notes.html?highlight=qos#torque-and-slurm-schedulers-now-support-qos-fields)). Does that imply that I need to define my own `qos` attribute in `form.yml` and explicitly set the `qos` option in `script.yml.erb`? Or is there a predefined qos form attribute that gets automagically passed to the script (similar to `bc_walltime` and `bc_account`) ?

---

<div class="post-metadata">

**Author:** ![travert](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/travert/32/3074_2.png) [@travert](https://discourse.openondemand.org/u/travert)\
**Post date:** [September 27, 2022, 8:17pm UTC](https://discourse.openondemand.org/t/qos-attribute-in-form-yml/2295/2 "2022-09-27T20:17:15Z")

</div>

There is no predefined attirbute for `qos` that I am array of. The way to understand what the example is doing is that it is appending that `qos` to the script/comand being submitted with a value of `best` which I would assume is a sane argument for that flag.

You could define more options in the `form.yml.erb` as you said to offer up particular choices which the user could elect for to be passed to that `script` stanza. The example you linked automatically passes that `best` with no option in the `form.yml` for the user to select.

Hopefully that made sense, but if you need more help please let me know.

If you’d like to see better how that `script` and its defined `attributes` are used, here’s where all this is used in `ood_core` at submission for `slurm`:  
[https://www.rubydoc.info/gems/ood\_core/OodCore%2FJob%2FAdapters%2FSlurm:submit](https://www.rubydoc.info/gems/ood_core/OodCore%2FJob%2FAdapters%2FSlurm:submit)

---

<div class="post-metadata">

**Author:** ![RonRahaman](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/ronrahaman/32/1031_2.png) [@RonRahaman](https://discourse.openondemand.org/u/RonRahaman)\
**Post date:** [September 29, 2022, 3:40pm UTC](https://discourse.openondemand.org/t/qos-attribute-in-form-yml/2295/3 "2022-09-29T15:40:20Z")

</div>

Thanks! Yes, I was just doing this:

- In `form.yml.erb`:

```auto
  qos:
    widget: select
    label: "Quality of Service"
    options:
      - ["embers"]
      - ["inferno"]

```

- In `submit.yml.erb`

```auto
script:
  qos: <%= qos %>

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [March 28, 2023, 3:41pm UTC](https://discourse.openondemand.org/t/qos-attribute-in-form-yml/2295/4 "2023-03-28T15:41:02Z")

</div>

Closed on March 28, 2023, 3:41pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
