Update to use setProjectid helper function

This commit is contained in:
Hany Fahim 2016-04-11 08:22:01 -04:00
parent 44fc1b5d80
commit 3135706d1f
1 changed files with 2 additions and 9 deletions

View File

@ -213,15 +213,8 @@ func resourceCloudStackPortForwardRead(d *schema.ResourceData, meta interface{})
p.SetIpaddressid(d.Id())
p.SetListall(true)
// If there is a project supplied, we retrieve and set the project id
if project, ok := d.GetOk("project"); ok {
// Retrieve the project ID
projectid, e := retrieveID(cs, "project", project.(string))
if e != nil {
return e.Error()
}
// Set the default project ID
p.SetProjectid(projectid)
if err := setProjectid(p, cs, d); err != nil {
return err
}
l, err := cs.Firewall.ListPortForwardingRules(p)