don't hard-code hardware vendor and model

RESOLVED FIXED

Status

Testing Graveyard
Mozpool
RESOLVED FIXED
5 years ago
2 years ago

People

(Reporter: dustin, Assigned: dustin)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
The vendor and model are available in inventory, so we don't need to hard-code defaults.
(Assignee)

Comment 1

5 years ago
Created attachment 697128 [details] [diff] [review]
bug825977.patch
Attachment #697128 - Flags: review?(mcote)

Comment 2

5 years ago
Comment on attachment 697128 [details] [diff] [review]
bug825977.patch

Review of attachment 697128 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, just a couple changes to continue our march toward consistent styling. :)

::: runtests.py
@@ +76,4 @@
>          add_device("device1", server="server1", relayinfo="relay-1:bank1:relay1")
>  
>      def testInsertHardwareType(self):
> +        add_hardware_type("samsung", "galaxy_s2")

Ah yes, this makes more sense.

@@ +184,5 @@
> +        conn = sql.get_conn()
> +        data.update_device(1, dict(fqdn='device1.fqdn', imaging_server='server9', mac_address='aabbccddeeff',
> +            hardware_type='samsung', hardware_model='galaxy'))
> +        res = conn.execute(model.devices.select())
> +        self.assertEquals([ dict(r) for r in res.fetchall() ], [

No space after [ nor before ].

@@ +639,4 @@
>          if want_relay_info:
>              relay_info = 'relay%d' % ((hash(fqdn) / 1000) % 10)
>              kv.append(dict(key='system.relay.0', value=relay_info))
> +        server_model = { 'model' : server_model_model, 'vendor' : server_model_vendor }

No space after {, before :, nor before }.
Attachment #697128 - Flags: review?(mcote) → review+
(Assignee)

Comment 3

5 years ago
Oops, I merged this instead of bug 825922.  I'll fix the syntax in a followup commit.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.