kitchen-openstack icon indicating copy to clipboard operation
kitchen-openstack copied to clipboard

Split up main driver file

Open hartmantis opened this issue 11 years ago • 4 comments

It's starting to get too big for one file.

hartmantis avatar Oct 01 '13 12:10 hartmantis

Hi there, I'm going to start new enhancement feature branche (user_data, especially cloudconfig). It seems that all of features doesn't fit to one file.

Do you have thoughts how we can split it up?

monsterzz avatar Feb 12 '14 19:02 monsterzz

My first thoughts were to split things up like Fog does already: a compute/connection class, a server class, network class, etc. But I haven't had time to really sit down and work on it.

hartmantis avatar Feb 14 '14 14:02 hartmantis

I can see the point of this, but it is only 280 or so lines of code. Think about any time you have a method name with a noun in it, you could make the noun the object. create_server should perhaps be server.create for instance. Generally, methods should have nouns in them unless you are associating 2 objects if you are going OO like perhaps server.attach_ip(ip)

TerryHowe avatar Feb 14 '14 14:02 TerryHowe

@TerryHowe Thanks for the input. As an "accidental developer", I appreciate any and all. Very true, it's not too bad right now. This is partly here as a reminder it'll only ever get worse and partly as a small refactoring exercise for when I next have some free time.

hartmantis avatar Feb 14 '14 18:02 hartmantis